Repository navigation
Keep the lock lit for a while after it is woken - #592
Merged
Merged
Conversation
After a lid-open wake the unlock screen lit and went dark again five seconds later with no input, the same run-up the lock takes when it is first locked. The user has just opened the lid to look at it. A wake from a blank panel or from suspend now keeps the lock lit for 30 seconds. Input re-arms the usual five seconds but never cuts a longer run-up short, so the panel goes dark 30 seconds after the wake or five seconds after the last input, whichever is later. The resume watch starts its clock with the lock, so a suspend within a second of locking (sleep-lock) is still seen.
This was referenced Sep 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #589 (base
mac/87-wake-key); retarget toquattro-upstreamonce #589 merges.Owner report on the M2: after a lid-open wake the unlock screen lit, then went dark again about 5 s later with no input. The log shows the resume watch waking the lock and re-arming the same 5 s run-up the lock takes when it is first locked. A second path had the same effect: when sleep-lock suspends within a second of locking, the resume watch had no tick to compare against and missed the resume, so the blank timer's own frozen-countdown branch re-armed 5 s.
Now a wake from a blank panel or from suspend keeps the lock lit for 30 s. Input re-arms the usual 5 s but never cuts a longer run-up short, so the panel goes dark 30 s after the wake or 5 s after the last input, whichever is later. The resume watch starts its clock when the lock is taken, and the frozen-countdown branch takes the 30 s run-up too. An untouched lock still blanks 5 s after locking. The wake-key swallow (#589) and focus recovery (#583) are unchanged. Generic, not Apple-specific.
Tests: new
lock-lit-after-wakeruns the service's ownarmBlankTimer/runWakeagainst a fake clock (lock, wake from blank, early and late input, resume over a frozen countdown, unlocked) and pins the resume watch and frozen-countdown branches; it fails on the previous service. Thelock-*,sleep-lock,system-lock,hyprland-session-locked,apply-lockandvideo-backgroundsuites pass on an x86 Omarchy host with a live Hyprland compositor.Second review: no defects. Noted and left as is: a failed password gets the normal 5 s; when every panel comes back lit after a hotplug flap the lock stays lit until input (predates this change, and re-arming there would loop a flapping external monitor).
Owner check on the M2: lock (Super+Ctrl+L), close the lid, wait for sleep, open the lid and don't touch anything: the built-in panel stays lit at least 30 s, then goes dark. Open again, type the password: unlocks. Also: lock, let it go dark, press a key: stays lit ~30 s without further input.