Wayland/modesetting on Nvidia

With the latest Nvidia drivers it seems that modesetting and Wayland work fine for Gnome and GDM.

Console text is still a normal console, but upon boot you get the native screen resolution in Plymouth and then you can login under both X.org and Wayland sessions.


How to test? Make sure that you have the following line enabled for the nvidia-drm module:

# cat /usr/lib/modprobe.d/nvidia.conf | grep drm
options nvidia-drm modeset=1

And then make sure to comment out the following line in the udev rules supplied by GDM:

# cat /usr/lib/udev/rules.d/61-gdm.rules | grep -i nvidia
# disable Wayland when using the proprietary nvidia driver
#DRIVER=="nvidia", RUN+="/usr/libexec/gdm-disable-wayland"

Then reboot, and you will login with a Wayland session by default:

# cat /sys/module/nvidia_drm/parameters/modeset 
# cat /sys/module/nvidia_drm/version 
$ lsmod | grep nvidia
nvidia_drm             57344  4
nvidia_modeset       1187840  3 nvidia_drm
nvidia_uvm           1130496  0
nvidia              19726336  208 nvidia_uvm,nvidia_modeset
drm_kms_helper        249856  1 nvidia_drm
drm                   618496  7 drm_kms_helper,nvidia_drm
$ env | grep XDG_SESSION_TYPE
$ lspci | grep -i vga
01:00.0 VGA compatible controller: NVIDIA Corporation GP106 [GeForce GTX 1060 6GB] (rev a1)

10 thoughts to “Wayland/modesetting on Nvidia”

  1. It is working here, but display gets totally corrupted when resuming from suspend (F32, latest driver, running on my good old GTX 750 Ti). Anyone else experiencing this?

      1. Thanks for confirming that. Do you know if this is a general driver issue, or is it specific to Wayland / modesetting?

  2. Interesting. We are slowly getting towards the point that Wayland becomes usable also with Nvidia driver. I’ve tried this in the past and it has also previously occasionally worked. Currently Wayland is no good for me due to firefox (firefox-wayland) only showing a black screen and nvidia-settings doesn’t work at all, either.

    1. Fixed the Firefox black screen by doing a reset of Firefox. Now I need to figure out if there is a way to run wine/proton games without getting a grey screen. Still need a way to toggle refresh rate also for the buggy monitor of mine (when nvidia-settings isn’t working).

        1. I noticed in a native game that offers a pre-configuration that the display selection was missing my display. The game starts to black screen and is unplayable. Another native game has a Vulkan error and won’t start. This would of course also hit Proton and Wine. Probably other issues as well.

          So there’s definitely stuff still going on with Nvidia and Wayland before its usable for everything. Really great that its working as well as it does. I did start one older game that uses Wine and it worked fine so it doesn’t seem like its that far away.

          1. So it seems that the issue is sdl related and has been a problem for everyone who uses Wayland. There might be other issues as well but example “LD_PRELOAD=”/usr/lib64/libSDL2.so:/usr/lib/libSDL2.so:$LD_PRELOAD” SDL_VIDEODRIVER=x11 %command%” people tend to use that to play Steam games. It didn’t fix anything for me.

            Looks like a real mess there.

Leave a Reply