Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
systemd --user: start a new systemd.special(7) target when we have no more login-sessions #2900
systemd version the issue has been seen with
any (original reports were on Arch and Gentoo)
With the traditional X11-login-session-centric setup for D-Bus, terminating a GUI session would terminate the X server, resulting in dbus-launch being disconnected. dbus-launch kills the session dbus-daemon, and all (well-behaved) session services exit.
With the move to an optional user-session-centric D-Bus setup, the transition from 1 to 0 parallel login sessions no longer terminates services like evolution-data-server. Similarly, systemd user services that do not communicate via D-Bus (for example gpg-agent, ssh-agent) will not terminate until the
This can be addressed system-wide by using
My suggestion is to add a new user systemd.special(7) target, perhaps
I don't particularly want the per-user
However, system integrators could easily give dbus (or any other user service)
I am not sure I follow. Note that user@.service is already reference counted by the login sessions around. i.e. it is started before the first user session of a specific user is created, and stopped when the last user session ends. I don't follow why that behaviour is not sufficient?
After reading the PR, my first thought was that services should watch the number of concurrent logins themselves. This certainly can be done using
Yeah, that'd work. Maybe we'd want to call that
I never experienced the same issue as the downstream reporters myself (see downstream bug references above). I've asked them for more information to try to determine what's going on: whether the login-sessions are not ending because they contain surviving process ("closing" state), or whether the user-session is lingering, or what.
Sure, that sounds like a better name. I'm happy for the bike shed to be any colour as long as it keeps the rain off the bikes :-)
Is there a reason why this is already closed? Your comment doesn't sound as though this is either "won't fix" or already implemented?
I have replied to the question at:
In summary, in the attachment we uploaded to Gentoo bugzilla, https://577416.bugs.gentoo.org/attachment.cgi?id=428490 ,you can see the systemd-cgls output just after logging out from a Gnome 3.18 session. With user-session disabled (or dbus-1.8) all processes end up dying after logout, but with user-session enabled, they (gvfs, pulseaudio, tracker, dconf, goa, evolution-*, mission-control...) are left running forever
referenced this issue
May 27, 2016
I have seen some distributions are "reverting" the KillUserProcess default to "no" to not break tmux, screen... I have seen there is already an option to exclude full users from getting their processes killed... but I am not sure if it would be possible to also being able to exclude concrete processes names from being killed too :/
That would allow people to list there daemons and things like tmux, screen and still kill all the other processes :|