I have been using Arch Linux + GNOME 3 on both my computers (notebook and desktop) for over a year now. And all the time, computers were shutting down quickly (in 3 seconds). After a recent update of all packages on both computers via Pamac, the computers now take a long time to shut down (it takes about 2 minutes to wait before shutting down). I usually shutting down the computer through the GNOME 3 graphical interface.
What have I tried to do?
- Recently updated all packages again, but it didn't help.
- Used the command
sudo systemctl --force --force poweroff
, it helps and computers turn off quickly. - Used the command
sudo systemctl --force poweroff
, in this case, the computer turns off in 1.5 minutes, and displays a message on the screen:systemd-shutdown[1]: Waiting for process: gnome-session-b, Xwayland, gsb-media-keys, dbus-daemon, pulseaudio, gsd-power, gnome-shell, systemd, gsd-wacom, gsd-xsettings, gsd-color
.
UPD: When I ran the command sudo journalctl -b -1 -e --no-pager
, I found the following time gap in the log:
Dec 24 18:05:28 archlinux systemd[497]: evolution-source-registry.service: Succeeded.
Dec 24 18:05:28 archlinux systemd[497]: evolution-calendar-factory.service: Succeeded.
Dec 24 18:05:28 archlinux systemd[497]: evolution-addressbook-factory.service: Succeeded.
Dec 24 18:07:28 archlinux systemd[1]: user@1000.service: State 'stop-sigterm' timed out. Killing.
Dec 24 18:07:28 archlinux systemd[1]: user@1000.service: Killing process 497 (systemd) with signal SIGKILL.
Dec 24 18:07:28 archlinux systemd[1]: user@1000.service: Killing process 1329 (dbus-daemon) with signal SIGKILL.
Dec 24 18:07:28 archlinux systemd[1]: user@1000.service: Main process exited, code=killed, status=9/KILL
Dec 24 18:07:28 archlinux systemd[1]: user@1000.service: Failed with result 'timeout'.
Dec 24 18:07:28 archlinux systemd[1]: Stopped User Manager for UID 1000.
UPD 2: I do not know if this is the right solution, but the solution given on this web page helped me: bbs.archlinux.org/viewtopic.php?id=261530
Run command: systemctl edit --user gnome-session-restart-dbus.service
and add the following lines above ### Lines below this comment will be discarded
:
[Service]
Slice=-.slice
systemd
will ask nicely (SIGTERM) for each application to shut down. The service may legitimately take time to do that (flush logs, save anything it had in memory, etc). However when the service doesn't quit within[TimeoutStopSec=](https://www.freedesktop.org/software/systemd/man/systemd.service.html#TimeoutStopSec=)
(default 2 min I think), then it'll send a sig-kill. This is meant to force hanging applications to stop. Check which applications/services are hanging. I thinkuser@1000.service
is the--user
bus, so checksystemctl --user status
.