I noticed long delays (more than 2 minutes) on reboots and poweroffs recently on my Manjaro laptop.

Fix the slow shutdown/reboot

View the last boot session log in reverse order

1
$ journalctl -rb -1

and inspect that for abnormalities. Also look at your console when rebooting or shutting down the system, as that may also present some good starting points.

To make things short, here’s my solution that I currently work with:

I edited /etc/systemd/system.conf and changed the following values:

1
2
3
4
5
6
7
8
# file: "/etc/systemd/system.conf"
[Manager]
[...]
RebootWatchdogSec=1min
ShutdownWatchdogSec=1min
[...]
DefaultTimeoutStopSec=5s
[...]

Have a quick look at the boot time

1
$ systemd-analyze

and if you are more interested into which module slows down your boot, list them with:

1
$ systemd-analyze blame

Just out of curiosity I also used:

1
$ sudo systemctl disable NetworkManager-wait-online.service

→ revert that with:

1
$ sudo systemctl enable NetworkManager-wait-online.service

Sources

The sources of my research and a more detailed explanation can be found with those links:

Update and Results on my Fedora box

Since I made the switch to Fedora 36 I had to re-do those steps.

With default values I got this result for systemd-analyze

1
2
3
$ systemd-analyze 
Startup finished in 7.754s (firmware) + 5.988s (loader) + 1.140s (kernel) + 13.027s (initrd) + 1min 21.493s (userspace) = 1min 49.403s 
graphical.target reached after 1min 21.462s in userspace

Without userspace: 27.9090s

And with the changes above I get this

1
2
3
$ systemd-analyze 
Startup finished in 10.151s (firmware) + 2.368s (loader) + 1.128s (kernel) + 10.509s (initrd) + 8.480s (userspace) = 32.639s 
graphical.target reached after 8.450s in userspace

Without userspace: 24.1560s