Page 1 of 1

There is ONE thing I like about systemd

Posted: Tue Sep 23, 2025 6:00 am
by Grogan
A while back, systemd made killing user processes on logout the default. I very much like that behaviour, because of stupid stuff like desktop daemons (XFCE has a few, though not as bad as KDE or Gnome) that stay running after logout. Not only user processes, but user IPC resources. (for example Steam leaves a bunch of shared memory that doesn't get recovered when exiting, and starting it again doesn't reuse that space)

The default is 10 seconds, but I have it cut down to 5 so that by the time I logout and log in again, it's done. I log out in between X sessions when I switch between XFCE and IceWM and I also log out and in again when I'm finished with Steam. It doesn't get to waste even 200 Mb of RAM.

These settings are in /etc/systemd/logind.conf. The commented settings are supposed to show the default state, but it shows it as "no" in the unedited, commented file even though the default is yes. I changed it to yes for the sake of correctness, and you can see UserStopDelaySec that I changed to 5

Code: Select all

[Login]
#NAutoVTs=6
#ReserveVT=6
KillUserProcesses=yes
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
UserStopDelaySec=5
...
...
#RemoveIPC=yes
You don't have to do anything to enjoy this behaviour.

A system using sysvinit scripts has nothing that does this.

Re: There is ONE thing I like about systemd

Posted: Tue Sep 23, 2025 7:08 am
by Zema Bus
Interesting.