OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
boot-kernel medium common DISPUTE

Hibernation never resumes: the `resume` hook lands after `filesystems`

omarchyarchendeavouroscachyosliminebtrfslukslaptop
CORRECTED An auditor found the fix wrong or incomplete and rewrote it.
AUDIT NOTE

The cause is disproved by mkinitcpio's own init script. In the busybox initramfs, init runs run_hookfunctions 'run_hook' 'hook' $HOOKS for every hook in the array and only afterwards calls fsck_root and "$mount_handler" /sysroot, so root is mounted after all runtime hooks, including a resume placed last. The filesystems hook has only a build() function and no runtime script, so it cannot mount anything at boot. The Arch wiki's own busybox example is block filesystems resume fsck, and its stated constraints are only that resume follow udev and any of encrypt/lvm2, which Omarchy's encrypt ... resume order satisfies. Issue 8471, the record's main source, has zero comments and its reporter writes that they could not demonstrate a resume failure attributable to the ordering. Issue 8352 is the real defect behind cold boots on Omarchy: install/hardware/nvidia.sh writes MODULES+=(nvidia nvidia_modeset nvidia_uvm nvidia_drm) on hybrid laptops, the initramfs instance of nvidia fails its freeze callback with -5 and the kernel discards the image, and two independent reporters confirm that stripping the modules fixes it, while the reporter states reordering resume does not help. This workstation, an Omarchy 4.0.2-1 install with resume last, logs PM: Image not found (code -22) on every boot, which is the kernel checking the configured resume device before root is mounted. The record's fix also names cmdline: in /boot/limine.conf, which limine-entry-tool regenerates from /etc/limine-entry-tool.d/*.conf, where omarchy-hibernation-setup already writes resume.conf, and its example HOOKS line drops plymouth. omarchy_resume.conf is written by bin/omarchy-hibernation-setup on the quattro branch, not shipped by a package. Both issues now resolve under omacom/omarchy on GitHub. The corrected fix below is built from the issue 8352 reports and the setup script and was not exercised with a hibernate cycle on this machine.

The cause above was rewritten on 2026-09-06 to match this note; the fix was corrected by the audit itself.
RISK

Only strip the NVIDIA modules on a machine where another GPU drives the display. On an NVIDIA-only machine omarchy_hooks.conf has already dropped the kms hook because nvidia_drm is early-loaded, so removing the modules as well leaves Plymouth and the LUKS passphrase prompt without early KMS. Do not hand-edit /boot/limine.conf: limine-entry-tool overwrites it on the next rebuild. Leave HOOKS alone. A hand-written HOOKS= drop-in that omits encrypt, block, filesystems or plymouth produces an initramfs that cannot unlock or mount root, or loses the splash, for no benefit.

Symptom

After omarchy hibernation setup the machine hibernates, but powering on gives a cold boot and unsaved work is gone. Looking for the cause you find resume at the end of the effective hook list, after filesystems, fsck and btrfs-overlayfs, because /etc/mkinitcpio.conf.d/omarchy_resume.conf only appends HOOKS+=(resume). That ordering is harmless. So far the failing machines are hybrid Intel+NVIDIA and AMD+NVIDIA laptops, and journalctl -b | grep -iE 'PM: hibernation|nv_pmops' shows nvidia ... pci_pm_freeze(): nv_pmops_freeze [nvidia] returns -5 followed by PM: hibernation: resume failed (-5).

Cause

The position of resume relative to filesystems does not matter in a busybox initramfs. mkinitcpio's init runs every hook's run_hook function first and mounts the real root on /sysroot afterwards, and the filesystems hook has no runtime script at all (its install script only adds filesystem modules and mount.* helpers to the image). The only ordering rules are that resume come after udev and after whatever provides the swap device (encrypt, lvm2), and Omarchy's encrypt ... resume order meets both. The Arch wiki's own example puts resume after filesystems. Issue basecamp/omarchy#8471 argues the ordering is wrong on paper and its reporter says they could not show a failure caused by it.

The cold boots reported on Omarchy come from a different drop-in. install/hardware/nvidia.sh writes /etc/mkinitcpio.conf.d/nvidia.conf with MODULES+=(nvidia nvidia_modeset nvidia_uvm nvidia_drm) on every NVIDIA machine, including hybrid laptops where the iGPU drives the only panel. Those modules load from the initramfs before the resume hook runs. When the kernel then tries to load the hibernation image it has to freeze every loaded driver, the NVIDIA instance in the initramfs fails pci_pm_freeze() with -5, and the kernel logs Failed to load image, recovering and continues as a normal boot. That is basecamp/omarchy#8352, confirmed by two more reporters on different hardware, and moving resume earlier does not change it because the modules are loaded by the MODULES array before any hook runs.

Two other things produce the same cold boot on Omarchy without any NVIDIA involvement. omarchy-hibernation-setup writes resume=<device> resume_offset=<offset> to /etc/limine-entry-tool.d/resume.conf, and if btrfs inspect-internal map-swapfile failed during setup the file carries an empty resume_offset=, which the script knows how to repair on its next run. And if /sys/power/disk reads [disabled] the kernel will not hibernate at all.

Fix

Do not rewrite HOOKS. First confirm the hook order is what Omarchy intends and read the journal from the boot that should have resumed:


bash -c 'source /etc/mkinitcpio.conf; for f in /etc/mkinitcpio.conf.d/*.conf; do source "$f"; done; printf "%s\n" "${HOOKS[@]}" | nl'
journalctl -b | grep -iE 'PM: (hibernation|image)|nv_pmops|hibernate-resume'
cat /proc/cmdline | tr ' ' '\n' | grep resume

resume after encrypt is correct wherever it sits. A normal boot with resume= set logs PM: Image not found (code -22), which shows the resume device was checked before root was mounted.

If the journal shows nv_pmops_freeze [nvidia] returns -5 and the machine is a hybrid laptop whose panel is driven by an Intel or AMD iGPU, keep the NVIDIA modules out of the initramfs. This is the workaround from basecamp/omarchy#8352, verified with real hibernate cycles by its reporters. The zz- name sorts after nvidia.conf and after omarchy_hooks.conf, so the kms hook decision in omarchy_hooks.conf is unchanged:


sudo tee /etc/mkinitcpio.conf.d/zz-hibernate-no-nvidia.conf >/dev/null <<'EOF'
_zz_filtered=()
for _zz_m in "${MODULES[@]}"; do
  case "$_zz_m" in
    nvidia|nvidia_modeset|nvidia_uvm|nvidia_drm) continue ;;
  esac
  _zz_filtered+=("$_zz_m")
done
MODULES=("${_zz_filtered[@]}")
unset _zz_filtered _zz_m
EOF
sudo limine-mkinitcpio

If the journal shows no resume attempt, check the Limine cmdline drop-in rather than /boot/limine.conf, which limine-entry-tool regenerates from /etc/limine-entry-tool.d/:


cat /etc/limine-entry-tool.d/resume.conf
sudo btrfs inspect-internal map-swapfile -r /swap/swapfile
findmnt -no SOURCE -T /swap/swapfile

The device must be the block device backing the swapfile (/dev/mapper/root on an encrypted Omarchy install, not the swap UUID) and the offset must match the map-swapfile output. If resume_offset= is empty, rerun the setup, which repairs it and rebuilds the UKI:


omarchy hibernation setup

If cat /sys/power/disk prints [disabled], the kernel cannot hibernate on this machine and no initramfs change will help.

Verify

lsinitcpio /boot/initramfs-linux.img | grep -n resume (or inspect the UKI) shows the resume hook, and sudo systemctl hibernate followed by power-on returns you to your open windows. journalctl -b | grep -i 'resume' shows the resume device being used.

Sources

resume-hook-after-filesystems-hibernation