Repository navigation
Debounce unforced lock wake calls immediately following display blanking - #8896
Sword-Saint69 wants to merge 2 commits into
Conversation
On AMD APUs with Radeon HDMI audio codecs, turning off DPMS drops the HDMI link and causes the kernel codec driver to emit SW_VIDEOOUT_INSERT evdev switch events. The input subsystem interprets this as user activity, firing runWake() and re-enabling DPMS in a continuous 5-8s flap loop. Ignore unforced wake events during a 1.5s post-blanking window in Service.qml while keeping explicit user interactions (mouse clicks, typing, password submission) forcing immediate wake. Fixes omacom#8863
There was a problem hiding this comment.
Pull request overview
Adds post-blanking wake debouncing to prevent AMD HDMI/DP switch events from immediately re-enabling displays.
Changes:
- Tracks display blanking time and suppresses unforced wakes for 1.5 seconds.
- Forces wake requests originating from
LockView. - Adds a source-level debounce assertion.
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 wake debouncing and forced interaction wakes. |
test/shell.d/lock-blank-fingerprint-test.sh |
Checks the debounce guard exists. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| onSubmitPassword: function(password) { root.submitPassword(password) } | ||
| onClearFailureRequested: root.failureMessage = "" | ||
| onWakeRequested: root.runWake() | ||
| onWakeRequested: root.runWake(true) |
…ignals Differentiate deliberate user interaction (mouse clicks, typing, password submission) from generic motion/switch activity. LockView's wakeRequested signal now passes a force boolean parameter, ensuring mouse clicks and keyboard entry force an immediate wake while pointer motion (onPositionChanged) remains subject to the 1.5s post-blanking debounce.
|
Updated the implementation to differentiate deliberate user input from generic motion:
|
| property double lastBlankedAt: 0 | ||
|
|
||
| function runWake(force) { | ||
| if (!force && locked && (Date.now() - lastBlankedAt) < 1500) return |
| assert( | ||
| /function runWake\(force\) \{\s*if \(!force && locked && \(Date\.now\(\) - lastBlankedAt\) < 1500\) return/.test(serviceQml), | ||
| 'runWake ignores unforced wake events during the 1.5s post-blanking debounce window' |
|
Reviewed against Another open pull request is the better fix for #8863: #13129. This pull request ignores pointer-motion wakes for 1.5s after the lock blanks the displays. The reporters on #8863 measured the display relighting about 3s, 11s and 19s after DPMS-off, so a wake arriving that late passes the window and the loop carries on as before. The window also covers only one wake path. In The test this pull request adds only matches the new source text with regular expressions, so it would pass whether or not the debounce stopped anything. The branch also conflicts with The other open fixes aimed at parts of this cluster are #8581, #9152, #10130 and #10343. They all act on the lock or idle service after the output has already come back. The Waiting on the maintainer to choose between this and #13129. |
Problem (#8863)
On AMD APU setups with Radeon HDMI audio codecs (
snd_hda_codec_hdmi), disabling DPMS (omarchy-brightness-display off) causes the kernel driver to emitSW_VIDEOOUT_INSERTevdev switch events on/dev/input/eventX("HD-Audio Generic HDMI/DP").The input subsystem treats this hardware switch event as user activity, firing
runWake()(omarchy-system-wake) and re-enabling DPMS in a continuous 5–8 second flap loop.Fix
Date.now() - lastBlankedAt < 1500) in Service.qml. Unforced/automated wake calls occurring within 1.5s ofrunBlank()are ignored to swallow hardware HPD/audio switch events.LockViewmouse click, typing, password submission) passesforce = true(runWake(true)), waking the screen immediately without delay.runWakepost-blanking debounce logic.Fixes #8863