The NVIDIA driver provides support for Wayland, but it comes with certain limitations. For the best experience, it’s recommended to use the 495-series driver or a newer version. Older iterations only offer Wayland support through an NVIDIA-specific API, which isn’t universally compatible with all desktop environments and tends to be less reliable.
Furthermore, the NVIDIA driver lacks support for accelerating XWayland applications in the current stable Debian versions. This means that if you attempt to run an Xorg-only application on your NVIDIA Wayland desktop, especially in cases such as proprietary video games, they’ll be constrained to rendering on the CPU without harnessing GPU acceleration, leading to significantly reduced performance. Although patches have been incorporated to address this issue, this support will only become available in Debian 12/Bookworm.
In terms of desktop-specific support, GNOME does offer NVIDIA Wayland sessions in both Debian 10 and Debian 11, though their support is referred to as “preliminary.” As for KDE Plasma, it extends support for NVIDIA Wayland sessions starting from Debian 11, although it requires additional configurations and generally isn’t the recommended choice. For the most up-to-date information, please consult the Wayland section of the Debian KDE wiki page at Debian KDE Wiki.
With Debian 12/Bookworm, it’s expected that nearly all issues will be resolved, and most Wayland sessions should function seamlessly with the 525-series driver.
On GNOME desktops, even when utilizing the correct NVIDIA driver, it’s possible that the greeter (GDM3) may not offer the option to start a Wayland session. This could be due to kernel modesetting not being enabled or the absence of hibernate/suspend/resume helper scripts on your system.
To enable kernel modesetting with the NVIDIA driver:
# echo 'GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX nvidia-drm.modeset=1"' > /etc/default/grub.d/nvidia-modeset.cfg
# update-grub
For the installation of hibernate/suspend/resume helper scripts:
# cp /usr/share/doc/xserver-xorg-video-nvidia/examples/nvidia-sleep.sh /usr/bin
# cp /usr/share/doc/xserver-xorg-video-nvidia/examples/system-sleep/nvidia /usr/lib/systemd/system-sleep
# cp /usr/share/doc/xserver-xorg-video-nvidia/examples/system/nvidia-* /etc/systemd/system/
# systemctl daemon-reload && systemctl enable nvidia-hibernate nvidia-resume nvidia-suspend
# echo "options nvidia NVreg_PreserveVideoMemoryAllocations=1" > /etc/modprobe.d/nvidia-power-management.conf
Following these adjustments, reboot your system, and the GNOME greeter should initiate new sessions under Wayland as the default setting.
If still not working, please try
ln -s /dev/null /etc/udev/rules.d/61-gdm.rules