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.
Keyboard backlight stays off after unlock: second `omarchy-brightness-keyboard off` saves 0 as the restore value
Reported by zaptel · filed Sep 22, 2026 · open at source
R-1877 is the earliest report of this defect — filed Aug 9, 2026, open upstream. This report (filed Sep 22, 2026) describes the same defect, so it is folded under it in the inbox.
The original is tracked as known issueLock keyboard-off saves brightness 0 when the light is already off, so unlock restores darkness KI-261009-4MB1
Decided by agents · verified· Oct 9, 2026
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?
- 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
System details
MacBook Pro 18,2 (Apple M1 Max, Asahi, aarch64), Omarchy 4.0.3rc4-2 (from the omarchy-aarch64 repo), kernel 7.1.13-3-2-ARCH. The affected code is identical on v4.0.4 and quattro.
What's wrong?
After unlocking, the keyboard backlight often stays off, even though it was on before the lock. It only comes back after a manual Shift+F1/F2.
Cause: omarchy-brightness-keyboard off saves the current brightness before zeroing (brightnessctl -sd "$device" set 0). The lock plugin can run the blank command twice without a restore in between (the blank timer is re-armed on resume in idleBlankTimer.onTriggered, and on onAuthenticatingPasswordChanged; a suspend while already blanked is the easiest way to hit it). The second off then overwrites the saved value with 0, so omarchy-system-wake → omarchy-brightness-keyboard restore restores a dark keyboard.
Reproduce with the stock scripts, no lock needed:
brightnessctl -d kbd_backlight set 200
omarchy-brightness-keyboard off
omarchy-brightness-keyboard off # saved value is now 0
omarchy-brightness-keyboard restore
cat /sys/class/leds/kbd_backlight/brightness # -> 0, expected 200cat /run/user/$UID/brightnessctl/leds/kbd_backlight shows the saved value flip from 200 to 0 after the second call.
Real-world trace (lock → blank → unlock, logging LED + saved value every 2s):
21:32:24 locked=no kbd=255 saved=200
21:32:30 locked=yes kbd=0 saved=200 # first blank
21:32:36 locked=no kbd=200 saved=200 # restore -> ok this timeWhen the blank fires a second time before the restore, saved becomes 0 and unlock leaves kbd=0.
Suggested fix: don't save when the LED is already off, e.g. in bin/omarchy-brightness-keyboard:
if [[ $direction == "off" ]]; then
if (( $(brightnessctl -d "$device" get) > 0 )); then
brightnessctl -sd "$device" set 0 >/dev/null
fi
exit 0(omarchy-brightness-display off has the same shape and is worth a look.)
Side note for the aarch64 build: omarchy-brightness-keyboard-auto (ambient-light service) treats the restored 0 as a manual override and pauses until lux changes by ≥20, so in a dark room the keyboard stays dark indefinitely. Resetting last_set after the session unlocks would make it self-heal even when the saved value is wrong.
View raw text
### System details
MacBook Pro 18,2 (Apple M1 Max, Asahi, aarch64), Omarchy 4.0.3rc4-2 (from the `omarchy-aarch64` repo), kernel 7.1.13-3-2-ARCH. The affected code is identical on `v4.0.4` and `quattro`.
### What's wrong?
After unlocking, the keyboard backlight often stays off, even though it was on before the lock. It only comes back after a manual Shift+F1/F2.
**Cause:** `omarchy-brightness-keyboard off` saves the *current* brightness before zeroing (`brightnessctl -sd "$device" set 0`). The lock plugin can run the blank command twice without a `restore` in between (the blank timer is re-armed on resume in `idleBlankTimer.onTriggered`, and on `onAuthenticatingPasswordChanged`; a suspend while already blanked is the easiest way to hit it). The second `off` then overwrites the saved value with **0**, so `omarchy-system-wake` → `omarchy-brightness-keyboard restore` restores a dark keyboard.
**Reproduce with the stock scripts, no lock needed:**
```
brightnessctl -d kbd_backlight set 200
omarchy-brightness-keyboard off
omarchy-brightness-keyboard off # saved value is now 0
omarchy-brightness-keyboard restore
cat /sys/class/leds/kbd_backlight/brightness # -> 0, expected 200
```
`cat /run/user/$UID/brightnessctl/leds/kbd_backlight` shows the saved value flip from `200` to `0` after the second call.
**Real-world trace** (lock → blank → unlock, logging LED + saved value every 2s):
```
21:32:24 locked=no kbd=255 saved=200
21:32:30 locked=yes kbd=0 saved=200 # first blank
21:32:36 locked=no kbd=200 saved=200 # restore -> ok this time
```
When the blank fires a second time before the restore, `saved` becomes 0 and unlock leaves `kbd=0`.
**Suggested fix:** don't save when the LED is already off, e.g. in `bin/omarchy-brightness-keyboard`:
```bash
if [[ $direction == "off" ]]; then
if (( $(brightnessctl -d "$device" get) > 0 )); then
brightnessctl -sd "$device" set 0 >/dev/null
fi
exit 0
```
(`omarchy-brightness-display off` has the same shape and is worth a look.)
Side note for the aarch64 build: `omarchy-brightness-keyboard-auto` (ambient-light service) treats the restored 0 as a manual override and pauses until lux changes by ≥20, so in a dark room the keyboard stays dark indefinitely. Resetting `last_set` after the session unlocks would make it self-heal even when the saved value is wrong.
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
- Fixed bypr/8119· confirmed
- Related PRpr/12502· confirmed
- Fixed bypr/10366· confirmed
- Duplicate ofR-1877Keyboard backlight restore fails after lock (brightnessctl saves 0 after Dell stop_timeout)· decided by agents · verified
- Fixed bypr/12960· confirmed
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.