Gnome Wayland works with SDDM but not GDM

Hello, I’m new to EndeavourOS/Arch Linux, so building the desktop environment took a long time and it still doesn’t work well.
The information of my system is here: https://0x0.st/Hsu9.txt

So I chose Gnome as the desktop environment during the image installation, I thought it will be on Wayland mode out of the box as the new version was introduced, but not true for me. I use the command echo $XDG_SESSION_TYPE for a check, and it keeps showing x11, although I tried several solutions including the step 1 and 3 from: https://discovery.endeavouros.com/nvidia/nvidia-optional-enhancements-and-troubleshooting/2021/03/

I also commented out every “dm_disable_wayland” line in the file /usr/lib/udev/rules.d/61-gdm.rules

Following this Arch wiki(https://wiki.archlinux.org/title/NVIDIA/Tips_and_tricks#Preserve_video_memory_after_suspend)
I enabled the nvidia-suspend.service , nvidia-hibernate.service and nvidia-resume.service.
The etc/modprobe.d/nvidia-power-management.conf file has also been created as:
options nvidia NVreg_PreserveVideoMemoryAllocations=1 NVreg_TemporaryFilePath=/var/tmp

But still had no luck, the Gnome keeps working in X11 mode after restarting.
I noticed that the login interface of GDM has no options for Wayland so I installed SDDM for a try, and it just works. There are in total 4 available login sessions including:
Gnome on Wayland(Wayland)
Gnome(Wayland)
Gnome on Xorg
Gnome

Everything works well in the first Wayland session (e.g. fractional scaling), except the suspend state.

I wonder if anybody successfully uses Wayland Gnome together with the image’s default Nvidia driver and GDM? If so, how did you achieve that? I’m especially curious about why SDDM makes Gnome works well under Wayland while GDM fails, Thank you!

This is true.

It’s because of udev rules from gdm package.

You may have not done it right, or missed something.
FWIW, when you want to override default package rules (in /usr/lib/udev/*), you should not edit that file, but copy it at /etc/udev/rules.d/61-gdm.rules (using the same file name), which overrides the package file, and not reset from a package update.
Similarly, you can fully disable all those gdm rules, linking /etc/udev/rules.d/61-gdm.rules to /dev/null.

This is required and should be done OOTB :zipper_mouth_face: .
Have you recreated kernel images after these? Maybe you only need this, and not the rest of the suggestions.

These should also be present in gdm, but obviously disabled from the rules check.
Have you confirmed you have this in /etc/gdm/custom.conf?

WaylandEnable=true

Have you checked this?

Notice that GDM on Wayland will no longer work once /usr/lib/gdm-disable-wayland has run. This is because WaylandEnable=false has been written into /run/gdm/custom.conf, which overrides /etc/gdm/custom.conf. To fix the situation without a reboot, remove /run/gdm/custom.conf and then restart GDM.

2 Likes

Thank you so much for your detailed answer.

Similarly, you can fully disable all those gdm rules, linking /etc/udev/rules.d/61-gdm.rules to /dev/null.

By performing sudo ln -s /dev/null /etc/udev/rules.d/61-gdm.rules
The GDM now works well to start the Gnome on Wayland.

Thank you again!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.