Prevent Logoff from Killing tmux Session

This "feature" has existed in systemd previously, but the systemd developers decided to effect a change in the default, to enable the setting for termination of child processes upon log out of a session.

You can revert this setting in your logind.conf (/etc/systemd/logind.conf):

KillUserProcesses=no

You can also run tmux with a systemd-run wrapper like the following:

systemd-run --scope --user tmux

For these systems, you may just want to alias the tmux (or screen) command:

alias tmux="systemd-run --scope --user tmux"