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

Fix a machine that will not power off after a suspend cycle

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

Steps 1, 2, 3, 5 and 6 are excellent and verified. The 'Failed to power off system via logind: There's already a shutdown or sleep operation in progress' symptom, the systemctl list-jobs output showing 'systemd-suspend.service start running / suspend.target start waiting', and the systemctl cancel + systemctl stop systemd-suspend.service remedy are reproduced almost verbatim from wiki.archlinux.org/title/Systemd#Shutdown/reboot_takes_terribly_long. The /usr/lib/systemd/system-shutdown/debug.sh script and the debug cmdline are systemd.io/DEBUGGING's own method. HibernateMode=shutdown in /etc/systemd/sleep.conf.d/hibernatemode.conf matches the wiki's 'System does not power off when hibernating' section word for word, including the 'instead of powering off, the system might reboot or stay on but unresponsive' framing. The reboot_type list (bios, acpi, kbd, triple, efi, pci) is exact per Documentation/admin-guide/kernel-parameters.txt. Two defects. (1) Step 4 is misdirected: reboot= selects the *reboot* method (reboot_type feeds the emergency-restart path). It has no effect on the poweroff path, which goes through ACPI S5 / pm_power_off. Telling a user whose machine reboots instead of powering off to cycle reboot=acpi/pci/bios/efi sends them through four reboots for nothing. The real fix for that exact symptom is already the record's step 5 when hibernation is involved, and firmware/ACPI knobs otherwise. (2) sudo systemctl daemon-reexec re-executes only the system manager, so the /etc/systemd/user.conf.d drop-in does not take effect in the running user manager, which is the very manager whose stop job ('User Manager for UID 1000') the record is trying to shorten.

The cause above was not rewritten and may still contain the error described. The fix below is the corrected version.
RISK

The SysRq sequence S U O syncs and remounts read-only first, but skipping straight to O (or holding the power button) leaves dirty filesystems and can lose recent writes. On Btrfs it can also cost you the most recent snapshot state. Lowering DefaultTimeoutStopSec globally means databases, VMs and long-running backup services get SIGKILLed 15 s into a shutdown instead of being allowed to flush. Set a longer per-unit TimeoutStopSec= on anything that needs it. Booting with systemd.log_level=debug floods the journal. Remove it once you have your log.

Symptom

Since suspending, the machine refuses to shut down:


# systemctl poweroff
Failed to power off system via logind: There's already a shutdown or sleep operation in progress

Or I get the shutdown screen stuck on A stop job is running for User Manager for UID 1000 (1min 30s / 2min), and at the end the machine reboots instead of powering off, or just hangs with the fans spinning until I hold the power button.

Cause

Three separate things, and it matters which one you have. (1) A previous suspend never completed, so systemd-suspend.service is still sitting in the job queue and logind refuses any new power operation. (2) A unit is refusing to stop and systemd is waiting out DefaultTimeoutStopSec (90 s by default), most often user@1000.service because something in the graphical session won't die. (3) The firmware's ACPI power-off path is broken after an S3 cycle, so the kernel's chosen reset/poweroff method reboots or hangs instead.

Fix

Replace step 4 with:

**4. Machine reboots or hangs instead of powering off.** Do not reach for reboot= here. That parameter only selects how a *reboot* is performed (reboot_type in the emergency-restart path) and has no effect on the poweroff path, which goes through ACPI S5. Try, in order:

  • If a hibernate cycle is involved, go straight to step 5 (HibernateMode=shutdown). That is the documented fix for 'instead of powering off, the system might reboot or stay on but unresponsive'.
  • Update the firmware (sudo fwupdmgr refresh --force && sudo fwupdmgr get-updates, or Update > Firmware on Omarchy).
  • Check the BIOS for Wake-on-LAN / ErP / 'Restore on AC power loss' settings. These make a completed poweroff look like a reboot.
  • Only then test ACPI overrides one at a time at the Limine menu (e, edit cmdline:): acpi=force, then acpi_osi="!Windows 2015" (see Power management/Wakeup triggers for the board-specific list). Persist the winner in /etc/default/limine with KERNEL_CMDLINE[default]+=" ..." and sudo limine-update.

Use reboot=acpi|pci|bios|efi only for the different symptom where systemctl reboot itself hangs or never completes.

In step 3, fix the reload: the user drop-in needs the *user* manager re-executed, not the system one.


sudo systemctl daemon-reexec        # picks up /etc/systemd/system.conf.d
systemctl --user daemon-reexec      # picks up /etc/systemd/user.conf.d

(Or just reboot once.) Note that the 'stop job is running for User Manager for UID 1000' timeout is governed by the *system* drop-in, since user@1000.service is a system unit.

Verify

systemctl list-jobs prints No jobs running. right after a failed suspend, and systemctl poweroff then completes. After changing reboot=, confirm with cat /proc/cmdline and do five power-off cycles. This failure is intermittent, so one success proves nothing. systemd-analyze on the next boot and /shutdown-log.txt should show no unit hitting its stop timeout.

Sources

shutdown-hangs-after-suspend-cycle