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.
Stale ACPI lid state turns external-monitor hotplug into clamshell mode, blanking the internal panel
Reported by bbishdotdev · filed Sep 2, 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
On some laptops the firmware's ACPI _LID method gets stuck reporting closed while the lid is open. When that happens, plugging in an external monitor blanks the internal panel: omarchy-hyprland-monitor-clamshell sees "lid closed + external active", writes the clamshell toggle, and disables eDP-1. Unplugging re-enables it, so the symptom looks like "my laptop screen dies whenever I connect my monitor". Workspaces also migrate to the external and back on each cycle, which adds to the confusion.
I hit this on a Razer Blade Stealth 13 (Late 2019). The desync is intermittent. In my captured case ACPI reported closed for over an hour of lid-open use, then recovered on its own:
$ cat /proc/acpi/button/lid/LID0/state
state: closed # lid physically open
$ busctl get-property org.freedesktop.login1 /org/freedesktop/login1 \
org.freedesktop.login1.Manager LidClosed
b false # logind, correct
$ journalctl -b | grep -i "lid"
Sep 01 21:21:43 omarchy systemd-logind[744]: Lid opened. # last real eventHyprland's log at hotplug time shows the resulting disable:
drm: Modesetting DP-3 with [email protected]
drm: Disabling output eDP-1
drm: Connector eDP-1 enabledState changed true -> falseWhy
omarchy-hw-laptop-closed reads only /proc/acpi/button/lid/*/state. logind and libinput both derive lid state from the evdev SW_LID switch instead, with logind adding hardware quirk handling on top, which is why logind had the right answer the whole time. Omarchy already treats logind as the authority on lid policy elsewhere: it keeps logind's HandleLidSwitch defaults untouched, and omarchy-system-lid-close's docked/undocked reasoning is written against logind's behavior. The detection script is the one place that trusts raw firmware state instead.
Fix
Ask logind first, keep ACPI as the fallback:
busctl get-property org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager LidClosed, and parseb true/b false.- If busctl produces nothing (no running logind, e.g. installation chroots), fall back to the existing ACPI loop unchanged.
Pure bash, no new dependencies (busctl ships with systemd). PR incoming with a test that pins both branches.
Blast radius
omarchy-hw-laptop-closed has five non-test call sites, so the change affects more than clamshell:
bin/omarchy-hw-clamshellandbin/omarchy-system-lid-close: the display/lock paths this fixes.- The PAM fingerprint gate (
auth [success=1 default=ignore] pam_exec.so quiet /usr/bin/omarchy-hw-laptop-closedin/etc/pam.d/sudoand/etc/pam.d/polkit-1): runs as root at auth time. busctl talks to the system bus by default, so it works there; when D-Bus itself is unreachable the ACPI fallback answers, same as today. shell/plugins/polkit/PolkitAgent.qml: samples the command per auth request. Behavior unchanged apart from correctness.
The stuck-ACPI failure mode currently affects those consumers too: with ACPI stuck on closed, fingerprint auth is silently skipped on an open laptop, and the polkit dialog hides the fingerprint prompt. The fix corrects all of them at once.
View raw text
## What happens
On some laptops the firmware's ACPI `_LID` method gets stuck reporting `closed` while the lid is open. When that happens, plugging in an external monitor blanks the internal panel: `omarchy-hyprland-monitor-clamshell` sees "lid closed + external active", writes the clamshell toggle, and disables eDP-1. Unplugging re-enables it, so the symptom looks like "my laptop screen dies whenever I connect my monitor". Workspaces also migrate to the external and back on each cycle, which adds to the confusion.
I hit this on a Razer Blade Stealth 13 (Late 2019). The desync is intermittent. In my captured case ACPI reported `closed` for over an hour of lid-open use, then recovered on its own:
```
$ cat /proc/acpi/button/lid/LID0/state
state: closed # lid physically open
$ busctl get-property org.freedesktop.login1 /org/freedesktop/login1 \
org.freedesktop.login1.Manager LidClosed
b false # logind, correct
$ journalctl -b | grep -i "lid"
Sep 01 21:21:43 omarchy systemd-logind[744]: Lid opened. # last real event
```
Hyprland's log at hotplug time shows the resulting disable:
```
drm: Modesetting DP-3 with [email protected]
drm: Disabling output eDP-1
drm: Connector eDP-1 enabledState changed true -> false
```
## Why
`omarchy-hw-laptop-closed` reads only `/proc/acpi/button/lid/*/state`. logind and libinput both derive lid state from the evdev `SW_LID` switch instead, with logind adding hardware quirk handling on top, which is why logind had the right answer the whole time. Omarchy already treats logind as the authority on lid policy elsewhere: it keeps logind's `HandleLidSwitch` defaults untouched, and `omarchy-system-lid-close`'s docked/undocked reasoning is written against logind's behavior. The detection script is the one place that trusts raw firmware state instead.
## Fix
Ask logind first, keep ACPI as the fallback:
- `busctl get-property org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager LidClosed`, and parse `b true`/`b false`.
- If busctl produces nothing (no running logind, e.g. installation chroots), fall back to the existing ACPI loop unchanged.
Pure bash, no new dependencies (busctl ships with systemd). PR incoming with a test that pins both branches.
## Blast radius
`omarchy-hw-laptop-closed` has five non-test call sites, so the change affects more than clamshell:
- `bin/omarchy-hw-clamshell` and `bin/omarchy-system-lid-close`: the display/lock paths this fixes.
- The PAM fingerprint gate (`auth [success=1 default=ignore] pam_exec.so quiet /usr/bin/omarchy-hw-laptop-closed` in `/etc/pam.d/sudo` and `/etc/pam.d/polkit-1`): runs as root at auth time. busctl talks to the system bus by default, so it works there; when D-Bus itself is unreachable the ACPI fallback answers, same as today.
- `shell/plugins/polkit/PolkitAgent.qml`: samples the command per auth request. Behavior unchanged apart from correctness.
The stuck-ACPI failure mode currently affects those consumers too: with ACPI stuck on `closed`, fingerprint auth is silently skipped on an open laptop, and the polkit dialog hides the fingerprint prompt. The fix corrects all of them at once.
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:34 UTC