omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Hibernate on pre-T2 Intel Macs reboots instead of powering off

Open animadito opened this issue 3 months ago • 8 comments

Summary

Hibernate on pre-T2 Intel MacBook models reboots instead of powering off, but resume works correctly.

Environment

  • Machine: MacBookPro11,1 (2014, Intel Haswell)
  • Omarchy: 4.x
  • GPU: Intel integrated only (no dGPU)
  • Kernel: 7.x

What happens

  1. User triggers hibernate from Omarchy menu (`systemctl hibernate`)
  2. Machine writes hibernation image ✓
  3. Machine reboots instead of powering off ✗
  4. After cold boot, session resumes correctly ✓

Root cause

`/sys/power/disk` shows `[platform] shutdown` — systemd tries platform mode first (ACPI S4), which fails on this hardware, triggering an unexpected reboot.

Regular shutdown (`systemctl poweroff`) works correctly because it uses the shutdown power-off path directly.

Workaround

Creating `/etc/systemd/sleep.conf.d/hibernatemode.conf` with `HibernateMode=shutdown` fixes the issue. This makes hibernate use the same shutdown code path as regular shutdown (see `bin/omarchy-system-shutdown` which calls `systemctl poweroff`).

Questions for the community

  1. Does this affect other pre-T2 Intel Macs (MacBookPro11,x, MacBookAir6,x, etc.)?
  2. Does this affect non-Apple hardware with broken ACPI S4?
  3. Should this be applied universally to all systems, or gated on hardware detection?

Related

  • kernel PM debugging docs recommend shutdown mode for "systems with broken BIOSes"
  • ArchWiki documents the same symptom under "System does not power off when hibernating"
  • PR #8017 uses the same fix for ThinkBook X IMH which has broken ACPI

animadito avatar Sep 03 '26 17:09 animadito

Related: #8589 reports the same fix on an ASUS ROG Zephyrus G14 (AMD). This confirms the issue affects non-Apple hardware too, suggesting a broader scope than just Macs.

animadito avatar Sep 03 '26 17:09 animadito

Additional investigation

Checked other distros (Debian, Ubuntu, Arch) and systemd source code:

  1. All distros use the same default: systemd compiled default is HibernateMode=platform shutdown. No distro modifies this.

  2. Verified Debian source (systemd 252.39 from Debian 12): Same default, no modification.

  3. No real benefit to platform mode for hibernate: The theoretical benefits (WoL, power LED, ACPI compliance) are irrelevant during hibernate - the machine is fully powered off regardless.

  4. Regular shutdown vs hibernate: Regular shutdown uses direct poweroff (no ACPI S4). Hibernate with platform mode tries ACPI S4 first, which can fail silently on broken firmware, causing unexpected reboot.

  5. Kernel docs confirm: "Powering down means minimum power draw and it allows this mechanism to work on any system." - shutdown mode is universally compatible.

The fix (HibernateMode=shutdown) makes hibernate use the same power-off path as regular shutdown, which is what users expect. This is documented by Arch Wiki as the workaround for "systems with broken BIOSes".

animadito avatar Sep 03 '26 18:09 animadito

Confirming this affects more than the 11,1: my MacBookPro11,5 (2015, pre-T2, Intel-only mode) also defaults to [platform] in /sys/power/disk, and lspci shows no T2 device. Proposed PR #11345 gates on Apple vendor plus absence of the T2 PCI ID and sets HibernateMode=shutdown, following the same pattern as #8017. Note: I did not run a live hibernate cycle since my machine has no resume= target configured yet, so the power-off half is verified by config, not by a cycle.

rand0mdud3 avatar Sep 11 '26 17:09 rand0mdud3

Update from live testing on MacBookPro11,5: this model does NOT show the reboot symptom. Stock platform mode wrote the image and powered off cleanly. What is broken here instead is resume itself: the restored session comes up frozen with dead input (filed as #11351, withdrawing PR #11345 which only addressed the power mode). So the answer to Q1 is mixed: 11,5 shares the [platform] default but not the reboot behavior, and hibernate is unusable here for a different reason. The shutdown-mode quirk may still be right for the 11,1, but it needs a tester whose resume actually works.

rand0mdud3 avatar Sep 11 '26 18:09 rand0mdud3

Confirming on MacBookPro11,1 (13-inch Retina, Mid 2014), Omarchy 4.0.4-1, systemd 261.2-1, kernel 7.2.5-3-omarchy, Intel-only, with a measured before/after:

  • Before (/sys/power/disk = [platform] shutdown reboot suspend test_resume): a critical-battery hibernate on battery wrote the image and entered ACPI S4 (ACPI: PM: Preparing to enter system sleep state S4). The machine then powered itself back on while unplugged, so on this unit it came back up rather than staying off. Resume itself worked (same boot id, HibernateLocation consumed). /proc/acpi/wakeup shows LID0 S4 *enabled; no RTC wakealarm was set.
  • After /etc/systemd/sleep.conf.d/…conf with [Sleep] HibernateMode=shutdown (systemd-analyze cat-config systemd/sleep.conf confirms it is the effective value): a supervised hibernate on AC stayed powered off until the power button, then resumed into the same boot. After resume /sys/power/disk shows [shutdown] as selected.

So on the 11,1 the answer to your Q1 is yes, and HibernateMode=shutdown fixes it. Unlike the 11,5 report above, resume works fine here.

technobenja avatar Sep 25 '26 19:09 technobenja

The reports here agree on the cause: on a MacBookPro11,1, hibernate in systemd's default platform mode writes the image and enters ACPI S4, and the machine comes back on instead of staying off. @technobenja's before and after shows HibernateMode=shutdown keeps it off until the power button and still resumes into the same boot. The MacBookPro11,5 report found that model powers off fine in platform mode, so the fix is gated on the MacBookPro11,1 alone rather than on every pre-T2 Mac.

The fix is up as #14961. It writes /etc/systemd/sleep.conf.d/hibernatemode.conf with HibernateMode=shutdown on new installs of this model, plus a migration for existing ones. Its new test fails on quattro and passes with the fix on an Omarchy worker. The rest of the shell suite gives the same results as on quattro. Claude Opus 5.5 reviewed it, and Codex Medium reviewed it as a second opinion. Codex's points about the migration's check and the test's isolation are fixed, and its last round found nothing open.

A worker has no MacBookPro11,1, so the one thing left is a test on the real machine. @animadito, since you opened this, could you try commit 8e6a533bfb9c81b9f62db1623916e91d0ae2b904 on your MacBookPro11,1:

sudo rm -f /etc/systemd/sleep.conf.d/hibernatemode.conf   # take out your own workaround first
git clone https://github.com/omacom/omarchy.git /tmp/omarchy-14961
git -C /tmp/omarchy-14961 checkout 8e6a533bfb9c81b9f62db1623916e91d0ae2b904
OMARCHY_PATH=/tmp/omarchy-14961 bash /tmp/omarchy-14961/migrations/1791689221.sh
cat /etc/systemd/sleep.conf.d/hibernatemode.conf
systemctl hibernate

Then reply with that commit, the cat output, and whether the machine stayed off until you pressed the power button and resumed your session. Until then this waits on you.

omarchybot avatar Oct 11 '26 03:10 omarchybot

macbook air m1 shutdown doesnt shutdown it now reboots after updating to 4.5.0-3

osde8info avatar Nov 28 '26 19:11 osde8info

@osde8info, the M1 report describes normal Shutdown, which calls systemctl poweroff in 4.5.0. Could you open a separate issue with omarchy debug --print --no-sudo, the end of the previous boot's journal (journalctl -b -1 -n 100 --no-pager), and whether Shutdown from the menu and direct systemctl poweroff both reboot?

Codex High, Opus 5.5 High and muse-wonder via pi at high effort checked the shutdown path and the model gate in #14961. That fix applies to hibernation on the Intel MacBookPro11,1. It now conflicts with quattro in install/hardware/all.sh and still needs a hibernation test on a MacBookPro11,1.

omarchybot avatar Nov 28 '26 19:11 omarchybot