Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
logout leaves running user processes #2975
NOTE: Do not submit anything other than bug reports or RFEs via the issue tracker!
systemd version the issue has been seen with
NOTE: Do not submit bug reports about anything but the two most recently released systemd versions upstream!
In case of bug report: Expected behaviour you didn't see
In case of bug report: Unexpected behaviour you saw
In case of bug report: Steps to reproduce the problem
After, for instance, running and exiting from KDE, there is:
$ ps lU 1000
Next, with no other sessions, run "exit" or "logout" from the virtual terminal. Then log in again, and run:
$ ps lU 1000
Note that bash, pulseaudio, /usr/lib/pulse/gconf-helper, and ps were terminated, but that all the other processes remain across logout.
Try killing "systemd --user":
Then log out and log in:
Note that "gpg-agent" is still running, but now, "systemd --user" has not been re-started. And, for instance, KDE will not run at all. "login" has failed to produce a working user session.
Try killing "gpg-agent", log out, and log in:
$ ps lU 1000
This appears to be back to "normal".
Some of these "lurking" processes can cause subsequent problems when other programs are run, in particular, when re-running KDE.
Possibly, this is a problem with systemd-logind, but whatever, systemd needs to "clean-up" after user log-out.
Ah! Thanks for that.
Hmm - well then, I have to say, it seems that "KillUserProcesses=" should default to "yes", since there is a lot of cruft that can accumulate, and there is a simple "KillExcludeUsers=" that can be applied to force exclusions when needed. For instance, starting and then exiting from KDE, there are a dozen GNOME and other services left running, which are ''not'' killed on logout. Further, the original "/usr/lib/systemd/systemd --user", when left running, can have strange interactions with KDE, which, then, cannot be cured by a simple log-out and log-in. A naive user would be forced to reboot the machine to restore state.
Well, KillUserProcesses= breaks "tmux" and "screen" which makes this political to turn on by default. But yes, I think we should turn it on by default.
Related is the discussion in #3005 where it currently is being discussed whether we should be more agressive there in the future.
Anyway, closing this one here, let's continue in #3005.