Slow shutdown with systemd 247

Hi there,

since the update to systemd 247 (at least I think so) I encouter a dreaded 2 minutes delay on shutdown:

Dez 04 21:59:05 E14 systemd[1]: Stopping User Runtime Directory /run/user/1000...
Dez 04 21:59:05 E14 systemd[1]: Stopped User Manager for UID 1000.
Dez 04 21:59:05 E14 systemd[1]: user@1000.service: Failed with result 'timeout'.
Dez 04 21:59:05 E14 systemd[1]: user@1000.service: Main process exited, code=killed, status=9/KILL
Dez 04 21:59:05 E14 systemd[1]: user@1000.service: Killing process 4061 (dbus-daemon) with signal SIGKILL.
Dez 04 21:59:05 E14 systemd[1]: user@1000.service: Killing process 1397 (systemd) with signal SIGKILL.
Dez 04 21:59:05 E14 audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=user@1000 comm="systemd" exe="/usr/lib/systemd/systemd">
Dez 04 21:59:05 E14 kernel: audit: type=1131 audit(1607115545.867:196): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=user@1000 comm="systemd" e>
Dez 04 21:59:05 E14 kernel: kauditd_printk_skb: 10 callbacks suppressed
Dez 04 21:59:05 E14 systemd[1]: user@1000.service: State 'stop-sigterm' timed out. Killing.
Dez 04 21:57:06 E14 systemd[1397]: Started D-Bus User Message Bus.
Dez 04 21:57:06 E14 systemd[1397]: gvfs-daemon.service: Succeeded.
Dez 04 21:57:06 E14 systemd[1397]: Stopped D-Bus User Message Bus.

Any idea how to troubleshoot this?

Thanks in advance,

Christoph

This is likely something running in the background of your user session and not “getting the hint” to exit.

Have a look through your process list and see if there’s something obvious, and e.g. try rebooting immediately after logging in (i.e. without running other applications). If you try from both the DM and TTY it might e.g. narrow it down to something in your Startup applications.

Rebooting immediately after login has the same effect, rebooting from GDM is ok. My autostart folder is empty. Is there some additional logging apart from journalctl?

Edit: I may have found something: GNOME under Wayland has the problem, GNOME oder Xorg not.

Edit 2: And here is already a bug report.

2 Likes

And the fix is in the bug report

Systemd updated on Arch Linux from 246.6 -> 247.1 3 days ago and we have been seeing this 2 min hang on every shutdown/reboot since. Applying @bberg’s single-line fix to add Slice=-.slice in the [Service] section of/usr/lib/systemd/user/gnome-session-restart-dbus.service fixes the issue.

Just add Slice=-.slice to the bottom of this file as root /usr/lib/systemd/user/gnome-session-restart-dbus.service

10 Likes

Yep I saw this already and applied the fix.

Then it would be nice to just tell other users as I did for you

Be sure: I was about to report back here but I saw you did already :sunglasses:

1 Like

Great!
Had the same issue on my laptop :slight_smile:
Thanks!!! :pray: