KDE login randomly fails

Hi,
I’m running F41 Kinoite, I’m experiencing an issue where the desktop fails to load on about 75% of cold boots.
The system boots to SDDM, I enter my password and log in, but the screen displays a blinking cursor in the top left. TTY access is still possible.
I’m not sure what the root cause is, but based on the logs it seems to be related to the graphics driver?
I am running the latest 565.77 NVIDIA driver from RPMFusion.
On a failed login, the following messages are repeated in the journalctl log:

kwin_wayland: No backend specified, automatically choosing drm
kwin_wayland: kwin_core: Failed to open /dev/dri/card1 device (Device or resource busy)
kwin_wayland: kwin_wayland_drm: failed to open drm device at "/dev/dri/card1"
kwin_wayland: kwin_wayland_drm: No suitable DRM devices have been found

Finally, there’s a cascade of core KDE services crashing:

systemd-coredump: [🡕] Process 2010 (kcminit_startup) of user 1000 dumped core.
systemd-coredump: [🡕] Process 2183 (kded6) of user 1000 dumped core.
systemd-coredump: [🡕] Process 2177 (ksmserver) of user 1000 dumped core.
...

As mentioned login still works about 25% of the time at random. Please let me know if there’s anything I can provide or investigate at to try and fix this?

Looks like you are having an issue with the NVIDIA driver on your system. There isn’t much we can do here, you will have to report that to NVIDIA. I don’t know where the best place to do that is.

It sounds similar to Gnome does not allow login but I wasn’t able to get a log when that happened.

The only thing that seemingly fixes that for me is using Legacy/CSM boot instead of UEFI.

1 Like

Thank you both for your responses.
I use a piece of game streaming (screen mirroring) software called “sunshine”.
I dug a little bit further into the log, I noticed that amongst the logs, sunshine was also reporting a similar error trying to access /dev/dri/card1.
I had it configured to start up at login using systemctl --user, after disabling it I was able to reboot and log in a few times in a row.
At this stage it looks like this was causing a race condition between sunshine and kwin, I’ll report it upstream to the sunshine developers.
I’m not sure if there’s any way of preventing this situation in future aside from adding a simple delay to the sunshine user service.

If a race condition exists and you are using a systemd .service file to launch the app then it is quite possible to identify the conflicting app and modify the service file to specify the order in which those apps are started.

A service file often has a WantedBy or After option for the other apps so systemd will wait for the proper timing to launch the service. You can see this by looking in many different .service files located in /usr/lib/systemd/system/ and doing a grep for ‘After’ or ‘WantedBy’. Simply edit the .service file and cause it to wait until After the conflicting app/service is started. Possibly as simple as the graphical.target