Proof Portal

Project overview

Omarchy

ProbeLabs65 findings · 95 requirements

A 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.

Inbox
ReportR-4873GitHub issuePublicFixed

omarchy-brightness-keyboard off saves 0 over the good value, making restore permanently restore darkness

Reported by joshdaws · filed Sep 4, 2026Closed upstream on 2026-09-20 by bjarneo via an automated message, as a duplicate of #6667 (R-1877). GitHub close reason: completed.

Received and recorded verbatim. Nothing has been checked yet.

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?
Not yet mapped to any requirement or component.
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?
Our staff decide whether the report is valid. Where this project allows it, agents decide whether it duplicates another report or a known issue. No decision has been recorded yet.

Original report

omarchy-brightness-keyboard off saves 0 over the good value, making restore permanently restore darknessrevision 1 · captured 2026-10-04 12:10 UTC via poll

Description

omarchy-brightness-keyboard off saves the keyboard-backlight level with
brightnessctl -s every time it runs, with no guard against saving 0. The
lock service can run it more than once per lock cycle, and the second run saves
0 over the previously-saved good value.

omarchy-brightness-keyboard restore (called by omarchy system wake) then
faithfully restores 0, so the keyboard backlight stays off after waking — and
stays off permanently, because nothing rewrites a nonzero value into the save
file. Re-arming the lights by hand does not repair it; the next idle cycle
restores darkness again.

Expected: waking after idle restores the keyboard backlight to the level it
was at before blanking.

Actual: the backlight stays off after the first double-blank, permanently.

System

Omarchy4.0.2-1
Kernel7.1.8-arch1-2-ptl
MachineXPS 14 DA14260
CPUIntel(R) Core(TM) Ultra X7 358H
LED devicedell::kbd_backlight (max_brightness 2)
brightnessctl0.5.1-3

(omarchy debug is not a command in 4.0.2, so no debug log is attached.)

Steps to reproduce

Reproducible directly, without waiting for the idle cycle:

$ DEV=dell::kbd_backlight; SAVE=$XDG_RUNTIME_DIR/brightnessctl/leds/$DEV
$ brightnessctl -d $DEV set 1
$ cat $SAVE
1
$ omarchy-brightness-keyboard --no-osd off     # saves 1, sets 0
$ cat $SAVE
1
$ omarchy-brightness-keyboard --no-osd off     # saves 0 over the good value
$ cat $SAVE
0
$ omarchy-brightness-keyboard --no-osd restore
$ brightnessctl -d $DEV get
0                                               # expected 1

In normal use this is reached through the lock screen: blank the display, then
have the shell re-arm and fire runBlank() again without an intervening
runWake().

Cause

bin/omarchy-brightness-keyboard:29

if [[ $direction == "off" ]]; then
  brightnessctl -sd "$device" set 0 >/dev/null

-s snapshots the current value before setting 0. It is unconditional, so
calling off while the backlight is already 0 overwrites the saved level
with 0.

shell/plugins/lock/Service.qml:172

function runBlank() {
  if (!blankProcess.running) blankProcess.running = true
}

The only guard is against a concurrent run, not against blanking something
already blank. armBlankTimer() is called from four places — beginLock()
(:136), runWake() (:169), the suspend-gap re-arm inside
idleBlankTimer.onTriggered (:424), and onAuthenticatingPasswordChanged
(:481) — and only runWake() restores brightness first. Any path that re-arms
without waking leads to a second runBlank() against an already-dark keyboard.

The display path (omarchy-brightness-display) is worth checking for the same
pattern.

Suggested fix

Make the save conditional in bin/omarchy-brightness-keyboard:

if [[ $direction == "off" ]]; then
  # Only snapshot a level worth restoring; saving 0 over a good value makes
  # `restore` permanently restore darkness.
  if (( $(brightnessctl -d "$device" get) > 0 )); then
    brightnessctl -sd "$device" set 0 >/dev/null
  else
    brightnessctl -d "$device" set 0 >/dev/null
  fi
  exit 0

Guarding runBlank() on current brightness would also work, but fixing it in
the script covers every caller.

Notes

Found on a fresh 4.0.2-1 install. The save file was already poisoned (0) by
normal use before any manual reproduction.

View raw text
## Description

`omarchy-brightness-keyboard off` saves the keyboard-backlight level with
`brightnessctl -s` every time it runs, with no guard against saving `0`. The
lock service can run it more than once per lock cycle, and the second run saves
`0` over the previously-saved good value.

`omarchy-brightness-keyboard restore` (called by `omarchy system wake`) then
faithfully restores `0`, so the keyboard backlight stays off after waking — and
stays off permanently, because nothing rewrites a nonzero value into the save
file. Re-arming the lights by hand does not repair it; the next idle cycle
restores darkness again.

**Expected:** waking after idle restores the keyboard backlight to the level it
was at before blanking.

**Actual:** the backlight stays off after the first double-blank, permanently.

## System

| | |
|---|---|
| Omarchy | 4.0.2-1 |
| Kernel | 7.1.8-arch1-2-ptl |
| Machine | XPS 14 DA14260 |
| CPU | Intel(R) Core(TM) Ultra X7 358H |
| LED device | `dell::kbd_backlight` (max_brightness 2) |
| brightnessctl | 0.5.1-3 |

(`omarchy debug` is not a command in 4.0.2, so no debug log is attached.)

## Steps to reproduce

Reproducible directly, without waiting for the idle cycle:

```console
$ DEV=dell::kbd_backlight; SAVE=$XDG_RUNTIME_DIR/brightnessctl/leds/$DEV
$ brightnessctl -d $DEV set 1
$ cat $SAVE
1
$ omarchy-brightness-keyboard --no-osd off     # saves 1, sets 0
$ cat $SAVE
1
$ omarchy-brightness-keyboard --no-osd off     # saves 0 over the good value
$ cat $SAVE
0
$ omarchy-brightness-keyboard --no-osd restore
$ brightnessctl -d $DEV get
0                                               # expected 1
```

In normal use this is reached through the lock screen: blank the display, then
have the shell re-arm and fire `runBlank()` again without an intervening
`runWake()`.

## Cause

`bin/omarchy-brightness-keyboard:29`

```bash
if [[ $direction == "off" ]]; then
  brightnessctl -sd "$device" set 0 >/dev/null
```

`-s` snapshots the current value before setting `0`. It is unconditional, so
calling `off` while the backlight is already `0` overwrites the saved level
with `0`.

`shell/plugins/lock/Service.qml:172`

```qml
function runBlank() {
  if (!blankProcess.running) blankProcess.running = true
}
```

The only guard is against a concurrent run, not against blanking something
already blank. `armBlankTimer()` is called from four places — `beginLock()`
(:136), `runWake()` (:169), the suspend-gap re-arm inside
`idleBlankTimer.onTriggered` (:424), and `onAuthenticatingPasswordChanged`
(:481) — and only `runWake()` restores brightness first. Any path that re-arms
without waking leads to a second `runBlank()` against an already-dark keyboard.

The display path (`omarchy-brightness-display`) is worth checking for the same
pattern.

## Suggested fix

Make the save conditional in `bin/omarchy-brightness-keyboard`:

```bash
if [[ $direction == "off" ]]; then
  # Only snapshot a level worth restoring; saving 0 over a good value makes
  # `restore` permanently restore darkness.
  if (( $(brightnessctl -d "$device" get) > 0 )); then
    brightnessctl -sd "$device" set 0 >/dev/null
  else
    brightnessctl -d "$device" set 0 >/dev/null
  fi
  exit 0
```

Guarding `runBlank()` on current brightness would also work, but fixing it in
the script covers every caller.

## Notes

Found on a fresh 4.0.2-1 install. The save file was already poisoned (`0`) by
normal use before any manual reproduction.

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
  • Fixed bypr/10366· confirmed
  • 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.

No decision has been recorded yet.