5

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?

  1. Recently updated all packages again, but it didn't help.
  2. Used the command sudo systemctl --force --force poweroff, it helps and computers turn off quickly.
  3. 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
1
  • 1
    When you shutdown, 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 think user@1000.service is the --user bus, so check systemctl --user status. – Stewart Dec 24 '20 at 16:21
5

Slow shutdown after an update can be caused by orphaned packages that are no longer used or required for anything following a software update. If so, searching for orphaned packages and uninstalling them will solve the problem.

List orphaned packages:

pacman -Qtdq

If the above command finds any orphaned packages you can uninstall them with pacman. Uninstalling orphaned packages one at a time is preferable to uninstalling all of them with a single command, because some packages that are reported as orphaned packages may still be required by another package if that package was manually downloaded and installed, not installed with pacman from your currently enabled software repositories.

1
  • Thank you. I think your solution is good for many cases, but it didn't help for my case. Another solution I wrote in my question helped (UPD 2). – Denis Dec 24 '20 at 16:43
2

How I solved my question:

  1. Found the time gap in the log by the command: sudo journalctl -b -1 -e --no-pager (the time gap in my case is 2 minutes)
  2. I typed the information obtained from the logs into a search engine and found a solution: bbs.archlinux.org/viewtopic.php?id=261530
  3. Executed the 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.