fix(lock): wake monitors on input when powered off by lock#2572
Merged
bbedward merged 1 commit intoJun 4, 2026
Conversation
The "power off monitors on lock" path relies on wake handlers (MouseArea/Keys) at Lock.qml's root Scope, which sit outside the WlSessionLock surface and never receive input while locked. The feature only appeared to work on compositors that auto-restore output power on input; compositors that fully tear down the output (e.g. MangoWC disable_monitor) leave the screen off until blind-unlock. Add a seat-level IdleMonitor (wlr idle-notify, surface-independent) in IdleService that restores monitor power on any keyboard/pointer activity. Gated on isShellLocked + monitorsOff + the setting, so it is inert unless that path actually powered the monitors off. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Problem
With "Power off monitors on lock" enabled, the screen never wakes on keyboard/mouse input while locked on some compositors. The only way to get the display back is blind-typing the password to unlock.
Root cause
The immediate power-off path's wake handlers (`MouseArea` + `Keys` on a `FocusScope`) live at `Lock.qml`'s root `Scope` level — outside the `WlSessionLock` surface. A `Scope` has no surface, so those handlers never receive any input events while the session is locked (verified with instrumentation: password input reaches `LockSurface` inside the lock surface, the root-level handlers receive nothing).
The feature only ever appeared to work on compositors that automatically restore output power on input after a DPMS-off. Compositors that fully tear the output down (e.g. MangoWC's `disable_monitor`) leave the screen off until unlock. The bug is compositor-agnostic — the wake handlers are dead code everywhere; behavior just differs by how each compositor handles output power.
Fix
Add a seat-level `IdleMonitor` (`ext-idle-notify`) in `IdleService.qml` that requests monitor power-on upon any keyboard/pointer activity. Idle-notify is seat-based, so it works independent of surfaces and compositor output-power behavior — same mechanism the existing `postLockMonitorOffMonitor` already uses successfully.
Gated on `isShellLocked && monitorsOff && lockScreenPowerOffMonitorsOnLock`, so it is inert unless the lock power-off path actually turned the monitors off.
Testing
On MangoWC: lock → monitors power off immediately → any key press or mouse movement wakes both monitors to the lock screen. Previously the screen stayed off until blind unlock.