Wayland session appears in gdm only after logging in and out after updating to f39 and other weird behavior

So, as it says in the title, I am experiencing some very weird behavior of my system after updating to f39 workstation, which still persists after the next system update. What happens is that when I boot my system the only 2 options I see in gdm are gnome and gnome classic, both of which are x11. When i sign in I therefore end up in x11 session. Sometimes it takes a few attempts to log in (it just returns to the login page without showing my desktop). In order to use wayland i need to log out and only then I see the option to use wayland which becomes selected by default. Also when I live my computer for some time I can end up logged out and without wayland option, although unlike when I boot my system I haven’t been able to reliably reproduce this behavior

I’ve tried to find similar issues on forums, but most of them are either about kde specific bugs or being unable to use wayland session at all. I’ve tried running this command, taken from another thread while in the “forced” x11 session. Here’s the output:

$ sudo dbus-run-session -- gnome-shell --display-server --wayland

dbus-daemon[6182]: [session uid=0 pid=6182] Activating service name='org.gtk.vfs.Daemon' requested by ':1.0' (uid=0 pid=6183 comm="gnome-shell --display-server --wayland" label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")
dbus-daemon[6182]: [session uid=0 pid=6182] Successfully activated service 'org.gtk.vfs.Daemon'
libmutter-Message: 19:01:46.357: Running GNOME Shell (using mutter 45.1) as a Wayland display server
Failed to setup: Could not get session ID: User 0 has no sessions
A connection to the bus can't be made

Also I tried looking through journalctl output, but i’m not familiar with that utility and it is kinda hard to look through 300,000+ lines of logs, also I noticed some errors regarding many things uncluding dbus and nvidia drivers

Nov 20 19:19:43 moon-d kernel: nvidia: loading out-of-tree module taints kernel.
Nov 20 19:19:43 moon-d kernel: nvidia: module license 'NVIDIA' taints kernel.
Nov 20 19:19:43 moon-d kernel: Disabling lock debugging due to kernel taint
Nov 20 19:19:43 moon-d kernel: nvidia: module verification failed: signature and/or required key missing - tainting kernel
Nov 20 19:19:43 moon-d kernel: nvidia: module license taints kernel.
Nov 20 19:19:43 moon-d kernel: nvidia-nvlink: Nvlink Core is being initialized, major device number 234
Nov 20 19:19:43 moon-d kernel: 
Nov 20 19:19:43 moon-d kernel: nvidia 0000:01:00.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=io+mem
Nov 20 19:19:44 moon-d kernel: NVRM: loading NVIDIA UNIX x86_64 Kernel Module  535.129.03  Thu Oct 19 18:56:32 UTC 2023
Nov 20 19:19:44 moon-d (udev-worker)[788]: nvidia: Process '/usr/bin/bash -c '/usr/bin/mknod -Z -m 666 /dev/nvidiactl c $(grep nvidia-frontend /proc/devices | cut -d \  -f 1) 255'' failed with exit code 1.
Nov 20 19:19:44 moon-d (udev-worker)[788]: nvidia: Process '/usr/bin/bash -c 'for i in $(cat /proc/driver/nvidia/gpus/*/information | grep Minor | cut -d \  -f 4); do /usr/bin/mknod -Z -m 666 /dev/nvidia${i} c $(grep nvidia-frontens/*/information | grep Minor | cut -d \  -f 4); do /usr/bin/mknod -Z -m 666 /dev/nvidia${i} c $(grep nvidia-frontend /proc/devices | cut -d \  -f 1) ${i}; done'' failed with exit code 1.
Nov 20 19:19:44 moon-d kernel: nvidia_uvm: module uses symbols nvUvmInterfaceDisableAccessCntr from proprietary module nvidia, inheriting taint.
Nov 20 19:19:44 moon-d kernel: nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms  535.129.03  Thu Oct 19 18:42:12 UTC 2023
Nov 20 19:19:44 moon-d kernel: [drm] [nvidia-drm] [GPU ID 0x00000100] Loading driver

To give some context, I had some problems installing nvidia drivers about 6 month ago: they were running alongside nouveau driver which caused one additional screen to appear in settings, but which wasn’t detected by nvidia control panel. i resolved it by adding a kernel parameter in grub customizer that prevented the second driver from booting (now it is not showing up there for some reason, but everything works). other then that i didn’t make any changes to kernel or base system.

Speaking about my current issues, I tried to enable developer mode in gdm config to get more logs from it. After editing config and restarting I got something that I have never seen before in fedora

First this appeared on the second screen, then on the main one, but I cold still use the os more or less fine on the second screen and bring activities view on both. Also, looking into the screenshot utility this error existed in 2 instances

Also, I didn’t get any logs in gdm in /var/log/gdm

I would much appreciate any help troubleshooting this as I just don’t have any ideas left. I use linux for less then a year, so I don’t really know if the info i provided was useful, so if not, or if you need more, I will happily give it

System specs:

Hardware Information:
- Hardware Model: Gigabyte Technology Co., Ltd. Z390 AORUS MASTER
- Memory: 32.0 GiB
- Processor: Intel® Core™ i9-9900KF × 16
- Graphics: NVIDIA GeForce RTX™ 2080 SUPER
- Disk Capacity: 3.5 TB

Software Information:
- Firmware Version: F10
- OS Name: Fedora Linux 39 (Workstation Edition)
- OS Type: 64-bit
- GNOME Version: 45.1 (this part for some reason was missing from the settings app this boot)
- Windowing System: Wayland
- Kernel Version: Linux 6.5.11-300.fc39.x86_64

GDM logs to the journal. You can try journalctl -b -u gdm and journalctl -b _UID=42.

The latter shows logs from the GDM greeter session (for the current boot), which may be where your problem is occurring. If the GNOME Shell instance running the greeter session fails to start in Wayland mode, it’ll fall back to X11 and you’ll only get X11 sessions to choose from.

Look for a crash following this line:

Running GNOME Shell (using mutter 45.1) as a Wayland display server

If you find something, it may also be helpful to look at the full unfiltered journal (journalctl -b) around that timestamp.

I have the same problem I though It was solved for me but it’s not so here it’s my journalctl -b _UID=42

CPU: AMD Ryzen 3 3200G
Kernel: 6.6.3-200.fc39.x86_64 x86_64
RAM: 16 GiB
GPU: Nvidia GTX 1660ti
Nvidia drivers: from RPM Fusion’s akmod-nvidia 545.29.06
ALSO Dual screen setup


dic 05 02:24:19 workstation1 gnome-session[1500]: gnome-session-binary[1500]: WARNING: Application ‘org.gnome.Shell.desktop’ killed by signal 9

Do you see anything in the full journal at that timestamp?

I don’t know if I have the skills to recognize an error in gdm, I will continue to look into the log, but I don’t see any other errors. Here is a log from the point gdm starts until it switches to Xorg. I enabled debug for gdm.

In this log the “killed by signal 9” is at the dic 06 17:21:35 timestamp. So you dont have too look it up.

Here is the crashlog

Also I don’t know if this is related but I’m on tty1 and if I do loginctl it only shows 1 session on tty2 and the variable $XDG_SESSION_ID is always unset.

I switched to SDDM and it does seem to be stable with displaying the Gnome Wayland option but I still get some weird behavior, also It doesn’t log me in first try, I have to attempt like 2 or 3 times before it lets me in.

That makes sense. GDM uses GNOME Shell for its greeter session. If that fails, it reverts to X11 and doesn’t offer Wayland sessions. The GNOME session started from SDDM is probably failing for the same reason as the GDM greeter session, whatever that reason is.

If you check your logs when login from SDDM fails, do you see a similar message about gnome-shell being killed?

That log except is unfiltered? e.g. journalctl -b? I don’t know what’s killing the gnome-shell process. I thought maybe the OOM killer or systemd-oomd, but that should be logged in either case.

It could have something to do with rtkit. Apparently realtime processes can be SIGKILLed by the kernel if they are unresponsive. There’s a similar issue reported here, but it seems to only affect amdgpu, and it happens when the screen is locked.

It might be worth opening a new bug against mutter upstream.

Yes, I think it’s unfiltered, It was journalctl -b 0 --since "timestamp" On a good note I’m finally going to be able to contribute on some way to Linux. I figure It’s not a Fedora problem but a Gnome problem. But hey, I’ll figure how to open a bug report. I would absolutely love to be able to contribute as a kernel dev or to Gnome, KDE or Cosmic. But I guess for now bug reporting is good enough. Thanks for your help.