Package: gdm3 Followup-For: Bug #1008296 Poking the internet around wayland and nvidia, I found that gdm3 is set up to deactivate wayland if it finds nvidia is available but not fully configured. This is why gdm does not show the Wayland option for the Gnome session. It has deliberately been disabled.
The logic for the disabling lies in /lib/udev/rules.d/61-gdm.rules as already discussed in this bug. Sending it to /dev/null is not a great workaround, I think. Weiwen Hu identified a small patch to disable the disabling, so 61-gdm.rules is read, but doesn't disable wayland. But that skips some of the nvidia checks. Inspecting the checks themselves, /lib/udev/rules.d/61-gdm.rules is looking for capabilities set in /proc/driver/nvidia/params, as well as suspend/hibernate support. Reporting the checks in order (the variables checked are the entries in /proc/driver/nvidia/params), 1) NVIDIA_ENABLE_S0IX_POWER_MANAGEMENT This one seems not crucial. If your card has it, then the other checks are not needed. But it's not needed itself, it just makes power management simpler if it is available. 2) suspend/hiberate support via scripts /usr/bin/nvidia-sleep.sh /usr/lib/systemd/system-sleep/nvidia These are provided by nvidia-suspend-common, so you'll already have them if you're using the debian nvidia packages. 3) NVIDIA_PRESERVE_VIDEO_MEMORY_ALLOCATIONS This was not activated on my system. I had to activate it in /etc/modprobe.d/nvidia-options.conf with options nvidia-current NVreg_PreserveVideoMemoryAllocations=1 (i.e. uncommenting the line already in the file) 4) systemctl is-enabled nvidia-hibernate systemctl is-enabled nvidia-resume systemctl is-enabled nvidia-suspend These were already enabled on my system, no other action needed (except perhaps kernel option nvidia_drm_modeset=1) 5) gdm_hybrid_graphics_check_end gdm_virt_passthrough_check_end gdm_virt_multi_gpu_check_end Perhaps these tests are relevant to more complex installations (virtual GPUs). They test /run/udev/gdm-machine-has-* scripts. The debian package isn't providing them so these tests jump past gdm_disable_wayland (they don't cause the disbling) So the main action I needed to take was to set the driver option NVreg_PreserveVideoMemoryAllocations=1 to get NVIDIA_PRESERVE_VIDEO_MEMORY_ALLOCATIONS defined. Looks like modesetting should also be activated. These can both be done in /etc/modprobe.d/nvidia-options.conf options nvidia-current NVreg_PreserveVideoMemoryAllocations=1 options nvidia_drm modeset=1 For hibernation, Archlinux also suggests setting the tmp path to a location with enough space to hold the GPU memory, see https://wiki.archlinux.org/title/NVIDIA/Tips_and_tricks#Preserve_video_memory_after_suspend e.g. options nvidia-current NVreg_TemporaryFilePath=/var/tmp There is some chatter on the internet about activating nvidia_drm option fbdev=1, but we don't currently need it since it's not supported in our current 545 driver version, and might be set by default in the future versions anyway, see https://forums.developer.nvidia.com/t/555-release-feedback-discussion/293652/14 https://forums.developer.nvidia.com/t/drm-fbdev-wayland-presentation-support-with-linux-kernel-6-11-and-above/307920/11 After setting NVreg_PreserveVideoMemoryAllocations=1 (and nvidia_drm modeset=1), gdm3 gives me access to a wayland Gnome session, with the nvidia driver accessible via PRIME OFFLOADING (i.e. __NV_PRIME_RENDER_OFFLOAD=1) https://wiki.archlinux.org/title/PRIME#PRIME_render_offload https://gitlab.archlinux.org/archlinux/packaging/packages/nvidia-prime/-/blob/main/prime-run?ref_type=heads Framerate with glxinfo (with __GL_SYNC_TO_VBLANK=0, see https://stackoverflow.com/questions/17196117/disable-vertical-sync-for-glxgears) seems extremely poor (100 to 10 fps instead of 7000 fps0. Hopefully it's fixed in the coming 550/560 drivers. That said, the real world performance (tested in wine, Ctrl-r in World of Warcraft) is fine for me (30-50 fps). Thank you to ArchLinux for good documentation around the issue of using Nvidia cards with linux. -- System Information: Architecture: amd64 (x86_64) Kernel: Linux 6.12.17-amd64 (SMP w/8 CPU threads; PREEMPT) ii gnome-shell 48~beta-4 ii gnome-session [x-session-manager] 47.0.1-1 ii gnome-session-xsession [x-session-manager] 47.0.1-1 ii xserver-xorg 1:7.7+24 -- debconf information: gdm3/daemon_name: /usr/sbin/gdm3 * shared/default-x-display-manager: gdm3