EGL applications no longer work under Wayland on X on new NVIDIA drivers

I need to be able to use a Wayland environment to test some features of my app on it, and I usually use kwin_wayland or Weston to open a Wayland screen on top of my native X11 desktop. Previously, I was able to do this just fine, but since updating to the NVIDIA 495.44 drivers, my app freezes when trying to render the window. I believe this may be due to some issue with EGL, since most other Weston applications work under Weston, but the EGL test does not, and my app (which uses SDL2) uses EGL as well.

Here is what is working for me:

  • Running Weston in a window
  • Running kwin_wayland in a window
  • weston-terminal, weston-flower, weston-editor, etc.

Here is what is not working (freezes on launch):

  • Running my (EGL) app
  • Running weston-simple-egl

This is the backtrace when running weston-simple-egl:

#0  0x00007ffff7d30b2f in poll () from /usr/lib/
#1  0x00007ffff7f8af26 in wl_display_dispatch_queue () from /usr/lib/
#2  0x00007ffff7faf58d in ?? () from /usr/lib/
#3  0x00007ffff787cd0e in ?? () from /usr/lib/
#4  0x00007ffff781c9c0 in ?? () from /usr/lib/
#5  0x0000555555557c86 in ?? ()
#6  0x00007ffff7c64b25 in __libc_start_main () from /usr/lib/
#7  0x0000555555557ffe in ?? ()

It appears something in wl_display_dispatch_queue is getting stuck after being called from the NVIDIA EGL library for Wayland, and the call never ends up exiting, locking up the program. This is the case when I run my app too. I’m not sure what’s causing it since I don’t have any symbols for the NVIDIA files.

This issue only started appearing after updating to the 495.44 drivers. I was able to use everything just fine on the previous 470 drivers.

I’m using the latest Manjaro unstable packages, with an NVIDIA GeForce GTX 970 and the latest proprietary drivers on Linux 5.15. Since this does have to do with the proprietary drivers, I’m not sure whether this is something anyone but NVIDIA can fix, so please let me know if I should message them instead.

Is it a problem to just use the earlier series?
I have no idea about nvidia support for your card - but the chances are high that it is poor. That likelihood just skyrockets with time.

You can use mhwd or MSM (gui) to make this change this rather easily: