Repository navigation
Re-arm lock blank timer with backoff on screen changes - #8581
Sword-Saint69 wants to merge 3 commits into
Conversation
When a panel deep-sleeps after DPMS-off and drops HPD (such as input-scanning HDMI displays), Hyprland removes and re-adds the monitor powered on. Because the lock blank timer was a one-shot fired at lock+5s, returning monitors remained lit showing the lock screen indefinitely. Re-arm idleBlankTimer with exponential/capped backoff (5s -> 15s -> 30s) on screen changes while locked, allowing Hyprland time to finish configuring newly re-added outputs without high-frequency flashing. Reset backoff count on user wake or password input, and log blanking-display in runBlank for journal visibility. Fixes omacom#8580
|
@dhh @ryanrhughes @omarchybot please review this pr and one thing i want to say is really loving quattro and became a huge fan of it keep up the good work |
There was a problem hiding this comment.
Pull request overview
Re-arms display blanking after locked-screen topology changes to handle monitors that reconnect after DPMS-off.
Changes:
- Adds capped 5s/15s/30s blanking backoff.
- Resets backoff on wake and logs blanking.
- Adds source-level regression assertions.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
shell/plugins/lock/Service.qml |
Implements screen-change blanking backoff and logging. |
test/shell.d/lock-blank-fingerprint-test.sh |
Adds regression assertions for the new behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| assert( | ||
| /onScreensChanged\(\) \{[\s\S]*root\.screenChangeBlankCount \+= 1/.test(serviceQml), | ||
| 'screen changes while locked increment the screen change count' | ||
| ) | ||
|
|
||
| assert( | ||
| /onScreensChanged\(\) \{[\s\S]*root\.armBlankTimer\(delay\)/.test(serviceQml), | ||
| 'screen changes while locked re-arm the blank timer with backoff' | ||
| ) |
|
@dhh @ryanrhughes @omarchybot please review this pr i have fixed the suggestions |
|
Measured this on affected hardware (input-scanning HDMI panel that drops HPD after DPMS-off — full analysis in #8580): the backoff works as coded but the re-add cycle never stops, so the panel still flashes on every cycle — blank events 39s apart at the 5/15/30s backoff, lit for the whole backoff window each time. It also stays lit whenever the user is at the password prompt: keystrokes fire the wake path (DPMS enable-all), and an in-flight password check stops the blank timer. Two more constraints from the same hardware that any re-arm design runs into: a re-added output comes up enabled and re-lights other DPMS-off outputs as well, and while a session lock is active Hyprland refuses to disable an output ( What did stop the flashing on this machine with zero code: the panel's input auto-scan was the trigger. Auto Source → Off in the monitor OSD (input pinned) eliminated the HPD cycling entirely on stock quattro. Might be worth asking the #8580 reporter what their ViewSonic exposes in its OSD — if it has an equivalent setting, that's the per-machine fix, though panels without such a setting will still need a software answer. The |
|
@Chulii Thanks for testing it i will surely provide the fix in the next push just wait |
|
Thanks a lot for testing this on affected hardware and sharing such a thorough breakdown @Chulii! The empirical measurements and confirmation of The 5s → 15s → 30s backoff in this PR serves as the safest software fallback so returning displays don't stay lit indefinitely while avoiding ultra-rapid DPMS mode-switch thrashing. For monitors that continuously drop/poll HPD upon DPMS-off, pinning the input by setting Auto Source / Input Auto-Scan → Off in the monitor OSD is indeed the permanent per-machine fix. I'll note this OSD workaround in #8580 for future reference! |
|
Thanks a lot for the detailed testing and analysis @Chulii! Here is a summary of the behavior and why the current backoff design is the safest software approach: 1. Primary User-Side Fix (Monitor OSD)As you noted, setting Auto Source / Input Auto-Scan → Off in the monitor’s built-in OSD menu (pinning the input directly to HDMI/DP) completely eliminates the HPD drop/re-scan loop on DPMS-off with zero code. We have now documented this in Omarchy's user manual ( 2. Software Safety Net (PR #8580)
3. Upstream Context (Hyprland / wlroots)The underlying root cause is compositor/DRM level: newly re-added outputs default to powered ON in kernel DRM. Retaining output DPMS state across hotplug re-adds in Hyprland / wlroots would be the ultimate compositor-level resolution, and is worth tracking upstream. |
|
@dhh @ryanrhughes please review it check if its viable happy to do contributions on omarchy |
|
Reviewed against Another open pull request is the better fix for #8580: #13129. This pull request re-arms the lock's blank timer when screens change. The panel still drops HPD and comes back lit on every cycle, so the blank ends up chasing the flap rather than stopping it. @Chulii measured this head on affected hardware (an input-scanning HDMI panel on amdgpu) and got blanks 39s apart with the panel lit for each whole backoff window, and lit indefinitely at the password prompt, where keystrokes wake the displays and an in-flight password check stops the timer. The #8580 report predicted exactly this for any re-blank approach. #13129 acts one layer down: it enables amdgpu's HDMI HPD debounce, so the output is never removed and re-added and nothing relights. The reporter's ThinkPad (Renoir) and @Chulii's desktop are both amdgpu, so both are covered. It does not reach non-AMD GPUs, and nobody affected has confirmed it on their machine yet. This branch also conflicts with Two parts are worth keeping whichever fix lands, and each is small enough for its own pull request: the Classified as Waiting on the maintainer to choose between this and #13129. |
When a panel deep-sleeps after DPMS-off and drops HPD (such as input-scanning HDMI displays), Hyprland removes and re-adds the monitor powered on. Because the lock blank timer was a one-shot fired at lock+5s, returning monitors remained lit showing the lock screen indefinitely.
Re-arm idleBlankTimer with exponential/capped backoff (5s -> 15s -> 30s) on screen changes while locked, allowing Hyprland time to finish configuring newly re-added outputs without high-frequency flashing. Reset backoff count on user wake or password input, and log blanking-display in runBlank for journal visibility.
Fixes #8580