Clear Linux recently updated systemd to 231 release. This update brings
some changes on how systemd-logind handle the remained process after a
user logs out (see CHANGES WITH 230).
To back to the previous behavior (do not kill tmux when exit), you can
configure logind.conf system-wide to not kill user process after
#. Create logind.conf directory
mkdir -p /etc/systemd/logind.conf.d
#. Set KilluserProcesses to no
echo -e "[Login]\nKillUserProcesses=no" >
#. Restart systemd-logind service
systemctl restart systemd-logind
Furthermore you can use a lists of usernames to override the
KillUserProcesses= settings, by using KillOnlyUsers=, KillExcludeUsers=
(see man logind.conf(5)).
An other workaround is explained in .
From systemd NEWS file:
CHANGES WITH 230:
* systemd-logind will now by default terminate user processes that are
part of the user session scope unit (session-XX.scope) when the user
logs out. This behavior is controlled by the KillUserProcesses=
setting in logind.conf, and the previous default of "no" is now
changed to "yes". This means that user sessions will be properly
cleaned up after, but additional steps are necessary to allow
intentionally long-running processes to survive logout.
CHANGES WITH 231:
* systemd will now log about all service processes it kills forcibly
(using SIGKILL) because they remained after the clean shutdown phase
of the service completed. This should help identifying services that
shut down uncleanly. Moreover if KillUserProcesses= is enabled in
systemd-logind's configuration a similar log message is generated for
processes killed at the end of each session due to this setting.
Miguel Bernal Marin Open Source Technology Center