Having had a similar issue on Kali [2017.01], with alternating logout delay displayed by:
"A stop job is running for Session c1 of user Debian-gdm"
"A stop job is running for User manager for UID 132"
I managed to rid one error by first stopping NetworkManager
before shutdown or disable it, with:
# To get rid of: "A stop job is running for User manager for UID 132"
systemctl disable NetworkManager
systemctl stop NetworkManager
This should probably be fixed or put in another way when rebooting.
As for the other delay, I have not been successful. It seem that it may be related to GDM (Gnome Display Manager), pulseaudio
or dbus
. So since I was not able to isolate the problem, the only way was to set the DefaultTimeout*Sec=5s
entries in system.conf
as already mentioned in other posts.
Other issues that may be investigated are shown in:
# systemctl --state=masked --state=not-found --state=failed
UNIT LOAD ACTIVE SUB DESCRIPTION
● tmp.mount not-found inactive dead tmp.mount
● auditd.service not-found inactive dead auditd.service
● console-screen.service not-found inactive dead console-screen.service
● festival.service not-found inactive dead festival.service
● kbd.service not-found inactive dead kbd.service
● live-tools.service masked inactive dead live-tools.service
● plymouth-quit-wait.service not-found inactive dead plymouth-quit-wait.service
● plymouth-quit.service not-found inactive dead plymouth-quit.service
● plymouth-start.service not-found inactive dead plymouth-start.service
● systemd-sysusers.service not-found inactive dead systemd-sysusers.service
● systemd-update-done.service not-found inactive dead systemd-update-done.service
● systemd-vconsole-setup.service not-found inactive dead systemd-vconsole-setup.service
● syslog.target not-found inactive dead syslog.target
LOAD = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB = The low-level unit activation state, values depend on unit type.
and:
# systemd-cgls -u user-132.slice
Unit user-132.slice (/user.slice/user-132.slice):
├─[email protected]
│ ├─pulseaudio.service
│ │ └─739 /usr/bin/pulseaudio --daemonize=no
│ ├─at-spi-dbus-bus.service
│ │ ├─704 /usr/lib/at-spi2-core/at-spi-bus-launcher
│ │ ├─709 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
│ │ └─712 /usr/lib/at-spi2-core/at-spi2-registryd --use-gnome-session
│ ├─dbus.service
│ │ └─694 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
│ └─init.scope
│ ├─597 /lib/systemd/systemd --user
│ └─600 (sd-pam)
└─session-c1.scope
├─577 gdm-session-worker [pam/gdm-launch-environment]
├─613 /usr/lib/gdm3/gdm-x-session gnome-session --autostart /usr/share/gdm/greeter/autostart
├─618 /usr/lib/xorg/Xorg vt1 -displayfd 3 -auth /run/user/132/gdm/Xauthority -background none -noreset -keeptty -verbose 3
├─697 /usr/lib/gnome-session/gnome-session-binary --autostart /usr/share/gdm/greeter/autostart
├─721 /usr/bin/gnome-shell
└─752 /usr/lib/gnome-settings-daemon/gnome-settings-daemon
dmesg
output you pasted isn't very informative — it shows the WiFi disconnecting when you hit the shutdown button (3048 seconds after system bootup) and then nothing until the 1m30s timer expires and the system continues shutting down (at 3139 seconds).loginctl session-status c2
. I'm not sure if you can still switch to a getty during shutdown, but try hitting Ctrl+Alt+F2 when "A stop job is running …" pops up. If that works, you'll get a login prompt and will be able to useloginctl
command. If you don't get a login prompt, follow the same steps you used fordmesg
, but store the output ofloginctl session-status c2
instead. (That's all assuming that it's always "c2" that's hanging, not another session each time.)/etc/sysctl.d/50-coredump.conf
with contents:kernel.core_pattern=core
, ref: github.com/systemd/systemd/issues/1615#issuecomment-203507283loginctl session-status c2
instead ofdmesg
.