OSSystems / meta-browser

OpenEmbedded/Yocto BSP layer for Web Browsers
MIT License
184 stars 191 forks source link

failed to boot chromium 94.0.4606.71.stable on raspberry pi 4b #583

Open jinxie0731 opened 2 years ago

jinxie0731 commented 2 years ago

Hi,

I'm trying to build chromimu from source code for raspberry 4b using chromium-ozone-wayland_94.0.4606.71.bb, build is sucessful but during the boot (click chrom icon) , the following error occurs, and if I boot chromium from command line(chromium --no-sandbox), similar errors are printed, so what's wrong and how to fix this issue?

sh-5.0$ journal -f Nov 04 02:57:46 raspberrypi4-64 systemd[606]: Started Application launched by gnome-shell. Nov 04 02:57:47 raspberrypi4-64 chromium.desktop[1296]: stack smashing detected : terminated Nov 04 02:57:47 raspberrypi4-64 audit[1330]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=2 pid=1330 comm="chromium-bin" exe="/usr/lib/chromium/chromium-bin" sig=6 res=1 Nov 04 02:57:47 raspberrypi4-64 kernel: audit: type=1701 audit(1635994667.330:23): auid=1000 uid=1000 gid=1000 ses=2 pid=1330 comm="chromium-bin" exe="/usr/lib/chromium/chromium-bin" sig=6 res=1 Nov 04 02:57:47 raspberrypi4-64 kernel[164]: [ 1546.927454] audit: type=1701 audit(1635994667.330:23): auid=1000 uid=1000 gid=1000 ses=2 pid=1330 comm="chromium-bin" exe="/usr/lib/chromium/chromium-bin" sig=6 res=1 Nov 04 02:57:47 raspberrypi4-64 chromium.desktop[1296]: [1290:1316:1104/025747.349938:ERROR:gpu_process_host.cc(956)] GPU process exited unexpectedly: exit_code=6 Nov 04 02:57:47 raspberrypi4-64 chromium.desktop[1296]: stack smashing detected : terminated Nov 04 02:57:47 raspberrypi4-64 audit[1332]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=2 pid=1332 comm="chromium-bin" exe="/usr/lib/chromium/chromium-bin" sig=6 res=1 Nov 04 02:57:47 raspberrypi4-64 kernel: audit: type=1701 audit(1635994667.362:24): auid=1000 uid=1000 gid=1000 ses=2 pid=1332 comm="chromium-bin" exe="/usr/lib/chromium/chromium-bin" sig=6 res=1 Nov 04 02:57:47 raspberrypi4-64 kernel[164]: [ 1546.959667] audit: type=1701 audit(1635994667.362:24): auid=1000 uid=1000 gid=1000 ses=2 pid=1332 comm="chromium-bin" exe="/usr/lib/chromium/chromium-bin" sig=6 res=1 Nov 04 02:57:47 raspberrypi4-64 chromium.desktop[1296]: [1290:1316:1104/025747.372963:ERROR:gpu_process_host.cc(956)] GPU process exited unexpectedly: exit_code=6 Nov 04 02:57:47 raspberrypi4-64 chromium.desktop[1296]: stack smashing detected : terminated Nov 04 02:57:47 raspberrypi4-64 audit[1334]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=2 pid=1334 comm="chromium-bin" exe="/usr/lib/chromium/chromium-bin" sig=6 res=1 Nov 04 02:57:47 raspberrypi4-64 kernel: audit: type=1701 audit(1635994667.398:25): auid=1000 uid=1000 gid=1000 ses=2 pid=1334 comm="chromium-bin" exe="/usr/lib/chromium/chromium-bin" sig=6 res=1 Nov 04 02:57:47 raspberrypi4-64 kernel[164]: [ 1546.995733] audit: type=1701 audit(1635994667.398:25): auid=1000 uid=1000 gid=1000 ses=2 pid=1334 comm="chromium-bin" exe="/usr/lib/chromium/chromium-bin" sig=6 res=1 Nov 04 02:57:47 raspberrypi4-64 chromium.desktop[1296]: [1290:1316:1104/025747.407800:ERROR:gpu_process_host.cc(956)] GPU process exited unexpectedly: exit_code=6 Nov 04 02:57:47 raspberrypi4-64 chromium.desktop[1296]: stack smashing detected : terminated Nov 04 02:57:47 raspberrypi4-64 chromium.desktop[1296]: stack smashing detected : terminated Nov 04 02:57:47 raspberrypi4-64 audit[1340]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=2 pid=1340 comm="chromium-bin" exe="/usr/lib/chromium/chromium-bin" sig=6 res=1 Nov 04 02:57:47 raspberrypi4-64 kernel: audit: type=1701 audit(1635994667.546:26): auid=1000 uid=1000 gid=1000 ses=2 pid=1340 comm="chromium-bin" exe="/usr/lib/chromium/chromium-bin" sig=6 res=1 Nov 04 02:57:47 raspberrypi4-64 kernel[164]: [ 1547.146182] audit: type=1701 audit(1635994667.546:26): auid=1000 uid=1000 gid=1000 ses=2 pid=1340 comm="chromium-bin" exe="/usr/lib/chromium/chromium-bin" sig=6 res=1 Nov 04 02:57:47 raspberrypi4-64 chromium.desktop[1296]: [1290:1316:1104/025747.580931:ERROR:gpu_process_host.cc(956)] GPU process exited unexpectedly: exit_code=6 Nov 04 02:57:47 raspberrypi4-64 chromium.desktop[1296]: stack smashing detected : terminated Nov 04 02:57:47 raspberrypi4-64 audit[1344]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=2 pid=1344 comm="chromium-bin" exe="/usr/lib/chromium/chromium-bin" sig=6 res=1 Nov 04 02:57:47 raspberrypi4-64 kernel: audit: type=1701 audit(1635994667.606:27): auid=1000 uid=1000 gid=1000 ses=2 pid=1344 comm="chromium-bin" exe="/usr/lib/chromium/chromium-bin" sig=6 res=1 Nov 04 02:57:47 raspberrypi4-64 kernel[164]: [ 1547.204168] audit: type=1701 audit(1635994667.606:27): auid=1000 uid=1000 gid=1000 ses=2 pid=1344 comm="chromium-bin" exe="/usr/lib/chromium/chromium-bin" sig=6 res=1 Nov 04 02:57:47 raspberrypi4-64 chromium.desktop[1296]: [1290:1316:1104/025747.615758:ERROR:gpu_process_host.cc(956)] GPU process exited unexpectedly: exit_code=6 Nov 04 02:57:47 raspberrypi4-64 chromium.desktop[1296]: stack smashing detected : terminated Nov 04 02:57:47 raspberrypi4-64 audit[1345]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=2 pid=1345 comm="chromium-bin" exe="/usr/lib/chromium/chromium-bin" sig=6 res=1 Nov 04 02:57:47 raspberrypi4-64 kernel: audit: type=1701 audit(1635994667.630:28): auid=1000 uid=1000 gid=1000 ses=2 pid=1345 comm="chromium-bin" exe="/usr/lib/chromium/chromium-bin" sig=6 res=1 Nov 04 02:57:47 raspberrypi4-64 kernel[164]: [ 1547.228988] audit: type=1701 audit(1635994667.630:28): auid=1000 uid=1000 gid=1000 ses=2 pid=1345 comm="chromium-bin" exe="/usr/lib/chromium/chromium-bin" sig=6 res=1 Nov 04 02:57:47 raspberrypi4-64 chromium.desktop[1296]: [1290:1328:1104/025747.638583:ERROR:zygote_host_impl_linux.cc(263)] Failed to adjust OOM score of renderer with pid 1345: Permission denied (13) Nov 04 02:57:47 raspberrypi4-64 chromium.desktop[1296]: [1290:1316:1104/025747.642148:ERROR:gpu_process_host.cc(956)] GPU process exited unexpectedly: exit_code=6 Nov 04 02:57:47 raspberrypi4-64 chromium.desktop[1296]: [1290:1290:1104/025747.654860:ERROR:cursor_loader.cc(115)] Failed to load a platform cursor of type kNull Nov 04 02:57:47 raspberrypi4-64 chromium.desktop[1296]: stack smashing detected : terminated Nov 04 02:57:47 raspberrypi4-64 audit[1347]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=2 pid=1347 comm="chromium-bin" exe="/usr/lib/chromium/chromium-bin" sig=6 res=1 Nov 04 02:57:47 raspberrypi4-64 kernel: audit: type=1701 audit(1635994667.654:29): auid=1000 uid=1000 gid=1000 ses=2 pid=1347 comm="chromium-bin" exe="/usr/lib/chromium/chromium-bin" sig=6 res=1 Nov 04 02:57:47 raspberrypi4-64 kernel[164]: [ 1547.252714] audit: type=1701 audit(1635994667.654:29): auid=1000 uid=1000 gid=1000 ses=2 pid=1347 comm="chromium-bin" exe="/usr/lib/chromium/chromium-bin" sig=6 res=1 Nov 04 02:57:47 raspberrypi4-64 chromium.desktop[1296]: [1290:1316:1104/025747.663831:ERROR:gpu_process_host.cc(956)] GPU process exited unexpectedly: exit_code=6 Nov 04 02:57:47 raspberrypi4-64 chromium.desktop[1296]: stack smashing detected : terminated Nov 04 02:57:47 raspberrypi4-64 chromium.desktop[1296]: stack smashing detected : terminated Nov 04 02:57:47 raspberrypi4-64 audit[1349]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=2 pid=1349 comm="chromium-bin" exe="/usr/lib/chromium/chromium-bin" sig=6 res=1 Nov 04 02:57:47 raspberrypi4-64 kernel: audit: type=1701 audit(1635994667.786:30): auid=1000 uid=1000 gid=1000 ses=2 pid=1349 comm="chromium-bin" exe="/usr/lib/chromium/chromium-bin" sig=6 res=1 Nov 04 02:57:47 raspberrypi4-64 kernel[164]: [ 1547.383749] audit: type=1701 audit(1635994667.786:30): auid=1000 uid=1000 gid=1000 ses=2 pid=1349 comm="chromium-bin" exe="/usr/lib/chromium/chromium-bin" sig=6 res=1 Nov 04 02:57:47 raspberrypi4-64 chromium.desktop[1296]: [1290:1316:1104/025747.795316:ERROR:gpu_process_host.cc(956)] GPU process exited unexpectedly: exit_code=6 Nov 04 02:57:47 raspberrypi4-64 chromium.desktop[1296]: stack smashing detected : terminated Nov 04 02:57:47 raspberrypi4-64 audit[1352]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=2 pid=1352 comm="chromium-bin" exe="/usr/lib/chromium/chromium-bin" sig=6 res=1 Nov 04 02:57:47 raspberrypi4-64 kernel: audit: type=1701 audit(1635994667.878:31): auid=1000 uid=1000 gid=1000 ses=2 pid=1352 comm="chromium-bin" exe="/usr/lib/chromium/chromium-bin" sig=6 res=1 Nov 04 02:57:47 raspberrypi4-64 chromium.desktop[1296]: stack smashing detected : terminated Nov 04 02:57:47 raspberrypi4-64 kernel[164]: [ 1547.478506] audit: type=1701 audit(1635994667.878:31): auid=1000 uid=1000 gid=1000 ses=2 pid=1352 comm="chromium-bin" exe="/usr/lib/chromium/chromium-bin" sig=6 res=1 Nov 04 02:57:47 raspberrypi4-64 chromium.desktop[1296]: stack smashing detected : terminated Nov 04 02:57:47 raspberrypi4-64 chromium.desktop[1296]: [1290:1316:1104/025747.915266:ERROR:gpu_process_host.cc(956)] GPU process exited unexpectedly: exit_code=6 Nov 04 02:57:47 raspberrypi4-64 chromium.desktop[1296]: [1290:1316:1104/025747.917721:FATAL:gpu_data_manager_impl_private.cc(417)] GPU process isn't usable. Goodbye. Nov 04 02:57:47 raspberrypi4-64 audit[1290]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=2 pid=1290 comm="Chrome_IOThread" exe="/usr/lib/chromium/chromium-bin" sig=5 res=1 Nov 04 02:57:48 raspberrypi4-64 kernel: audit: type=1701 audit(1635994667.998:32): auid=1000 uid=1000 gid=1000 ses=2 pid=1290 comm="Chrome_IOThread" exe="/usr/lib/chromium/chromium-bin" sig=5 res=1 Nov 04 02:57:48 raspberrypi4-64 kernel[164]: [ 1547.595487] audit: type=1701 audit(1635994667.998:32): auid=1000 uid=1000 gid=1000 ses=2 pid=1290 comm="Chrome_IOThread" exe="/usr/lib/chromium/chromium-bin" sig=5 res=1 Nov 04 02:57:48 raspberrypi4-64 audit[1331]: ANOM_ABEND auid=1000 uid=1000 gid=1000 ses=2 pid=1331 comm="Chrome_ChildIOT" exe="/usr/lib/chromium/chromium-bin" sig=4 res=1 Nov 04 02:57:48 raspberrypi4-64 systemd[606]: gnome-launched-chromium.desktop-1290.scope: Succeeded.

JeroenHid commented 2 years ago

Hi,

I experience slightly the same problem on my platform (Dunfell, iMX8M Mini), same Chromium version.

Besides "Failed EGL API GetProcAddress" errors, I notice " stack smashing detected : terminated" errors and a Snap! in Chromium....

Any ideas?

log.txt

rakuco commented 2 years ago

cc @msisov for additional insight into all this GPU stuff

@JeroenHid @jinxie0731 do any of you get better results if you pass --disable-gpu?

JeroenHid commented 2 years ago

@rakuco

No more API errors, but stack smashing still occurring (including snap window):

imx8mm-cgt-sx8m:~# chromium --no-sandbox --disable-gpu [656:690:0101/010844.280357:ERROR:bus.cc(392)] Failed to connect to the bus: Could not parse server address: Unknown address type (e xamples of valid types are "tcp" and on UNIX "unix") [656:690:0101/010844.281191:ERROR:bus.cc(392)] Failed to connect to the bus: Could not parse server address: Unknown address type (e xamples of valid types are "tcp" and on UNIX "unix") stack smashing detected : terminated [656:656:0101/010844.509612:ERROR:cursor_loader.cc(115)] Failed to load a platform cursor of type kNull stack smashing detected : terminated stack smashing detected : terminated stack smashing detected : terminated stack smashing detected : terminated stack smashing detected : terminated stack smashing detected : terminated stack smashing detected : terminated

JeroenHid commented 2 years ago

btw, I'm not very sure of the meta-clang version I've used to build Chromium. I ended up with using the dunfell-clang12 tag of https://github.com/kraj/meta-clang

This change forced me to update the used meta-clang: https://github.com/OSSystems/meta-browser/commit/967f28f0404cef3b74fb9d0d3c897b65b15adcdf

kraj commented 2 years ago

can you just use dunfell branch of meta-clang

JeroenHid commented 2 years ago

I'll try...

Thanks for your quick reponses !

jinxie0731 commented 2 years ago

cc @msisov for additional insight into all this GPU stuff

@JeroenHid @jinxie0731 do any of you get better results if you pass --disable-gpu?

@rakuco with option --disable-gpu, I got the same error !

msisov commented 2 years ago

It's hard to say what's the problem there without a stack trace.

JeroenHid commented 2 years ago

Hmm, that's true. I need to build Chromium with stack traces enabled then ?

https://chromium.googlesource.com/chromiumos/docs/+/HEAD/stack_traces.md

rakuco commented 2 years ago

@msisov just meant doing a debug build in the hopes of getting a stack trace with the failures and crashes.

rakuco commented 2 years ago

I forgot what the incantations were for building a recipe in debug mode with poky, but be prepared to have a lot of memory and patience if you try to do it :-)

JeroenHid commented 2 years ago

Memory and patience are available, now I need to find out how to make a debug build.

JeroenHid commented 2 years ago

can you just use dunfell branch of meta-clang

Building just finished by using the dunfell branch. Errors regarding 'GetProcAddress' do still occur unfortunately.

log2.txt

Need to fix those first before I can build a debug version to investigate the '​stack smashing detected' errors.

Any ideas ?

msisov commented 2 years ago

@msisov just meant doing a debug build in the hopes of getting a stack trace with the failures and crashes.

One doesn't need to do a debug build. Simply start a gdbserver on a device and load the chrome binary via gdb-multiarch on the host. Then connect to the remote target inside the gdb session and start the chromium. It'll be enough to produce a meaningful stack trace.

jinxie0731 commented 2 years ago

For raspberry, it is not so easy to switch all meta to the branch of dunfell due to the compatibility of different meta_XXX. Even after the all these compatibility issues are solved, I still run into other build errors, so I'm preparing to drop this effort. Perhaps it makes more sense to trace the crash using GDB.

JeroenHid commented 2 years ago

@msisov just meant doing a debug build in the hopes of getting a stack trace with the failures and crashes.

One doesn't need to do a debug build. Simply start a gdbserver on a device and load the chrome binary via gdb-multiarch on the host. Then connect to the remote target inside the gdb session and start the chromium. It'll be enough to produce a meaningful stack trace.

See attached gdb and stdout logfiles, for "chromium --no-sandbox"

I didn't catch a complete stack trace (like when a thread is really crashing), but I did see some other message in the logs, related to the API binding:

[467:520:0101/011919.220069:ERROR:gl_context_egl.cc(166)] eglBindApi failed with error EGL_BAD_PARAMETER [467:520:0101/011919.220169:ERROR:gpu_channel_manager.cc(819)] ContextResult::kFatalFailure: Failed to create shared context for virtualization. [467:520:0101/011919.220206:ERROR:shared_image_stub.cc(524)] SharedImageStub: unable to create context [467:520:0101/011919.220256:ERROR:gpu_channel.cc(568)] GpuChannel: Failed to create SharedImageStub

Still, there's no additional information about the code location where the compiler check for array overflows occur (stack smashing detected). Could this happen, because the proces ID being debugged is not the one actually crashing ? Because I notice after boot there are 5 chromium processes, of which only one is crashing:

33193 ttymxc1 00:00:07 chromium-bin 33198 ttymxc1 00:00:00 chromium-bin 33202 ttymxc1 00:00:02 chromium-bin 33221 ttymxc1 00:00:00 chromium-bin 36714 ttymxc1 00:00:00 chromium-bin

stack smashing detected : terminated

33193 ttymxc1 00:00:07 chromium-bin 33198 ttymxc1 00:00:00 chromium-bin 33202 ttymxc1 00:00:02 chromium-bin 33221 ttymxc1 00:00:00 chromium-bin 36949 ttymxc1 00:00:00 chromium-bin

I tried to attach to this PID, but it's terminated before I can get the PID and attach the gdbserver. gdb session - stdout.txt gdb session.txt

JeroenHid commented 2 years ago

@msisov just meant doing a debug build in the hopes of getting a stack trace with the failures and crashes.

One doesn't need to do a debug build. Simply start a gdbserver on a device and load the chrome binary via gdb-multiarch on the host. Then connect to the remote target inside the gdb session and start the chromium. It'll be enough to produce a meaningful stack trace.

Tried debugging with --single-process:

Thread 5 "CompositorTileW" received signal SIGSEGV, Segmentation fault. [Switching to Thread 38513.38549] 0x0000aaaaaf751df8 in ?? ()

(gdb) bt 10

0 0x0000aaaaaf751df8 in ?? ()

1 0x0000aaaab48c5c88 in ?? ()

Backtrace stopped: not enough registers or memory available to unwind further

msisov commented 2 years ago

eglBindApi fails with the EGL_BAD_PARAMETER parameter, which happens when "api is not one of the accepted tokens, or if the specified client API is not supported by the EGL implementation." according to the https://www.khronos.org/registry/EGL/sdk/docs/man/html/eglBindAPI.xhtml .

Something related to the egl implementation on your rpi4 gpu driver.

jinxie0731 commented 2 years ago

@msisov just meant doing a debug build in the hopes of getting a stack trace with the failures and crashes.

One doesn't need to do a debug build. Simply start a gdbserver on a device and load the chrome binary via gdb-multiarch on the host. Then connect to the remote target inside the gdb session and start the chromium. It'll be enough to produce a meaningful stack trace.

@msisov could you look at this stack trace too? chromium-gdb-with-egl.log

jinxie0731 commented 2 years ago

Attach the stack trace that get from different chromium arguments:

  1. --ozone-platform=wayland --single-process chromium-gdb-single-process.log
  2. --ozone-platform=wayland -single-process -no-sandbox chromium-gdb-single-process-no-sandbox.log
msisov commented 2 years ago

drmPrimeFDToHandle() failed: Invalid argument Failed to create scanout resource. [1707:1743:1105/135209.215104:ERROR:gl_surface_egl.cc(780)] EGL Driver message (Critical) eglCreateImageKHR: dri2_create_image_khr_texture [1707:1743:1105/135209.215502:ERROR:gl_image_egl.cc(42)] Error creating EGLImage: EGL_BAD_ALLOC [1707:1743:1105/135209.215973:ERROR:gpu_memory_buffer_factory_native_pixmap.cc(267)] Failed to create GLImage 1280x1536, BGRA_8888, usage SCANOUT drmPrimeFDToHandle() failed: Invalid argument Failed to create scanout resource.

It looks the same as https://github.com/raspberrypi/linux/issues/3411

JeroenHid commented 2 years ago

eglBindApi fails with the EGL_BAD_PARAMETER parameter, which happens when "api is not one of the accepted tokens, or if the specified client API is not supported by the EGL implementation." according to the https://www.khronos.org/registry/EGL/sdk/docs/man/html/eglBindAPI.xhtml .

Something related to the egl implementation on your rpi4 gpu driver.

That's strange then, I just updated from M92 to M94 and left the rest of the platform as-is. During building M94 the following error occurs (while M92 builds fine), updating meta-clang (dunfell) fixed this, but at runtime these API bind failures occurs:

ERROR: Nothing PROVIDES 'virtual/libc-native' (but virtual:native:/yocto/vri-linux/build/../meta-clang/recipes-devtools/clang/compiler-rt_git.bb DEPENDS on or otherwise requires it). Close matches: virtual/libgl-native virtual/librpc-native virtual/libx11-native NOTE: Runtime target 'chromium-ozone-wayland' is unbuildable, removing... Missing or unbuildable dependency chain was: ['chromium-ozone-wayland', 'gn-native', 'compiler-rt-native', 'virtual/libc-native'] ERROR: Required build target 'vt3-mcu' has no buildable providers. Missing or unbuildable dependency chain was: ['vt3-mcu', 'chromium-ozone-wayland', 'gn-native', 'compiler-rt-native', 'virtual/libc-native']

BTW, I'm on a iMX8M Mini.

WujianSun commented 2 years ago

eglBindApi fails with the EGL_BAD_PARAMETER parameter, which happens when "api is not one of the accepted tokens, or if the specified client API is not supported by the EGL implementation." according to the https://www.khronos.org/registry/EGL/sdk/docs/man/html/eglBindAPI.xhtml . Something related to the egl implementation on your rpi4 gpu driver.

That's strange then, I just updated from M92 to M94 and left the rest of the platform as-is. During building M94 the following error occurs (while M92 builds fine), updating meta-clang (dunfell) fixed this, but at runtime these API bind failures occurs:

ERROR: Nothing PROVIDES 'virtual/libc-native' (but virtual:native:/yocto/vri-linux/build/../meta-clang/recipes-devtools/clang/compiler-rt_git.bb DEPENDS on or otherwise requires it). Close matches: virtual/libgl-native virtual/librpc-native virtual/libx11-native NOTE: Runtime target 'chromium-ozone-wayland' is unbuildable, removing... Missing or unbuildable dependency chain was: ['chromium-ozone-wayland', 'gn-native', 'compiler-rt-native', 'virtual/libc-native'] ERROR: Required build target 'vt3-mcu' has no buildable providers. Missing or unbuildable dependency chain was: ['vt3-mcu', 'chromium-ozone-wayland', 'gn-native', 'compiler-rt-native', 'virtual/libc-native']

BTW, I'm on a iMX8M Mini.

Hi @JeroenHid , The issue happend because of the chromiumV94 building generate libEGL.so and libGLESv2.so in /usr/lib/chromium/. You can manually remove these two libraries.

JeroenHid commented 2 years ago

Removing those libs worked, no more EGL Bind errors.

Still, during boot EGL errors occur: [352637.430] wl_display@1.error(wl_display@1, 1, "invalid arguments for wp_linux_explicit_synchronization_v1@5.get_synchronization") wl_display@1: error 1: invalid arguments for wp_linux_explicit_synchronization_v1@5.get_synchronization EGL: errno=22 (Invalid argument)

Apart from the ' stack smashing detected : terminated' error.

Ofc, no tabs are shown...

log3.txt

WujianSun commented 2 years ago

Hi @JeroenHid , Seems the error happened about the wayland fence error, so could you please provide the weston log in /etc/xdg/weston/weston.log? Also you can try using gl-renderer to check the issue as follow steps 1.vi /etc/xdg/weston/weston.ini

  1. Add #use_g2d
  2. systemctl restart weston
  3. run chromium
JeroenHid commented 2 years ago

Hi @WujianSun

This is the weston log file: weston.log

I also changed weston.ini:

use-g2d=1

restarted weston : weston2.log It is using GL renderer in stead of G2D now.

Same errors occur though: wl_display@1: error 1: invalid arguments for zwp_linux_explicit_synchronization_v1@5.get_synchronization EGL: errno=22 (Invalid argument) EGL: errno=22 (Invalid argument) EGL: errno=22 (Invalid argument)

weston log: [01:04:14.226] libwayland: unknown object (24), message get_synchronization(no) [01:04:14.227] libwayland: error in client communication (pid 619) [01:04:21.629] libwayland: invalid object (6), type (wp_viewporter), message attach(?oii) [01:04:22.531] libwayland: error in client communication (pid 619)

Any ideas ?

Thanks btw!

WujianSun commented 2 years ago

Hi @JeroenHid , Please enable gbm build in yotco and rebuild chromium, in mete-imx.

diff --git a/meta-sdk/dynamic-layers/browser-layer/recipes-browser/chromium/chromium-ozone-wayland_%.bbappend b/meta-sdk/dynamic-layers/browser-layer/recipes-browser/chromium/chromium-ozone-wayland_%.bbappend
index ac7f5d077..276dff74e 100644
--- a/meta-sdk/dynamic-layers/browser-layer/recipes-browser/chromium/chromium-ozone-wayland_%.bbappend
+++ b/meta-sdk/dynamic-layers/browser-layer/recipes-browser/chromium/chromium-ozone-wayland_%.bbappend
@@ -20,6 +20,5 @@ GN_ARGS += ' \
 # gbm is availiable only for mx8, but still drop it for 8MQ in 2020 Q4 release
 GN_ARGS_append_mx6 = " use_system_minigbm=false use_wayland_gbm=false"
 GN_ARGS_append_mx7 = " use_system_minigbm=false use_wayland_gbm=false"
-GN_ARGS_append_mx8 = " use_system_minigbm=false use_wayland_gbm=false"

 CHROMIUM_EXTRA_ARGS_append = " --disable-features=VizDisplayCompositor --in-process-gpu"
JeroenHid commented 2 years ago

Hi @JeroenHid , Please enable gbm build in yotco and rebuild chromium, in mete-imx.

diff --git a/meta-sdk/dynamic-layers/browser-layer/recipes-browser/chromium/chromium-ozone-wayland_%.bbappend b/meta-sdk/dynamic-layers/browser-layer/recipes-browser/chromium/chromium-ozone-wayland_%.bbappend
index ac7f5d077..276dff74e 100644
--- a/meta-sdk/dynamic-layers/browser-layer/recipes-browser/chromium/chromium-ozone-wayland_%.bbappend
+++ b/meta-sdk/dynamic-layers/browser-layer/recipes-browser/chromium/chromium-ozone-wayland_%.bbappend
@@ -20,6 +20,5 @@ GN_ARGS += ' \
 # gbm is availiable only for mx8, but still drop it for 8MQ in 2020 Q4 release
 GN_ARGS_append_mx6 = " use_system_minigbm=false use_wayland_gbm=false"
 GN_ARGS_append_mx7 = " use_system_minigbm=false use_wayland_gbm=false"
-GN_ARGS_append_mx8 = " use_system_minigbm=false use_wayland_gbm=false"

 CHROMIUM_EXTRA_ARGS_append = " --disable-features=VizDisplayCompositor --in-process-gpu"

Hi @WujianSun

GBM was already enbaled in my buiold, if I'm correctly: GN_ARGS contains "use_wayland_gbm=true".

I checked chromium-ozone-wayland_%.bbappend of meta-sdk and the line with "GN_ARGS_append_mx8" was already removed I guess.

Maybe it's better to wait for release M95/M96 ?

rakuco commented 2 years ago

FWIW, marex on Libera.Chat mentioned that the stack smashing messages do not show up when clang 13 (from honister) is used, while it happens with clang 12 on dunfell. Using clang 13 on dunfell also causes those messages to go away.

Can any of the affected users try to test this? We could try either backporting the required fixes to meta-clang's dunfell branch, or try moving to clang 13 in meta-clang's dunfell branch. It could also be the case that it's other changes to the .conf files in meta-clang's more recent branches that make this go away, I guess?

cc @kraj

kraj commented 2 years ago

I think we perhaps would need meta-clang-mixin layer with clang13 in it

JeroenHid commented 2 years ago

FWIW, marex on Libera.Chat mentioned that the stack smashing messages do not show up when clang 13 (from honister) is used, while it happens with clang 12 on dunfell. Using clang 13 on dunfell also causes those messages to go away.

Can any of the affected users try to test this? We could try either backporting the required fixes to meta-clang's dunfell branch, or try moving to clang 13 in meta-clang's dunfell branch. It could also be the case that it's other changes to the .conf files in meta-clang's more recent branches that make this go away, I guess?

cc @kraj

I could have a try at it, but because the build takes around 12 hours expect results in a day.

JeroenHid commented 2 years ago

FWIW, marex on Libera.Chat mentioned that the stack smashing messages do not show up when clang 13 (from honister) is used, while it happens with clang 12 on dunfell. Using clang 13 on dunfell also causes those messages to go away. Can any of the affected users try to test this? We could try either backporting the required fixes to meta-clang's dunfell branch, or try moving to clang 13 in meta-clang's dunfell branch. It could also be the case that it's other changes to the .conf files in meta-clang's more recent branches that make this go away, I guess? cc @kraj

I could have a try at it, but because the build takes around 12 hours expect results in a day.

Hmmm, that's a bit hard. Tried to use clang 13 from honister in my Poky build (Dunfell 3.1.2), but in the Honister-branch of meta-clang, in the bb/bbappend files the underscore were replaced by semicolons. E.g. "RDEPENDS_${PN}" became "RDEPENDS:${PN}", and "TUNE_CCARGS_remove_toolchain-clang" became "TUNE_CCARGS:remove:toolchain-clang"

My guess is I need to revert all these replacements in all meta-clang recipes;, perhaps any of you know a shortcut here ?

kraj commented 2 years ago

yeah you need to adjust for override syntax changes, Marex mentioned on IRC that he did these adjustments locally as well. Perhaps you can reach out to him and get the changes to test.

shr-project commented 2 years ago

Tried to use clang 13 from honister in my Poky build (Dunfell 3.1.2), but in the Honister-branch of meta-clang, in the bb/bbappend files the underscore were replaced by semicolons.

New overrides syntax is supported in newer dunfell, why are you stuck on 3.1.2, can you update to 3.1.11 or latest dunfell?

Or backport just https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=dunfell&id=9c2186108e2e8fcf5837c0ffe9dbdeeaea4b7398 and its parent to your build to support new syntax.

JeroenHid commented 2 years ago

Thanks, Ill be working on it (build is running). We're still on 3.1.2 cause we were focussing on getting weston/wayland/chromium running with GPU rendering ;-)

Will update to latest Dunfell in the future.

marex commented 2 years ago

The patch applies on honister branch commit 826f728 ("nativesdk-clang: Fix build when using RUNTIME = llvm"):

diff --git a/conf/layer.conf b/conf/layer.conf
index 122cfbe..c051029 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -7,7 +7,7 @@ BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend"
 BBFILE_COLLECTIONS += "clang-layer"
 BBFILE_PATTERN_clang-layer := "^${LAYERDIR}/"
 BBFILE_PRIORITY_clang-layer = "7"
-LAYERSERIES_COMPAT_clang-layer = "hardknott honister"
+LAYERSERIES_COMPAT_clang-layer = "dunfell hardknott honister"
 LAYERDEPENDS_clang-layer = "core"

 BBFILES_DYNAMIC += " \
diff --git a/recipes-core/busybox/busybox/0001-Turn-ptr_to_globals-and-bb_errno-to-be-non-const.patch b/recipes-core/busybox/busybox/0001-Turn-ptr_to_globals-and-bb_errno-to-be-non-const.patch
deleted file mode 100644
index 468a32d..0000000
diff --git a/recipes-core/busybox/busybox_1.34%.bbappend b/recipes-core/busybox/busybox_1.34%.bbappend
deleted file mode 100644
index 2c0af5e..0000000
JeroenHid commented 2 years ago

The patch applies on honister branch commit 826f728 ("nativesdk-clang: Fix build when using RUNTIME = llvm"):

diff --git a/conf/layer.conf b/conf/layer.conf
index 122cfbe..c051029 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -7,7 +7,7 @@ BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend"
 BBFILE_COLLECTIONS += "clang-layer"
 BBFILE_PATTERN_clang-layer := "^${LAYERDIR}/"
 BBFILE_PRIORITY_clang-layer = "7"
-LAYERSERIES_COMPAT_clang-layer = "hardknott honister"
+LAYERSERIES_COMPAT_clang-layer = "dunfell hardknott honister"
 LAYERDEPENDS_clang-layer = "core"

 BBFILES_DYNAMIC += " \
diff --git a/recipes-core/busybox/busybox/0001-Turn-ptr_to_globals-and-bb_errno-to-be-non-const.patch b/recipes-core/busybox/busybox/0001-Turn-ptr_to_globals-and-bb_errno-to-be-non-const.patch
deleted file mode 100644
index 468a32d..0000000
diff --git a/recipes-core/busybox/busybox_1.34%.bbappend b/recipes-core/busybox/busybox_1.34%.bbappend
deleted file mode 100644
index 2c0af5e..0000000

Thnx!

JeroenHid commented 2 years ago

Hi,

Sorry for the delay.

Stack smashing errors have indeed disappeared when using clang 13 👍

Still, these errors remain on iMX8M:

Weston log: [01:10:41.702] libwayland: unknown object (21), message get_synchronization(no) [01:10:41.702] libwayland: error in client communication (pid 743) [01:10:41.711] libwayland: invalid object (6), type (wp_viewporter), message attach(?oii) [01:10:41.712] libwayland: error in client communication (pid 743)

All cases are started with "CHROME_EXTRA_ARGS=" --use-gl=egl --ozone-platform=wayland --disable-features=VizDisplayCompositor --in-process-gpu" in chromium-wrapper.

Tested with Chromium 95.0.4638.69

Any thoughts ? My goal is to run the browser with GPU rendering.

1 - bind errors.txt 2 - without libs.txt

JeroenHid commented 2 years ago

Trying without GPU compositing will display the browser tab initially. After that, it seems unresponsive. I think because of this Weston error: "[607:644:0101/010302.096274:ERROR:wayland_buffer_manager_gpu.cc(103)] WaylandBufferManagerGpu is not initialized. Can't register a surface."

3 - without GPU compositing.txt

msisov commented 2 years ago

Hi,

Sorry for the delay.

Stack smashing errors have indeed disappeared when using clang 13 +1

Still, these errors remain on iMX8M:

  • bind errors (Failed EGL API / ES_Common / GLES32 GetProcAddress), see log 1.
  • removing libGLESv2.so / libEGL.so solves the bind-errors, but adds
  • error: "EGL: errno=22 (Invalid argument)", due to "Fatal Wayland communication error Broken pipe.", see log 2.

Weston log: [01:10:41.702] libwayland: unknown object (21), message get_synchronization(no) [01:10:41.702] libwayland: error in client communication (pid 743) [01:10:41.711] libwayland: invalid object (6), type (wp_viewporter), message attach(?oii) [01:10:41.712] libwayland: error in client communication (pid 743)

All cases are started with "CHROME_EXTRA_ARGS=" --use-gl=egl --ozone-platform=wayland --disable-features=VizDisplayCompositor --in-process-gpu" in chromium-wrapper.

Tested with Chromium 95.0.4638.69

Any thoughts ? My goal is to run the browser with GPU rendering.

1 - bind errors.txt 2 - without libs.txt

The error is [521444.543] wl_display@1.error(wl_display@1, 1, "invalid arguments for zwp_linux_explicit_synchronization_v1@5.get_synchronization". M96 contains the necessary fix. Please use that.

msisov commented 2 years ago

Trying without GPU compositing will display the browser tab initially. After that, it seems unresponsive. I think because of this Weston error: "[607:644:0101/010302.096274:ERROR:wayland_buffer_manager_gpu.cc(103)] WaylandBufferManagerGpu is not initialized. Can't register a surface."

3 - without GPU compositing.txt

I fixed that one week ago in the upstream. Let me backport the patch.

JeroenHid commented 2 years ago

Would be great! I'll build M96 then after your backport patch

JeroenHid commented 2 years ago

Build started....

JeroenHid commented 2 years ago

Hi,

I just have build version "Chromium 96.0.4664.45 stable", and running it on iMX8M, dunfell.

Before I conclude that the reported error is/isn't resolved, I would like to ask a few questions about starting Chromium. Just to make sure I'm setting it up the right way before jumping to conclusions.

Question 1 What is the proper way to start Chromium: by using 'chromium', which links to the /usr/lib/chromium/chromium-wrapper, or by using chromium-bin ? The first option sets the (lib-)path to /usr/lib/chromium e.g. and adds CHROME_EXTRA_ARGS.

Question 2 - API Bind failures Can someone confirm I really need to delete libEGL.so and libGLESv2.so from /usr/lib/chromium and or /usr/lib/chromium.swiftshader to prevent these GetProcAddress-failures?

If so, which EGL/GLESv2 libs are being used instead?

After removing both libs, and starting Chromium, these errors occurs, and ANGLE is used, in stead of GL: [2706:2706:0101/041142.058890:ERROR:gpu_process_host.cc(967)] GPU process exited unexpectedly: exit_code=139 [2706:2706:0101/041143.096994:ERROR:gpu_process_host.cc(967)] GPU process exited unexpectedly: exit_code=139 [2706:2706:0101/041144.146424:ERROR:gpu_process_host.cc(967)] GPU process exited unexpectedly: exit_code=139 [2806:2806:0101/041144.155341:ERROR:egl_util.cc(74)] Failed to load GLES library: /usr/lib/chromium/libGLESv2.so: /usr/lib/chromium/ libGLESv2.so: cannot open shared object file: No such file or directory [2806:2806:0101/041144.160323:ERROR:viz_main_impl.cc(161)] Exiting GPU process due to errors during initialization [2813:2813:0101/041144.175723:ERROR:gpu_init.cc(457)] Passthrough is not supported, GL is disabled, ANGLE is

Seems obvious, since I removed the libs in the first place....

After these errors, chromium continues to boot, and looks ok. But: there's no hardware acceleration, so CPU load is ~75% (quadcore iMX8M Mini) and the tabs load very slow. Sometimes the Page unresponsive -dialogue is shown, for an empty tab lol. No Wayland errors though ;-)

I do have libEGL and libGLESv2 in my root file system, it just looks like chromium cannot find or use them ?

So, how to proceed to get EGL running (hardware acceleration). I know this is a bit off-topic, regarding the original issue-report. I would appreciate any help, feel free to contact me by email.

kmeinhar commented 2 years ago

We had a similar issue that Chromium was crashing with error message stack smashing (Full Error Log).

We are using a platform without a GPU and no DRI/DRM. Instead Weston uses the fbdev backend. Our solution was to move to branch honister of the meta-clang layer and applying the patch from @marex .

@kraj : I think we perhaps would need meta-clang-mixin layer with clang13 in it

This might be helpful for others that face the same problem. Depending on the implications it could also be useful to move the whole dunfell branch to clang13.

munoz0raul commented 2 years ago

Hi @JeroenHid, Did you have any progress on that?

I'm trying chromium-ozone-wayland-96.0.4664.110-r0 on the iMX8M-mini evk.

By just adding the layer and enabling it, it worked but still did not use the GPU.

Could someone please confirm if removing the libEGL.so and libGLESv2.so from ${D}${libdir}/chromium/is the way to go for iMX8?

https://github.com/OSSystems/meta-browser/blob/master/meta-chromium/recipes-browser/chromium/chromium-gn.inc#L455

I'm also confused about the PACKAGECONFIG. Does iMX8 support use-vapi? I tried to enable it but crashed.

| ../libva-2.10.0/va/glx/va_glx.h:29:10: fatal error: GL/glx.h: No such file or directory

How about proprietary-codecs, should I enable it for iMX8?

msisov commented 2 years ago

Hi @JeroenHid, Did you have any progress on that?

I'm trying chromium-ozone-wayland-96.0.4664.110-r0 on the iMX8M-mini evk.

By just adding the layer and enabling it, it worked but still did not use the GPU.

Could someone please confirm if removing the libEGL.so and libGLESv2.so from ${D}${libdir}/chromium/is the way to go for iMX8?

https://github.com/OSSystems/meta-browser/blob/master/meta-chromium/recipes-browser/chromium/chromium-gn.inc#L455

I'm also confused about the PACKAGECONFIG. Does iMX8 support use-vapi? I tried to enable it but crashed.

| ../libva-2.10.0/va/glx/va_glx.h:29:10: fatal error: GL/glx.h: No such file or directory

How about proprietary-codecs, should I enable it for iMX8?

Did you start the browser with --in-process-gpu flag? IIRC, iMX doesn't support drm render nodes, and, thus cannot use surfaceless path. Instead, it has to use Wayland EGL, which is only available with the flag I mentioned.

munoz0raul commented 2 years ago

Did you start the browser with --in-process-gpu flag?

Hi @msisov, thanks for your quick reply.

I tried with --in-process-gpu as well, see the log below:

chromium --use-gl=egl --ozone-platform=wayland --no-sandbox  --in-process-gpu
[729:784:0119/062355.149187:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[729:784:0119/062355.149425:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[729:729:0119/062355.264350:ERROR:cursor_loader.cc(114)] Failed to load a platform cursor of type kNull
[     1] ioctl(DRM_IOCTL_GEM_CLOSE) failed
[729:757:0119/062355.684474:ERROR:gbm_pixmap_wayland.cc(80)] Cannot create bo with format= BGRA_8888 and usage=SCANOUT
[729:757:0119/062355.684559:ERROR:gpu_memory_buffer_factory_native_pixmap.cc(260)] Failed to create pixmap 1280x1024, BGRA_8888, usage SCANOUT
[     2] ioctl(DRM_IOCTL_GEM_CLOSE) failed
[729:757:0119/062355.684882:ERROR:gbm_pixmap_wayland.cc(80)] Cannot create bo with format= BGRA_8888 and usage=GPU_READ
[729:757:0119/062355.684924:ERROR:gpu_memory_buffer_factory_native_pixmap.cc(260)] Failed to create pixmap 1280x1024, BGRA_8888, usage GPU_READ
[729:757:0119/062355.684949:ERROR:shared_image_backing_factory_gl_image.cc(351)] CreateSharedImage: Failed to create bindable image
[729:757:0119/062355.684971:ERROR:shared_image_factory.cc(584)] CreateSharedImage: could not create backing.
[729:769:0119/062355.685326:ERROR:skia_renderer.cc(647)] Failed to create the promise sk image or get paint ops.
[729:769:0119/062355.685469:ERROR:skia_renderer.cc(647)] Failed to create the promise sk image or get paint ops.
[729:769:0119/062355.685830:ERROR:skia_renderer.cc(647)] Failed to create the promise sk image or get paint ops.
[729:757:0119/062355.685873:ERROR:raster_decoder.cc(1233)]   RasterDecoderImpl: Context lost during MakeCurrent.
[729:769:0119/062355.686395:ERROR:skia_renderer.cc(647)] Failed to create the promise sk image or get paint ops.
[729:769:0119/062355.686560:ERROR:skia_renderer.cc(647)] Failed to create the promise sk image or get paint ops.
[729:769:0119/062355.686596:ERROR:skia_renderer.cc(647)] Failed to create the promise sk image or get paint ops.
[729:769:0119/062355.686624:ERROR:skia_renderer.cc(647)] Failed to create the promise sk image or get paint ops.
[729:769:0119/062355.686686:ERROR:skia_renderer.cc(647)] Failed to create the promise sk image or get paint ops.
[729:769:0119/062355.686738:ERROR:skia_renderer.cc(647)] Failed to create the promise sk image or get paint ops.
[729:769:0119/062355.686788:ERROR:skia_renderer.cc(647)] Failed to create the promise sk image or get paint ops.
[729:769:0119/062355.687272:ERROR:skia_renderer.cc(647)] Failed to create the promise sk image or get paint ops.
[729:769:0119/062355.687342:ERROR:skia_renderer.cc(647)] Failed to create the promise sk image or get paint ops.
[729:769:0119/062355.687367:ERROR:skia_renderer.cc(647)] Failed to create the promise sk image or get paint ops.
[729:769:0119/062355.687427:ERROR:skia_renderer.cc(647)] Failed to create the promise sk image or get paint ops.
[729:769:0119/062355.687576:ERROR:skia_renderer.cc(647)] Failed to create the promise sk image or get paint ops.
[729:769:0119/062355.687620:ERROR:skia_renderer.cc(647)] Failed to create the promise sk image or get paint ops.
[729:769:0119/062355.687645:ERROR:skia_renderer.cc(647)] Failed to create the promise sk image or get paint ops.
[729:769:0119/062355.687667:ERROR:skia_renderer.cc(647)] Failed to create the promise sk image or get paint ops.
[729:757:0119/062355.688242:ERROR:skia_output_surface_impl_on_gpu.cc(1319)] Failed to make current.
[729:757:0119/062355.689424:ERROR:skia_output_surface_impl_on_gpu.cc(1319)] Failed to make current.
[729:757:0119/062355.690645:ERROR:skia_output_surface_impl_on_gpu.cc(1319)] Failed to make current.
[729:757:0119/062355.691329:ERROR:raster_decoder.cc(1233)]   RasterDecoderImpl: Context lost during MakeCurrent.
[729:757:0119/062355.693150:ERROR:shared_image_stub.cc(534)] SharedImageStub: context already lost
[729:757:0119/062355.700890:ERROR:shared_image_stub.cc(534)] SharedImageStub: context already lost
[     3] ioctl(DRM_IOCTL_GEM_CLOSE) failed
[729:757:0119/062355.820723:ERROR:gbm_pixmap_wayland.cc(80)] Cannot create bo with format= BGRA_8888 and usage=SCANOUT
[729:757:0119/062355.820770:ERROR:gpu_memory_buffer_factory_native_pixmap.cc(260)] Failed to create pixmap 1280x1024, BGRA_8888, usage SCANOUT
[     4] ioctl(DRM_IOCTL_GEM_CLOSE) failed
[729:757:0119/062355.821039:ERROR:gbm_pixmap_wayland.cc(80)] Cannot create bo with format= BGRA_8888 and usage=GPU_READ
[729:757:0119/062355.821078:ERROR:gpu_memory_buffer_factory_native_pixmap.cc(260)] Failed to create pixmap 1280x1024, BGRA_8888, usage GPU_READ
[729:757:0119/062355.821104:ERROR:shared_image_backing_factory_gl_image.cc(351)] CreateSharedImage: Failed to create bindable image
[729:757:0119/062355.821125:ERROR:shared_image_factory.cc(584)] CreateSharedImage: could not create backing.
Trace/breakpoint trap

This log is my Yocto build + meta-chromium enabling proprietary-codecs

-PACKAGECONFIG ??= "upower use-egl"
+PACKAGECONFIG ??= "upower use-egl proprietary-codecs"

IIRC, iMX doesn't support drm render nodes, and, thus cannot use surfaceless path. Instead, it has to use Wayland EGL, which is only available with the flag I mentioned.

Didn't understand this comment, is it related to proprietary-codecs or use-vapi? Should I enable or disable it for iMX8M?

msisov commented 2 years ago

looks like there is drm render nodes as it still tries to use dmabuf (see gbm_pixmap_wayland logs), but fails for some reason.

you can explicitly disable that by adding "use_wayland_gbm = false" in your gn args.

Didn't understand this comment, is it related to proprietary-codecs or use-vapi? Should I enable or disable it for iMX8M?

It was related to the hw accelerated compositing.

JeroenHid commented 2 years ago

Hi @JeroenHid, Did you have any progress on that? I'm trying chromium-ozone-wayland-96.0.4664.110-r0 on the iMX8M-mini evk. By just adding the layer and enabling it, it worked but still did not use the GPU. Could someone please confirm if removing the libEGL.so and libGLESv2.so from ${D}${libdir}/chromium/is the way to go for iMX8? https://github.com/OSSystems/meta-browser/blob/master/meta-chromium/recipes-browser/chromium/chromium-gn.inc#L455 I'm also confused about the PACKAGECONFIG. Does iMX8 support use-vapi? I tried to enable it but crashed. | ../libva-2.10.0/va/glx/va_glx.h:29:10: fatal error: GL/glx.h: No such file or directory How about proprietary-codecs, should I enable it for iMX8?

Did you start the browser with --in-process-gpu flag? IIRC, iMX doesn't support drm render nodes, and, thus cannot use surfaceless path. Instead, it has to use Wayland EGL, which is only available with the flag I mentioned.

Hi @msisov ! No, no real progress on this. I was stuck at running Chromium without GPU support. Also, your question "Could someone please confirm if removing the libEGL.so and libGLESv2.so from ${D}${libdir}/chromium/is the way to go for iMX8?" is a good one, I did receive this comment a while ago:

https://github.com/OSSystems/meta-browser/issues/583#issuecomment-964911899 "The issue happend because of the chromiumV94 building generate libEGL.so and libGLESv2.so in /usr/lib/chromium/. You can manually remove these two libraries."

My strategy since a few weeks, was to wait a while for new updates, and try them as I was stuck trying to get Chromium on iMX8 with hw acceleration...