My current system
OS | Ubuntu 24.04.2 LTS
Kernel | Linux 6.14.0-24-generic
NVIDIA Driver version | 575-open
libnvidia-egl-wayland1 Installed version | 1:1.1.13-1build1
Gnome version | 46
The problem
After updating the NVIDIA driver it is detected correctly in X11 sessions, but not in Wayland session (Mesa llvmpipe is used instead).
Analysis
Under Wayland, nvidia-smi works correctly, and the command eglinfo -B shows (together with other things), something like:
> eglinfo -B
[...]
Wayland platform:
libEGL warning: egl: failed to create dri2 screen
EGL API version: 1.5
EGL vendor string: Mesa Project
EGL version string: 1.5
EGL client APIs: OpenGL OpenGL_ES
OpenGL core profile vendor: Mesa
OpenGL core profile renderer: llvmpipe (LLVM 19.1.1, 256 bits)
[...]
POSSIBLE SOLUTION. The solution is most likely related to the package libnvidia-egl-wayland1 being outdated (version 1:1.1.13-1build).
PROOF. Clone the repo GitHub - NVIDIA/egl-wayland: The EGLStream-based Wayland external platform and build the library locally, until you have your libnvidia-egl-wayland.so.1 in a local folder NVIDIA_EGL_WAYLAND_FULL_PATH. Now try: LD_PRELOAD="$NVIDIA_EGL_WAYLAND_FULL_PATH/libnvidia-egl-wayland.so.1" eglinfo -B
. It should display (together with other things), something like:
> LD_PRELOAD="$NVIDIA_EGL_WAYLAND_FULL_PATH/libnvidia-egl-wayland.so.1" eglinfo -B
[...]
Wayland platform:
EGL API version: 1.5
EGL vendor string: NVIDIA
EGL version string: 1.5
EGL client APIs: OpenGL_ES OpenGL
OpenGL core profile vendor: NVIDIA Corporation
[...]
So, even if I’m not 100% sure about it, I think that the version of libnvidia-egl-wayland1 in the Ubuntu repository (1:1.1.13-1build) is outdated (but if I try to uninstall it, it makes me uninstall the whole NVIDIA driver).
However, I think that if this analysis is correct, 90% of Ubuntu users should have the same problem, so I guess it’s more realistic to think that I messed up something in my system, or not?
I posted this on the nvidia egl-wayland repository too (Is there a list of NVIDIA drivers supported by each egl-wayland version? · Issue #175 · NVIDIA/egl-wayland · GitHub).