Comment 11 for bug 1967488

Revision history for this message
Alessandro Astone (aleasto) wrote :

Interestingly enough, the Chromium snap behaves differently with nvidia 535 and 550.
- With 535 you see the description of this bug report, i.e. chromium renders transparently.
- When 550 the chromium rendering process segfaults, and after crashing 3 times a fall back mechanism kicks in to use software rendering, so you only get a transparent window for a couple of seconds and then it starts "working".

Debugging shows that neither snap-confine nor the gnome extension are ready for nvidia on wayland.
They're missing some libraries (ex: libnvidia-allocator.so, libnvidia-egl-gbm.so, gbm/nvidia-drm_gbm.so) and config files pointing to the relevant libraries (ex: /usr/share/egl/egl_external_platform.d/*), as well as environment variables that point to the relevant directories in the confined environment (ex: $GBM_BACKENDS_PATH, $__EGL_EXTERNAL_PLATFORM_CONFIG_DIRS).

Even with those pieces in place, I couldn't get chromium to work hardware accelerated (with mixed results in `eglinfo` too).

It is very important to note that by default chromium is using X11 through XWayland.
If we switch the default (--ozone-platform=wayland), chromium immediately falls back to software rendering, thus mitigating the transparent window bug.

However if I now force GLVND to only consider nvidia and ignore mesa with $__EGL_VENDOR_LIBRARY_FILENAMES (together with some of the other fixes from the above paragraph), then `chromium --ozone-platform=wayland` is hardware accelerated! This suggests a bug in GLVND from core22 in my opinion: needs further investigation.