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

Stop a laptop draining its battery while suspended (s2idle instead of S3)

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

The generic Arch half of this record holds. I fetched the raw wikitext of Power_management/Suspend_and_hibernate and it prescribes the same two routes the record does, with the same filename: /etc/systemd/sleep.conf.d/mem-deep.conf carrying MemorySleepMode=deep, or the mem_sleep_default=deep kernel parameter, plus the UEFI sleep-state hunt when deep is not advertised. Power_management/Wakeup_triggers confirms acpi.ec_no_wakeup and the /sys/module/acpi/parameters/ec_no_wakeup file, which exists here and reads N. The installed systemd-sleep.conf(5) on systemd 261.2-1 lists MemorySleepMode= as added in version 256, so the directive is current. Two things were wrong for Omarchy 4 and both were checked on this machine. First, the Omarchy branch told the reader to write /etc/limine-entry-tool.d/deep-sleep.conf and also append to /etc/default/limine. Either route works on its own. The header of /etc/limine-entry-tool.conf says /etc/default/limine overrides the drop-in configs, and doing both would set the parameter twice. Omarchy's own code uses the drop-in alone, in /usr/share/omarchy/install/hardware/apple/fix-t2.sh, which writes /etc/limine-entry-tool.d/t2-mac.conf containing mem_sleep_default=deep and whose migration /usr/share/omarchy/migrations/1785944594.sh refreshes it with sudo limine-mkinitcpio. So limine-mkinitcpio alone is right, matching what mt7921e-dead-after-suspend-aspm says, and the /etc/default/limine clause is the defect. Second, /etc/systemd/sleep.conf.d/ does not exist on a stock Omarchy 4 install: ls reports no such directory, and the only file present is /etc/systemd/sleep.conf, owned by systemd 261.2-1 with every entry commented out. The fix now says to create the directory. The verify step was also wrong in a way that reads as a failure. systemd writes /sys/power/mem_sleep only while suspending, confirmed in systemd's src/sleep/sleep.c where write_mode("/sys/power/mem_sleep", ...) sits inside the sleep execution path, so after MemorySleepMode=deep the file still shows [s2idle] until a suspend happens. Only the kernel-parameter route makes it visible at rest. The old verify also asserted the literal string s2idle shallow [deep], and shallow is listed only where the platform advertises standby. This workstation is a DESKTOP (Gigabyte Z390 AORUS ULTRA, chassis type 3, no /sys/class/power_supply entries at all) and reads s2idle [deep] with no shallow, which confirms the string point but is NOT evidence about laptop firmware. Not exercised: no suspend was run, no laptop was tested, and the actual power draw claim of roughly 1%/hour on S3 was not measured anywhere.

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

S3 is unvalidated by many vendors on post-2020 laptops, and forcing deep can produce a machine that suspends but never resumes (black screen, hard power off, unsaved work lost). Test several cycles with nothing important open before trusting it.

Symptom

I close the lid at 100% and eight hours later the battery is at 30-40%, or the laptop is warm inside the bag. cat /sys/power/mem_sleep prints [s2idle] shallow deep or only [s2idle].

Cause

The machine is using suspend-to-idle (S0ix / "Modern Standby") rather than S3 suspend-to-RAM. On many laptops the platform never actually reaches the deep S0i3 substate, because a device keeps a runtime-PM reference or the EC keeps generating wakeups, so the CPU idles at a high power floor all night.

Fix

First check what the hardware advertises:


cat /sys/power/mem_sleep

The kernel lists only the states the platform claims, and the current one is in square brackets. shallow appears only where standby is advertised, so its absence is normal.

If deep is listed, test it for a few cycles:


echo deep | sudo tee /sys/power/mem_sleep
systemctl suspend

Make it permanent one of two ways, not both.

**Through systemd**, which writes /sys/power/mem_sleep at the moment of each suspend. The drop-in directory does not exist on a stock Omarchy 4 install, so create it:


sudo mkdir -p /etc/systemd/sleep.conf.d

# /etc/systemd/sleep.conf.d/mem-deep.conf
[Sleep]
MemorySleepMode=deep

Leave /etc/systemd/sleep.conf alone. It is shipped by the systemd package with every entry commented out, and a drop-in is the documented way to override it. MemorySleepMode= needs systemd 256 or newer.

**Or through the kernel command line**, which sets the default from boot. On plain Arch, add mem_sleep_default=deep wherever your bootloader keeps the command line. On Omarchy 4, which boots a UKI through Limine, command-line drop-ins live in /etc/limine-entry-tool.d/:


sudo mkdir -p /etc/limine-entry-tool.d
printf '%s\n' 'KERNEL_CMDLINE[default]+=" mem_sleep_default=deep"' \
  | sudo tee /etc/limine-entry-tool.d/deep-sleep.conf
sudo limine-mkinitcpio

Do not also edit /etc/default/limine. That file overrides the drop-ins rather than adding to them, and setting the parameter in both places duplicates it. Omarchy uses exactly this drop-in shape itself: /usr/share/omarchy/install/hardware/apple/fix-t2.sh writes /etc/limine-entry-tool.d/t2-mac.conf with mem_sleep_default=deep in it. limine-mkinitcpio alone re-reads the command line, rebuilds the initramfs and UKI, and updates the Limine entries. limine-update is only needed when the Limine binary on the ESP also has to change. The new command line takes effect at the next reboot.

If deep is **not** listed, look in the UEFI setup for a sleep-state option ("S3/Modern Standby support", "Windows 10" vs "Linux S3"). If there is none, stop fighting it and use suspend-then-hibernate instead (see the suspend-then-hibernate record).

Embedded-controller wakeups are a second common drain on s2idle machines:


cat /sys/module/acpi/parameters/ec_no_wakeup   # Y = EC wakeups suppressed

If it reads N and you do not rely on EC-driven wake, set the acpi.ec_no_wakeup=1 kernel parameter. On Omarchy 4 that is another drop-in:


printf '%s\n' 'KERNEL_CMDLINE[default]+=" acpi.ec_no_wakeup=1"' \
  | sudo tee /etc/limine-entry-tool.d/ec-no-wakeup.conf
sudo limine-mkinitcpio

Verify

Which check applies depends on the route you took. With the mem_sleep_default=deep kernel parameter, reboot, then cat /sys/power/mem_sleep shows deep in the square brackets, for example s2idle [deep], and grep -o 'mem_sleep_default=deep' /proc/cmdline confirms the parameter reached the running kernel. With MemorySleepMode=deep, systemd writes /sys/power/mem_sleep only as it suspends, so the file still reads [s2idle] beforehand and that is not a failure. Confirm the setting with systemd-analyze cat-config systemd/sleep.conf | grep -i memorysleepmode, suspend once, then check journalctl -b -u systemd-suspend.service shows no Failed to write mode to /sys/power/mem_sleep. Either way, note cat /sys/class/power_supply/BAT*/capacity before and after an hour of sleep. A healthy S3 laptop loses roughly 1%/hour or less.

Sources

battery-drains-overnight-s2idle-no-deep-sleep