Skip to content

fix(lock): wake monitors on input when powered off by lock#2572

Merged
bbedward merged 1 commit into
AvengeMedia:masterfrom
nabaco:fix/lock-dpms-wake-idle-monitor
Jun 4, 2026
Merged

fix(lock): wake monitors on input when powered off by lock#2572
bbedward merged 1 commit into
AvengeMedia:masterfrom
nabaco:fix/lock-dpms-wake-idle-monitor

Conversation

@nabaco

@nabaco nabaco commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

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.

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>
@bbedward bbedward merged commit 45eb101 into AvengeMedia:master Jun 4, 2026
1 check passed
@nabaco nabaco deleted the fix/lock-dpms-wake-idle-monitor branch June 4, 2026 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants