Hello together. I have a problem with user logout using
Ubuntu 22.04
Mate Desktop 1.26.0
LightDM 1.30.0
Whenever a user logs of not all User processes are stopped correctly, the user is still shown as logged in and their home stays mounted.
Here is a snippet result running ps aux | grep USER, roughly 60 minutes after USER logged of:
USER 3980 0.2 0.0 17656 9984 ? Ss 14:14 0:00 /lib/systemd/systemd --user
USER 3981 0.0 0.0 197468 6108 ? S 14:14 0:00 (sd-pam)
USER 4002 0.0 0.0 49224 7168 ? S<sl 14:14 0:00 /usr/bin/pipewire
USER 4003 0.0 0.0 33252 7168 ? Ssl 14:14 0:00 /usr/bin/pipewire-media-session
USER 4529 0.0 0.0 237464 6784 ? Sl 14:14 0:00 /usr/libexec/geoclue-2.0/demos/agent
USER 5039 0.0 0.0 29052 4864 ? Ss 14:15 0:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
USER 5194 0.2 0.0 38952 11776 ? Ss 14:15 0:00 /snap/snapd-desktop-integration/157/usr/bin/snapd-desktop-integration
USER 5212 0.0 0.0 464136 8064 ? Ssl 14:15 0:00 /usr/libexec/xdg-document-portal
USER 5215 0.0 0.0 236504 6272 ? Ssl 14:15 0:00 /usr/libexec/xdg-permission-store
USER 5260 0.3 0.0 457320 59968 ? Sl 14:15 0:00 /snap/snapd-desktop-integration/157/usr/bin/snapd-desktop-integration
USER 5265 0.0 0.0 486516 14080 ? Ssl 14:15 0:00 /usr/libexec/xdg-desktop-portal
USER 5269 0.3 0.0 702888 60192 ? Ssl 14:15 0:00 /usr/libexec/xdg-desktop-portal-gnome
...
This behavior is reproducible on different machines running Mate + LightDM. When switching back to gdm/GNOME3 this behavior does not occur.
For our usecase we would prefer Mate/LightDM, but to do so we need to either fix this problem or build a workaround. Any help or pointers where to look next are much appreciated.
were those processes started with nohup, and therefore deliberate?
should nohup processes die with user session abandon (if so, impact on root-related processes)?
Workaround could be a systemd service that looks for any processes that are not linked to user logins (need to specify an exclude list for root and other services, to ensure that it could potentially trap disallowed access), and kill those processes off non-gracefully.
These processes were started by the USER login. Unless the session manager uses nohup during session creation these processes were not started with nohup. All of these should die on session end.