GDM ignores /etc/gdm/custom.conf and default settings when an xorg log file exists and uses X instead of Wayland
System:
I'm using a Lenovo X1 Carbon Gen6 running Arch Linux.
uname -a: Linux clockwerk 5.8.10-arch1-1 #1 SMP PREEMPT Thu, 17 Sep 2020 18:01:06 +0000 x86_64 GNU/Linux
With all packages up to date, when GDM tries to launch an X session, X segfaults. No idea why.
Issue:
If /var/lib/gdm/.local/share/xorg/Xorg.0.log
exists, GDM will always boot with X, or at least initialize X, instead of Wayland.
How to Reproduce:
$ touch /var/lib/gdm/.local/share/xorg/Xorg.0.log
$ reboot
Ignorable Rant:
This was quite an issue to debug...
A few weeks ago GDM stopped launching on start-up until I switched to a different TTY session and back, then it would run perfectly fine. I've been dealing with it ever since, playing with custom.conf
enabling and disabling Wayland & debugging but X would always segfault every time. I spent hours trying to fix that issue but have yet to figure it out. I went to double check my /etc/gdm/custom.conf
and see if just using wayland for the greeter would solve it and noticed that I was currently not disabling Wayland.
So this was still happening even when it was supposed to be running Wayland and should not even be using X, but it would always use X instead. So I switched my focus to investigate why it was using Xorg.
After a couple hours of debugging, I got nowhere. So I decided to move all the files out of /var/lib/gdm/.local/share/xorg/
and start fresh to make sure I wasn't mixing up different reboots and start over.
When I rebooted, GDM started working as intended, and kept working after subsequent reboots. Problem solved! Out of curiosity, I touched /var/lib/gdm/.local/share/xorg/Xorg.0.log
and GDM again would not start on reboot.