Proof Portal
Omarchy
ProbeLabs65 findings · 95 requirementsA proof layer — requirements, tests and verified fixes — for two of Omarchy's subsystems: the application menu (launcher scripts, QML model, JSONC config, search and selection) and the lock screen (lock scripts, QML, PAM authentication). Scope is deliberately limited to those components of omacom/omarchy; the rest of the distribution is not covered.
No lid-shut battery protection when hibernate can't be made to work
Reported by zachsa999 · filed Aug 31, 2026 · open at source
At a glance
- 1 · What is claimed?
- Only the report text below — no validator has restated it as checkable claims yet.
- 2 · What does it affect?
- AreaOutside the audited area· Decided by agents · verified
- 3 · Is it reproducible?
- No validation has been run yet.
- 4 · What remains unclear?
- Not validated yet: no claims, no reproducer.
- 5 · What happens next?
- Decided by agents and verified by a second, independent agent — see the decision.
Original report
What happens
Close the lid, put the laptop in a bag, and it suspends to S3 until the
battery is flat. On a Framework 13 that's roughly two days. Mine went further
than flat: the RTC on this board is backed by the main battery, so when it hit
zero the hardware clock stopped. The machine came back eight days stale, which
took a while to understand.
Why the existing options don't cover it
manual/36-system-sleep.md offers suspend and hibernation as toggles, and the
honest advice to see whether each works on your machine. That's fair. But the
two options aren't symmetrical in what they protect against:
- Hibernate is the real answer to a bag. It's opt-in and needs a working
Limine setup plus a swap subvolume the size of RAM.
- Suspend is what you get otherwise, and it has no floor. It drains until the
machine dies.
So when hibernate can't be made to work, there is no fallback — the lid still
suspends, and nothing ever reconsiders. omarchy toggle suspend doesn't help;
it hides the menu entry, while HandleLidSwitch=suspend keeps doing its thing.
I spent several hours trying to get hibernate working here (encrypted btrfs,
resume hook, resume_offset, UKI) before giving up. I don't think that's rare.
Proposal
A third option for machines in that position: suspend as normal, but arm the
RTC before going down, and on waking, if the lid is still shut and we're still
on battery, power off cleanly.
The mechanism is small — a system-sleep hook that writes/sys/class/rtc/*/wakealarm on the way down, and a short script that runs a
few seconds after resume and decides. Roughly:
lid open -> somebody woke it. Do nothing.
lid shut, on battery -> woke itself in a bag. Power off.
lid shut, on AC -> charging with the lid down. Suspend again.
The grace period is the whole design. Long enough that a quick close-and-carry
between rooms just resumes (20 minutes has felt right), short enough that the
battery is never in danger. Failing toward "power off" means the worst case is
a cold boot, not a dead machine and a stopped clock.
Notes from implementing it here
Two things that cost me time and might be worth knowing:
- The hook has to live in
/usr/lib/systemd/system-sleep/. systemd does not
read /etc/systemd/system-sleep/. I had a version sitting in /etc that
never ran once across 500+ suspends and gave no indication it wasn't running.
- Lid and charger device names aren't portable. LID0 and ACAD are this
board's; LID, LID1, AC, AC0, ADP1 all occur elsewhere. logind
exposes LidClosed on the bus, which is authoritative and avoids guessing;
the Mains supply is best found by reading type rather than by name.
Running here for a few days now, tested both by shortening the grace period
and by leaving it overnight in a bag.
Happy to open a PR if you want it — and equally happy to be told this belongs
in a user's own system-sleep hook rather than in Omarchy. Wanted to ask
before writing it up against your conventions.
Environment
Omarchy 4.0.0, Framework Laptop 13 (13th Gen Intel), kernel 7.1.8-arch1-3,
systemd 261, Limine + UKI, encrypted btrfs.
View raw text
## What happens
Close the lid, put the laptop in a bag, and it suspends to S3 until the
battery is flat. On a Framework 13 that's roughly two days. Mine went further
than flat: the RTC on this board is backed by the main battery, so when it hit
zero the hardware clock stopped. The machine came back eight days stale, which
took a while to understand.
## Why the existing options don't cover it
`manual/36-system-sleep.md` offers suspend and hibernation as toggles, and the
honest advice to see whether each works on your machine. That's fair. But the
two options aren't symmetrical in what they protect against:
- Hibernate is the real answer to a bag. It's opt-in and needs a working
Limine setup plus a swap subvolume the size of RAM.
- Suspend is what you get otherwise, and it has no floor. It drains until the
machine dies.
So when hibernate can't be made to work, there is no fallback — the lid still
suspends, and nothing ever reconsiders. `omarchy toggle suspend` doesn't help;
it hides the menu entry, while `HandleLidSwitch=suspend` keeps doing its thing.
I spent several hours trying to get hibernate working here (encrypted btrfs,
resume hook, `resume_offset`, UKI) before giving up. I don't think that's rare.
## Proposal
A third option for machines in that position: suspend as normal, but arm the
RTC before going down, and on waking, if the lid is still shut and we're still
on battery, power off cleanly.
The mechanism is small — a `system-sleep` hook that writes
`/sys/class/rtc/*/wakealarm` on the way down, and a short script that runs a
few seconds after resume and decides. Roughly:
lid open -> somebody woke it. Do nothing.
lid shut, on battery -> woke itself in a bag. Power off.
lid shut, on AC -> charging with the lid down. Suspend again.
The grace period is the whole design. Long enough that a quick close-and-carry
between rooms just resumes (20 minutes has felt right), short enough that the
battery is never in danger. Failing toward "power off" means the worst case is
a cold boot, not a dead machine and a stopped clock.
## Notes from implementing it here
Two things that cost me time and might be worth knowing:
- The hook has to live in `/usr/lib/systemd/system-sleep/`. systemd does not
read `/etc/systemd/system-sleep/`. I had a version sitting in `/etc` that
never ran once across 500+ suspends and gave no indication it wasn't running.
- Lid and charger device names aren't portable. `LID0` and `ACAD` are this
board's; `LID`, `LID1`, `AC`, `AC0`, `ADP1` all occur elsewhere. logind
exposes `LidClosed` on the bus, which is authoritative and avoids guessing;
the Mains supply is best found by reading `type` rather than by name.
Running here for a few days now, tested both by shortening the grace period
and by leaving it overnight in a bag.
Happy to open a PR if you want it — and equally happy to be told this belongs
in a user's own `system-sleep` hook rather than in Omarchy. Wanted to ask
before writing it up against your conventions.
## Environment
Omarchy 4.0.0, Framework Laptop 13 (13th Gen Intel), kernel 7.1.8-arch1-3,
systemd 261, Limine + UKI, encrypted btrfs.
Validation
Not checked yet. A validator will restate this report as checkable claims, map it to the project's requirements and write a reproducer that the proof engine runs.
Linked
Not linked to any known issue, other report or change yet.
Decision
Decisions are recorded by our staff — or, where this project allows it, by agents: checked by a second, independent agent, or by a single agent where the project's policy says so. Any decision reached so far is shown below.
- Out of scopeDecided by agents · verified · 2026-10-09 10:17 UTC