Skip to content

Make lock display blanking configurable - #11072

Draft
garymeyerca wants to merge 1 commit into
omacom:quattrofrom
garymeyerca:fix/configurable-lock-display-blank
Draft

garymeyerca wants to merge 1 commit into
omacom:quattrofrom
garymeyerca:fix/configurable-lock-display-blank

Conversation

@garymeyerca

@garymeyerca garymeyerca commented Sep 10, 2026 •

Copy link
Copy Markdown

Status: rework required, not a standby/wake fix

Local testing showed that this implementation avoids the failing DPMS transition by leaving the monitor powered on. That is not the required outcome. This PR must preserve Omarchy's existing idle, secure-lock, physical display-power-down, and wake behavior. A permanently visible lock screen or a black software surface with the backlight still on is not an equivalent fix.

Do not merge this implementation as the resolution of #11066. It remains a draft while the failure and a behavior-preserving fix are investigated.

Aquamarine progress: local dpmsfix3, not hardware-approved

See the detailed investigation and verification update on #11066.

  • Built from the exact Aquamarine v0.15.0 baseline. The candidate permits narrowly guarded synchronous disconnected-output teardown rather than changing Omarchy power policy.
  • Current build and offline drmDisconnect, attachments, output and commitThread tests pass. The actual packaged library also passes the regression in a sandbox without real DRM devices or desktop sockets. SONAME remains libaquamarine.so.14.
  • Independent review confirms an unresolved failure path: a failed KMS detach can still allow premature CRTC reuse. Nested synchronous callbacks and actively submitting async/disconnect races remain test gaps; consumer teardown integration also needs verification.
  • dpmsfix3 is not installed. No physical standby/wake or suspend/resume acceptance is claimed. The current read-only baseline has a nonzero 3840x2160@60 mode and the stock shell running, but complete idle/helper routing remains to be checked.
  • Next gates: close review/test gaps; validate rollback and GUI-independent recovery; coordinate any package/session transition; then test real automatic idle, public manual lock, physical standby, protected wake, re-blanking, authentication, repeated cycles and separately approved suspend/resume.

This PR's code is unchanged and remains the original opt-out. Keep it in draft/rework status; do not treat the Aquamarine offline results as validation of this PR or resolution of #11066.

Required behavior

Based on the unmodified Omarchy baseline 8ea51516390320f8e768808b230098e67bdaa82c:

  • Preserve the configured idle timings. Defaults are idle.screensaver: 150 and idle.lock: 300, both measured from the start of user inactivity.
  • Preserve screensaver toggles, stay-awake/inhibitor behavior, and cancellation of a pending idle lock when the user dismisses the screensaver before the lock deadline.
  • At the lock deadline or on manual lock, acquire the secure session lock and preserve normal lock-command side effects: stop the screensaver, reset the keyboard layout, and lock 1Password when applicable.
  • Preserve the normal five-second lock blanking timer, including password-authentication and resume safeguards. The normal blanking action turns off keyboard lighting and sends display DPMS-off. The monitor must actually enter its standby/display-off state, not simply draw black.
  • Keyboard/mouse activity wakes the display to a usable lock screen. The desktop remains inaccessible until authentication succeeds. If the user does not unlock, normal re-blanking remains in effect.
  • Preserve the separate system-suspend path: secure the session before suspend and return to a usable secure lock on resume. Monitor standby is not the same as system suspend.

References:

Current implementation, retained for review history

  • Adds idle.blankDisplay, defaulting to true.
  • Setting it to false stops the blank timer and skips the DPMS-off transition.
  • Adds a testable policy module and documentation.

This is an opt-out workaround, not a repair of the MST/atomic-modeset wake failure. A separate local Aquamarine candidate now has offline regression coverage, but it is not part of this PR and has not been installed or validated on the affected hardware.

Verification limits and acceptance gates

Previous focused/full-suite and QML lint results validate the opt-out implementation only. They do not prove the intended standby/wake cycle.

Local manual tests observed a mapped screensaver, a secure lock, a monitor that stayed powered on, and one user-confirmed successful authentication. The repeated test did not receive an unlock confirmation. These are not successful physical-standby/wake tests.

A further read-only audit found a split local test environment: Quickshell ran from the PR checkout, while the automatic idle service's bash -lc children reset OMARCHY_PATH through /etc/omarchy.conf to the packaged path. A probe in the running shell's environment returned omarchy-shell is not running for that child path. Manual checkout IPC bypassed this problem. The local environment must be made consistent before another end-to-end test; this is a test-deployment flaw, not evidence of an upstream idle regression.

Required before claiming resolution:

  • Reproduce and isolate the original DPMS-off/wake failure with consistent session, helper, IPC, and sleep-service paths.
  • Implement a fix that retains actual monitor standby and secure authentication; do not substitute a DPMS opt-out or software-black overlay.
  • Test the real automatic idle path as well as the public manual-lock command, not just direct lock IPC.
  • Observe physical standby and successful keyboard/mouse wake on the affected hardware; correlate with DRM/Hyprland state and logs.
  • Verify wake without authentication does not expose the desktop and that idle re-blanking still works.
  • Repeat complete standby/wake/unlock cycles and verify the display mode is usable, without requiring reboot, cable reconnection, or compositor restart.
  • Test the separately coordinated suspend/resume path without weakening pre-suspend locking.
  • Add regression coverage for the identified cause and rerun the relevant/full test suites.

Related: #11066

@maeandrew

Copy link
Copy Markdown

Additional reproduction data for PR #11072

Thanks for working on this. I have a closely related reproducible case on an AMD HawkPoint laptop with two 4K external displays. The following data is from the initial failure before applying any local lock-plugin workaround.

Hardware and software

  • Laptop: ASUS Vivobook S 16 M5606UA_M5606UA (BIOS M5606UA.316, 2025-08-08)
  • GPU: AMD HawkPoint1 [1002:1900], amdgpu, Display Core on DCN 3.1.4
  • Internal panel: Samsung 3200x2000 at 120 Hz (eDP-1)
  • External displays: two Samsung LS27A70 3840x2160 at 60 Hz
    • HDMI-A-1
    • DP-2
  • Omarchy: 4.0.3-1
  • Hyprland: 0.56.2-2, commit efb50993780079460b0cbed1363e2166a2de1d9f
  • Aquamarine: 0.15.0-2
  • Kernel: 7.2.3-arch1-3
  • Mesa: 26.2.2-1
  • Firmware package: 20260810-2

The failure was observed with the laptop lid closed while on AC power. HandleLidSwitchExternalPower=ignore was configured so closing the lid should not suspend the machine.

Reproduction and result

  1. Start a normal session with both external displays connected.
  2. Leave the standard Omarchy idle settings enabled (screensaver=150, lock=300).
  3. Let the automatic idle lock engage while the lid is closed.
  4. The lock reaches secure=true. About five seconds later the stock lock service runs:
omarchy-brightness-keyboard off; omarchy-brightness-display off
  1. Wake/unlock the session.

After the first lock/blank/wake cycle, one external output can remain black and does not receive the pointer. The affected output is not stable: in different attempts it was DP-2 or HDMI-A-1. The output may remain listed as connected, but Hyprland can report a zero-sized output (width=0, height=0) while its mode list is still present. In the worst case, opening the lid or disconnecting the external displays did not restore a usable image; a reboot was required to reset the display engine.

The failure is not limited to a particular left/right position or one connector. Both external displays worked before the idle-lock transition, and the affected connector varied between HDMI and DisplayPort.

Kernel evidence

The clearest reproduction occurred on 2026-09-14:

10:24:57  omarchy idle: lock-timeout
10:24:58  omarchy lock: secure=true
10:25:03  amdgpu: [drm] REG_WAIT timeout 1us * 100 tries - dcn31_program_compbuf_size line:143
10:25:03  WARNING ... dcn31_program_compbuf_size ... CPU#9: Hyprland/1258

The kernel warning stack includes:

dcn20_optimize_bandwidth
dc_commit_state_no_check
dc_commit_streams
amdgpu_dm_atomic_commit_tail
drm_atomic_commit

After the output became unusable, userspace also logged repeated gdk_monitor_set_scale: assertion 'scale > 0.' failed messages and applications reported invalid output widths/heights of zero.

There was no system suspend event at the time of this reproduction: the journal shows the Omarchy idle-lock path followed by secure=true, then the amdgpu warning. This points to the lock-time DPMS transition rather than resume from system suspend.

Configuration comparison

The idle timings and the lock/DPMS command were stock for the installed Omarchy package. The monitor layout is customized: it names HDMI-A-1, DP-2, and eDP-1 explicitly, uses preferred modes, scales of 1.5/1.5/2, and fixed positions. It does not set HDR, VRR, max_bpc, transforms, or any special DPMS option.

There are also local user changes unrelated to the initial reproduction: a clamshell logind drop-in and a cloned lock plugin. The cloned lock plugin was created only after reproducing the failure; its only relevant change is to keep the keyboard backlight command and skip omarchy-brightness-display off.

With display DPMS skipped, the secure lock remains usable and the three outputs remain available in subsequent manual checks. This confirms the DPMS transition as a useful trigger for the workaround, but it does not establish a proper physical standby/wake fix.

This appears related to #8863, #9078, and the earlier AMD Phoenix/HawkPoint report in #5910. In particular, a recovery path should not treat an output as healthy solely because it has a valid mode list or dpmsStatus=true if its actual DRM state is disconnected, disabled, or otherwise unable to present a frame.

Requested diagnostic/fix direction

Could this case be used to distinguish the user-facing opt-out from the underlying failure? The opt-out is valuable for affected machines, but the logs suggest a failed AMD DCN atomic modeset during the DPMS-off transition. A complete fix should ideally preserve secure locking and physical display standby while recovering from, or avoiding, the invalid atomic transition without requiring a reboot or cable reconnection.

@jandrusk

Copy link
Copy Markdown

Since the description already says not to merge this as the fix for #11066, and the failure there has since been traced to hyprwm/aquamarine#386 (fixed by aquamarine#410, which shipped in aquamarine 0.15.1, see #11019), is this PR still needed? If a configurable lock blank is still wanted on its own merits, a rebase with that framing would help. Otherwise it may be simplest to close it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants