NVIDIA and Wayland on Fedora 37

Posted on .

Starting with Fedora 36 it’s been possible to run Gnome using Wayland on NVIDIA cards. The experience was not perfect. Some programs, like the mpv media player, had notable display issues and had to be forced to launch in X11 mode, using XWayland. However, the experience has been improving steadily and with Fedora 37 I haven’t found any major drawbacks to running Wayland on my NVIDIA system. Notably, even Firefox works using Wayland, and WebGL apps or Google Maps run in hardware acceleration mode.

Desktop recording of Gnome running Firefox on Wayland with an NVIDIA GTX 1070 card

Recent versions of mpv no longer display a black screen when running on NVIDIA cards, and I haven’t found any issues with other apps, but your mileage may vary. If you have an NVIDIA card and are interested in running Wayland, give it a try: it may simply work. Yes, the path to get here hasn’t been easy, and the GBM vs EGLStreams situation was and is a pity. Still, however we arrived to the present day, what’s important is that we’re here and we have what we have.

If you find any issues running some applications in Wayland mode, you can try running them on X11 instead to see if that fixes the problem. The mechanism to do so varies a bit by application and toolkit. For example, for mpv you could use --gpu-context=x11 or stick the option in the config file. For some Qt apps like KeePassXC you can run them with export QT_QPA_PLATFORM=xcb. Chromium-based browsers do not respect the “large text” accessibility option in Gnome, which changes screen scaling, and need to be run in X11 mode if you use that option (Google Chrome does that by default, but chromium-freeworld from RPM Fusion tries to use Wayland by default). For them, you can unset WAYLAND_DISPLAY and export XDG_SESSION_TYPE=x11. This last mechanism is pretty generic and may work for other apps as well.

Note: as for the NVIDIA drivers, I’m running the RPM Fusion packages for convenience and because it’s the easiest way. The only notable problem I have is the need to reinstall those packages when I upgrade Fedora versions, like when I jumped from Fedora 36 to 37.

Despite these recent improvements, it’s likely I’ll switch to an AMD GPU and CPU for my next desktop computer. Both my current CPU (i7-4770k) and GPU (GTX 1070) are already a bit dated and I expect less issues running Linux if I switch to an all-AMD system. The gaming experience on Windows may not be as good, I’m not sure, but I spend most on my time on Linux so I prefer to have a better-supported system there with open source drivers.

Load comments