When NVreg_PreserveVideoMemoryAllocations in modeprobe.d is set to 0, gdm will disable wayland in /lib/udev/rules.d/61-gdm.rules, therefore x11-drivers/nvidia-drivers should set it to 1 when emerged with the "wayland" USE-flag. Reproducible: Always Steps to Reproduce: 1. install x11-drivers/nvidia-drivers and gnome-base/gdm with "wayland" USE-flag 2. try to open a Wayland session 3. Actual Results: Wayland sessions are not available from gdm when using the nvidia proprietary driver. Expected Results: Possibility to open wayland sessions from gdm when using the nvidia proprietary driver. Related bug: https://bugs.gentoo.org/873154
This has been known to cause issues with elogind for several users (partly due to lack of nvidia hooks) and not convinced I want to unexpectedly turn this back on at the moment even with USE=wayland (perhaps not even using wayland) -- doesn't help that I don't have a proper setup to test this at the moment (maybe if had some feedback). Would rather leave it up to users to edit their nvidia.conf as they see fit. Regardless of if that'd be good or not, that gdm is checking sleep-related stuff to enable wayland makes little sense to me -- this is just adding obscure ways in which wayland will be disabled based on how users setup sleep features.
(In reply to Ionen Wolkens from comment #1) > Would rather leave it up to users to edit their nvidia.conf as they see fit. In this case I would at least add an explaining elog entry into pkg_postinst() to make people aware of this issue, since enabling the "wayland" USE-flag alone would not be enough for starting Wayland sessions with this driver.
(In reply to Thomas Scheiblauer from comment #2) > In this case I would at least add an explaining elog entry into > pkg_postinst() to make people aware of this issue, since enabling the > "wayland" USE-flag alone would not be enough for starting Wayland sessions > with this driver. I consider this to be a gdm issue more than a nvidia-drivers issue, and I think gdm should be the one to do something about it.
(In reply to Ionen Wolkens from comment #3) > (In reply to Thomas Scheiblauer from comment #2) > > In this case I would at least add an explaining elog entry into > > pkg_postinst() to make people aware of this issue, since enabling the > > "wayland" USE-flag alone would not be enough for starting Wayland sessions > > with this driver. > I consider this to be a gdm issue more than a nvidia-drivers issue, and I > think gdm should be the one to do something about it. As a reminder, this is entirely gdm-specific, this doesn't stop you from using wayland with e.g. sddm+plasma, sway, etc... And I'm not quite sure why it wants to disable wayland based on sleep settings.
I upgraded to gdm-43.0 today and also got my Wayland session unavailable. I'm glad I found those two reported bugs. I had to change the lookup path for "system-sleep/nvidia" and set NVIDIA_PRESERVE_VIDEO_MEMORY_ALLOCATIONS variable to 1. But found another problem. ``` IMPORT{program}="/bin/sh -c 'echo NVIDIA_HIBERNATE=`systemctl is-enabled nvidia-hibernate`'" ENV{NVIDIA_HIBERNATE}!="enabled", GOTO="gdm_disable_wayland" IMPORT{program}="/bin/sh -c 'echo NVIDIA_RESUME=`systemctl is-enabled nvidia-resume`'" ENV{NVIDIA_RESUME}!="enabled", GOTO="gdm_disable_wayland" IMPORT{program}="/bin/sh -c 'echo NVIDIA_SUSPEND=`systemctl is-enabled nvidia-suspend`'" ENV{NVIDIA_SUSPEND}!="enabled", GOTO="gdm_disable_wayland" ``` These lines in the rules file (right after the one with MEMORY_ALLOCATIONS check) basically disable Wayland session for anyone with the OpenRC system since there isn't a systemctl utility. I had to comment out these lines to enable the Wayland session again.
It seems the setting is here to avoid problems like: https://gitlab.gnome.org/GNOME/mutter/-/issues/1942 https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3583
(In reply to Pacho Ramos from comment #6) > It seems the setting is here to avoid problems like: *needed