Skip to content

Keep the lock screen dark after a media key wakes it - #18595

Open
raffsmagic wants to merge 3 commits into
omacom:quattrofrom
raffsmagic:fix-lock-stays-lit
Open

raffsmagic wants to merge 3 commits into
omacom:quattrofrom
raffsmagic:fix-lock-stays-lit

Conversation

@raffsmagic

@raffsmagic raffsmagic commented Nov 12, 2026 •

Copy link
Copy Markdown

Refs #18574

What changes

Hyprland turns the screen on for any key press while locked. A bound key like volume never reaches the lock screen, so its 5 second blank timer never re-arms and the screen stays lit until you unlock or the laptop sleeps.

The lock now watches compositor idle too, and blanks once input has been quiet for 5 seconds. It leaves the resume run-up and password checks alone.

This doesn't cover the no-input wake @jordi-adame traced in the issue, where the idle service wakes the display behind the lock, so that issue stays open. Thanks for the detailed write-up, it made this easy to find.

Verification

Dell XPS 9320, quattro:

  • Before: locked, waited for it to go dark, pressed volume up. The lock screen came on and stayed on past 30 seconds. The idle service logged nothing, so it was Hyprland waking it.
  • After: same steps, it came on and went dark again about 5 seconds later. Unlocking still works.
  • lock-appear-budget, sleep-lock, system-lock and shell-idle-spawn tests pass.

Not tested: the idle service path from the issue, and resume from suspend.

Screenshots

No visible change: it's when the screen goes dark, not how anything looks.

Fixes #18781

@raffsmagic raffsmagic changed the title Keep the lock screen dark after a volume key wakes it Keep the lock screen dark after a media key wakes it Nov 12, 2026
@greptile-apps

greptile-apps Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new blocking issues were found.

Summary

The lock screen now blanks again after five quiet seconds following a media-key wake.

  • A locked screen goes dark five seconds after a media key wakes it.

No new actionable issues found. raffsmagic declined the remote idle disable case because it is outside the media-key fix; Greptile withdrew that finding. The source-only test assertions were removed.

Reviews (4) · Last reviewed commit: "Merge remote-tracking branch 'origin/qua..." · Reviewed by Greptile

Comment thread shell/plugins/lock/Service.qml Resolved
Comment thread test/shell.d/lock-state-test.sh Resolved
@theharshl

Copy link
Copy Markdown

Tested on an NVIDIA desktop, and it fixes #18781 here.

Setup: Omarchy 4.5.0-3, Hyprland 0.56.2, Quickshell 0.3.2.r7, RTX 2060 SUPER (proprietary driver), one DisplayPort monitor. The installed lock/Service.qml was identical to this PR's base, so I replaced it with the file from 24b3169 and restarted the shell. I stopped my hypridle workaround first so it couldn't hide the result.

Run: I locked, waited for the lock to blank the display, then sent keys through the uinput script from #18781. Times are measured from when the injector exits, which is about half a second after the key press.

12:36:27 12s after lock: dpms=false  locked=true
12:36:27 inject VOLUMEDOWN+VOLUMEUP
          +1s: dpms=true    woken by the key
          +5s: dpms=false   blanked again
          4s later: still false
12:36:38 inject VOLUMEDOWN+VOLUMEUP again, same lock
          +1s: dpms=true
          +5s: dpms=false   re-triggers on a second wake
12:36:50 inject LEFTSHIFT (control: reaches the lock surface)
          +1s: dpms=true
          +5s: dpms=false   same as before

Without the patch, the same volume-key run was still lit 27 seconds later, with nothing left to turn it off. Unlocking with the password still worked afterwards. The lock and shell logged no errors.

Not tested: suspend/resume and the 15-second resume run-up, the idle-service wake path from #18574, and the wake-without-input case Greptile raised.

@raffsmagic

Copy link
Copy Markdown
Author

Thanks for testing on NVIDIA, and for the timed log!

Hyprland turns the panel on for any key press, but a bound key like volume
never reaches the lock surface, so the blank timer is never re-armed and the
lock screen stays lit until unlock or suspend. Watch compositor idle while
locked and blank once input has been quiet for the usual run-up.

This also covers the idle service waking the display behind the lock, which
jordi-adame traced in omacom#18574.
@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review labels Nov 17, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 23f5bdc by Claude Opus 5.5 in Claude Code and reproduced on a worker VM built from the Omarchy ISO, running real Hyprland. The fix works for the bug in #18781, and nothing in the 14 lines needs changing. Two lines in the description do need changing; details below.

Reproduction. I locked, waited for the lock to blank the display, then sent KEY_VOLUMEUP from a uinput keyboard and read dpmsStatus from hyprctl monitors -j:

  • quattro at c3c8acf: the key wakes the display, and it is still lit 25 s later.
  • This head: it goes dark again about 5 s after the key. Same with volume down, and with a second wake under the same lock. During an 11 s burst of volume keys it stays lit, then blanks about 5 s after the last key.
  • This head with shell/plugins/lock/Service.qml reverted: still lit 25 s later.
  • Shift as a control reaches the lock surface and blanks again on both.

Suspend/resume and the 15 s resume run-up were not exercised. Both reviewers read that path, and the !idleBlankTimer.running guard leaves a pending run-up alone.

Tests on the worker. ./test/cli passes. The lock and idle shell tests (lock-state, lock-appear-budget, lock-fingerprint-*, system-lock, sleep-lock, hyprland-session-lock, idle, shell-idle-spawn and others) pass. In ./test/all, every file that failed either fails the same way on quattro or passes when run alone. None is in the lock or idle code.

Second opinion. Codex Medium and muse-wonder (pi, thinking high) reviewed the head. They agreed the change is correct and the right size, and independence is not guaranteed. Both also raised, without being pointed at it, the problem with the #18574 reference below. I then confirmed that on the worker.

What it waits on: two edits to the description, @raffsmagic.

  1. Fixes #18574 would close that issue when this merges, but this change does not cover that issue's no-input wake. The lock's new monitor ignores inhibitors, and the idle service's monitor respects them. The idle service can therefore run omarchy-system-wake without any real input, for example when an idle inhibitor changes. The lock's monitor is already idle by then and sees no new transition. On the worker, running omarchy-system-wake under a blanked lock left the display lit 20 s later on this head. Changing it to Refs #18574 keeps that issue open. Skip the idle wake while the session is locked #17450, Leave a locked session's display to the lock screen #9152 and Blank a locked session's displays again after they are lit behind the lock #16368 target that path in the idle service. I have added Fixes #18781, the bug this does fix.
  2. The description still says lock-state-test.sh gets a check that fails without the fix. 23f5bdc removed that check, so the line no longer matches the diff.

Related. #10130 adds the same kind of idle monitor. Its resume handler re-arms the 5 s countdown unconditionally, so input the lock never sees would cut a pending 15 s resume run-up short; this one leaves the run-up alone. #16368 blanks again only on the next lock request. Thanks to @theharshl for the NVIDIA run, which matches what the worker showed.

Once the description is updated, this goes to the maintainer.

@omarchybot omarchybot added the ready Good to merge label Nov 18, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

The two description findings are resolved at unchanged head 23f5bdcf: #18574 is a non-closing reference, and the description no longer claims the removed test. Only #18781 is marked to close.

Opus 5.5 High and muse-wonder via pi, thinking high reviewed the updated description and code, found no runtime defect and agreed that nothing remains for the author; independence is not guaranteed. This re-review reused the 17 November worker reproduction and test logs at the same head, with no new test run. The relevant lock, idle, wake and brightness code on current quattro is unchanged from the tested base. Suspend/resume remains unexercised. This is waiting on the maintainer.

@omarchybot omarchybot removed the ready Good to merge label Nov 18, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

I merged current quattro into this branch; it was 113 commits behind.

What was checked, on an Omarchy worker, against the merged branch:

  • The change is QML with no test; nothing it touches changed on quattro.
  • ./test/cli passes, 136 checks.

Claude Opus 5.5 at high effort reviewed the changes as a second opinion; its findings are folded in. Its independence from my review isn't guaranteed. Greptile scores the new head 5/5 with no open findings.

This waits on the maintainer, starting with approving the workflow run: CI hasn't run on this head yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready Good to merge verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lock screen leaves the display on indefinitely after a volume/media key wakes it while locked

3 participants