Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing options for TCefApplication.. AARCH64 (Pi 5) #495

Open
PTz0uAH opened this issue Dec 10, 2023 · 7 comments
Open

Missing options for TCefApplication.. AARCH64 (Pi 5) #495

PTz0uAH opened this issue Dec 10, 2023 · 7 comments

Comments

@PTz0uAH
Copy link

PTz0uAH commented Dec 10, 2023

Hoi @salvadordf

distri: cef_binary_119.4.7 chromium-119.0.6045.199_linuxarm64

I 've added a new HW-infrastructure ( RPi 5 bookworm/debian12 ) for the vAmigaWeb related projects I work on..

It needed some Pi5 tweaking (disabled wayland & installed some gtk dependencies)..

Then I successfully build Lazarus/FPC from trunk with fpcupdeluxe (laz v3.99 / fpc v3.3.1)..

Installed DCPCrypt + CEF4DELPHI package from here..

Then I build MiniBrowser and SimpleBrowser who seem to run fine..

So the basic functionality works.. on the Pi5.. which is great!

But now I am missing some options.. like ChromeRuntime, EnableGPU, DisablePopupBlocking, AutoPlayPolicy and others..

The vAmigaWeb project now only runs in minimal mode which is a pity..

Is there any chance CEF4DELPHI for Linux/AARCH64 will get the same abilities as the other linuxes?

p.s. The reference brower I use on Pi5 is Chromium 119.0.6045.171 and "everything works"..

@salvadordf
Copy link
Owner

Hi,

I only have a Raspberry Pi 4 and I can't test CEF4Delphi in Raspberry Pi 5 at this moment.

I'm not sure if the CEF sample application works fine in Raspberry Pi 5.
https://cef-builds.spotifycdn.com/cef_binary_119.4.7%2Bg55e15c8%2Bchromium-119.0.6045.199_linuxarm64_client.tar.bz2

It would be necessary to test the sample application in Chrome runtime mode, hardware acceleration, etc. before testing the CEF4Delphi demos.

Download the sample application and execute this command :
cefsimple --enable-chrome-runtime --use-views

@PTz0uAH
Copy link
Author

PTz0uAH commented Dec 10, 2023

@salvadordf

RPi 5 Debian 12 testing: > cefsimple --enable-chrome-runtime --use-views

preliminary test results:

  • as the google page was default I had to go to my vAmigaWeb test page via the debug console so that works..
  • vAmigaWeb started ok yet not at full speed..
  • Mouse Pointer integration works..
  • Local Storage to save/boot vAmigaWeb harddisk works..
  • Drag 'n drop worked, openfile requester works..
  • Popup window works.. yet no addressbar..
  • Audio works..
  • FullScreenAPI F11 works..

Too bad I could not check hw-acceleration in chrome://gpu nor chrome://flags from the console ( only http:// and https:// allowed? )

Most options used by vAmigaWeb work with > cefsimple

I do not know at this moment how to enable the GPU.. and/or hw acceleration for WebGL..

2023-12-11-102344_1920x1080_scrot

note: as you can see the user agent shows (X11; X86_64) which is odd as we are on ARM64..

What can I do more to test?

@salvadordf
Copy link
Owner

salvadordf commented Dec 11, 2023

Some early Raspberry Pi 5 testers reported that some applications needed to be adapted to the new hardware. I wouldn't be surprised if the hardware acceleration for Chromium is not available yet.

Follow these instructions to build cefclient and you'll be able to see the chrome://gpu page.
chromiumembedded/cef#3087

cefclient has hardware acceleration enabled by default.

I was waiting a few weeks before buying a Raspberry Pi 5 because I would like to have a passively cooled case with a PCIe hat that would allow me to connect an NVMe drive but I'll try to find some reseller in Spain now.
Edit : all shops are out of stock. :-/

@PTz0uAH
Copy link
Author

PTz0uAH commented Dec 11, 2023

@salvadordf

I was lucky the RPi5/8G arrived last week.. wanted it since October..

Too bad the limited availability spoils the fun for you..

But let me cheer you up a bit and share this with you.. as I said before "everything works" with the Chromium official build so behold this RPi5 report..

about-gpu-2023-12-11T11-39-10-477Z.txt

@salvadordf
Copy link
Owner

I finally received my Raspberry Pi 5. :D

I installed Raspberry Pi OS 64 bit and Lazarus 2.6.2 from the repository. I tried to use fpcupdeluxe to install Lazarus 3.0 but there's a build error so I had to use the old packages from the repository.

After installing DCPcrypt and CEF4Delphi 119.4.7 I could run the GTK 3 demos normally, even the TinyBrowser and TinyBrowser2 demos that use the Chrome runtime mode.

The GTK2 demos like MiniBrowser work when you don't enable the Chrome runtime mode but if you enable it you will see an error about mixing GTK2 and GTK3 symbols. This is the issue #441 "Linux : Some GTK2 demos crash".

Lazarus 2.6.2 has some issues with the debugger but I could set the GlobalCEFApp.ChromeRuntime property. I guess some of the issues you describe might be related to using the trunk version of Lazarus because I could set ChromeRuntime and EnableGPU without problems with Lazarus 2.6.2.

@PTz0uAH
Copy link
Author

PTz0uAH commented Feb 27, 2024

@salvadordf well I did get the "double windows bug" using Wayland and laz 2.2.6 so I switched back to X and tried the trunk version..

It is indeed great to hear it worked out for you as described.. I did put the pi on the shelf for later..

So it should work, even with GTK3.. thanks for the feedback..

I'm gonna dive into it again.. and let you know..

@PTz0uAH
Copy link
Author

PTz0uAH commented Mar 5, 2024

@salvadordf I've got the pi5 back into the program for testing and want to share my findings.. so far..

I boldly updated the (trunk) Lazarus 3.99 GTK2 install with fpcupdeluxe and also included the latest cef4delphi module..

going from there I found why the previous attempt getting access to the MiniBrowser cef properties in the editor failed..

In the uses clause after implementation it says uCefClient which could be harmless when using windows but mandatory for linux flavours..

After I manually adapted uCefClient to uCEFCLient things "came to live" in lazarus..

All missing properties are available now..

I could Enable the GPU.. it shows enabled in chrome://gpu

But could NOT load a file into vAmigaWeb using the JS buttons or even localstorage so that's not functioning yet..

After enabling ChromeRuntime the MiniBrowser crashes silently.. returning immediately to Lazarus..

So there are some crucial hurdles left but "all works with the official defacto std chromium release" which feels a bit frustrating..

Hope to get it working some day..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants