Cannot log out of Plasma 6 X11 session when using Display manager

TL;DR: Plasma 6 never actually logs out when any display manager is used, from startx it logs out successfully. How fix?

Hi there.

First of all I want to start off by saying that I am using the X11 session because I have a pre-20 series nvidia card, so wayland is buggy as hell. The wayland session does somehow successfully logs out, but the X11 session never logs out successfully.

When I do try to log out all of the plasma desktop parts, including the wallpaper, do get killed but the windows still remain there and I can see that kwin is still alive. I needed to restart display-manager.service from a terminal if I hopefully had one open in my session. My first thought was to try to use startx to read any error messages that popup, so I enabled startx and on reboot i stopped display-manager.service and started plasma with startx, however that did successfully log out. I thought it magically fixed itself, I started display-manager again, logged in, tried to log out from there and it did not work. I stopped display-manager and tried startx again and then I could not logout of a session even started by startx.

Now the reason I say display-manager.service instead of the specific display manager I use it’s because this happens with any display manager. I have tried sddm, gdm and lightdm and all of them have this very same issue.

Now back onto the startx not being able to logout. After killing plasma with a few kill commands, I have noticed that systemd-logind was receiving a bunch of pauses like

(II) systemd-logind: got pause for 13:64
(II) systemd-logind: got pause for 13:75
(II) systemd-logind: got resume for 13:64
(II) systemd-logind: got pause for 13:64
(II) systemd-logind: got resume for 13:75
(II) systemd-logind: got pause for 13:75
(II) systemd-logind: got pause for 13:81

but the output was a bit more messed up in the TTY, and journalctl returns the fact that Dr Konqi was receiving a lot of crashes after attempting to logout, including Dr Konqi itself, kwin, chromium for some reason and more. I have seen something that the pauses might be due to race conditions in dbus but when i checked the active processes with ps aux and grepped for dbus during the failed logout as I still had a terminal window open, there was only one dbus process that had the --session flag, which I guess it is not the problem here. Sometimes there did happen to be 2 but I can guess that was caused by my repeated attempts to kill kwin as it was being restarted and not quitting the session.

Logging out from X11 works all right on my arch installation, so I am truly lost as to what might be wrong here. Any ideas? Please and thank you.

I’m affected by the very same problem on Fedora 40 with X11 and sddm. Found this thread when searching online for the issue.

It only started happening recently, but I didn’t pay enough attention to it initially so can’t reliably link it to a specific update. I’m currently on KDE Plasma 6.0.5. Wayland works fine but I’ve been using X11 due to some annoying bugs under Wayland every time I tried.

The issue has been fixed as of my update to Plasma 6.1.

I retract my words I had wayland session accidentally selected. It now just does nothing.

How did you update to plasma 6.1? I last rebuilt my system today, but haven’t seen any plasma updates yet (though I know they’re in the hydra CI pipeline).

I run on unstable I updated yesterday the moment ive seen systemsettings is version 6.1 . I’ll just use wayland from now in since explicit sync is here.

That’s pretty wild. I’m using flakes with nixpkgs.url set to unstable, and yet when I look at system settings, I see Plasma 6.0.5.

I though this kind of “works for thee but not for me” thing was supposed to be a nonissue in Nix/NixOS?

that’s generally the case, I have an external monitor and when laptop lid closes plasma with wayland goes to sleep whereas x11 stays fine. I created a new user and for that new user wayland works fine with external monitor with lid closed. Tried all kinds of cache clearing etc. but to no avail. It also worked with my existing user if I disable sddm and use something else like greetd.tuigreet.

Nixos was never bug to bug reproducible, especially for something as complex as wayland.

Did you also run nix flake update along with rebuild? Because search.nixos.org clearly states systemsettings is 6.1

Yeah I was just going to reply this. I have a script that just runs what’s needed and the nix flake update command somehow disappeared from it. It’s fixed now, and plasma 6.1 is running on Wayland :slight_smile: