initcpio need shutdown in HOOKS against random hangs during poweroff.

Branch: unstable
Systemd: systemd 245.5-2


Device can randomly hangs during reboot or shutdown proccess, Power Button pressing 5 seconds only helps here.


Adding to HOOKS array shutdown hook and refresh kernels.


The work-around for now appears to edit /etc/mkinitcpio.conf and look for the following line:

HOOKS="base udev autodetect modconf block keyboard keymap filesystems"

Add the shutdown hook like so:

HOOKS="base udev autodetect modconf block keyboard keymap filesystems shutdown"

Afterwards, regenerate the initramfs as follows:

sudo mkinitcpio -P

Upon reboot and a 2nd shutdown, the problem seems to go away. The developers (either archlinux or systemd) might want to check to ensure this is a regression or intended behavior.


I am surprised that the [shutdown] hook isn't in there already, just as I am equally surprised that the [usr] hook is also missing. :astonished:

I had already requested that those two hooks would be added at least a month before the release of the 19.0 Kyria images, and I even wrote ─ per @philm's request ─ an ad hoc inclusion routine for those two hooks, notwithstanding that I don't know Python and that I had to figure out the syntax on the fly.


is needed for and where exactly put in?

Needed if you have /usr on a separate partition (as I have). It makes sure that /usr is mounted in early userspace, because without it, GNU/Linux systems with a full /usr merge ─ like Manjaro and Arch ─ won't boot, given that systemd cannot be found then.

As for where to put it, here's where I put it on my system...:

HOOKS="base udev autodetect modconf block keyboard keymap filesystems usr shutdown"

Ironic notice xD

Yes, although it must also be said that the [fsck] hook should not be included if you use btrfs. :wink:

ext4 here (classics)

1 Like

Forum kindly sponsored by