Skip to content

Keep the lock blank from turning the display off (DPMS link-drop crash) - #6642

Open
akashgagda wants to merge 1 commit into
omacom:quattrofrom
akashgagda:lock-blank-config
Open

akashgagda wants to merge 1 commit into
omacom:quattrofrom
akashgagda:lock-blank-config

Conversation

@akashgagda

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #6628 / #6630. The lock screen blanks the display after locking via hyprctl dpms disable, and on some monitors (notably over HDMI) DPMS-off makes the connector physically drop — aquamarine tears the output down under the lock surface, Quickshell hits an EGL fatal (Could not create EGL surface … Invalid argument) and the whole shell exits while still holding ext-session-lock, forcing a reboot.

This ships the DPMS-off workaround as a config option rather than a hardcoded change:

  • lock.displayBlank (default true = unchanged behavior).
  • Setting it to false keeps the keyboard blank but skips the display off.

Verified live on an affected system (Lenovo L24q over HDMI, i915): with lock.displayBlank: false, a full lock → blank-window → unlock cycle produces 0 connector disconnects and the shell survives (previously a reproducible DPMS drop + crash every lock).

Scope

The root cause is upstream (Hyprland/aquamarine escalating DPMS-off into a full disconnect; Quickshell qFataling on lock-surface output loss — quickshell #61/#76 family). allow_session_lock_restore + journal-persisted shell log + dead-lock restart recovery are handled by #6630. This PR is the omarchy-owned user-facing mitigation so affected setups stop forcing reboots.

Notes

shell.json is canonical with no deep-merge, so a config lacking the lock key keeps the true default (verified against the QML resolution).

Copilot AI balanced review requested due to automatic review settings August 8, 2026 16:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds configurable lock-screen DPMS blanking to prevent monitor disconnects and shell crashes.

Changes:

  • Adds lock.displayBlank, defaulting to true.
  • Skips display blanking when disabled while preserving keyboard blanking.
  • Documents the configuration and failure mode.

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 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
shell/shell.qml Adds the built-in default.
shell/plugins/lock/Service.qml Applies the option during lock blanking.
docs/omarchy-shell.md Documents configuration behavior.
config/omarchy/shell.json Adds the fresh-install default.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread shell/plugins/lock/Service.qml Outdated
Process {
id: blankProcess
command: ["bash", "-c", "omarchy-brightness-keyboard off; omarchy-brightness-display off"]
command: ["bash", "-c", root.displayBlank ? "omarchy-brightness-keyboard off; omarchy-brightness-display off" : "omarchy-brightness-keyboard off"]
@dhh

dhh commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Don't like the idea of this being configurable. We need to find a solution that just works. Too esoteric to find this.

Copilot AI review requested due to automatic review settings August 10, 2026 11:40
@akashgagda akashgagda changed the title Make lock display-blank configurable to avoid DPMS link drops Keep the lock blank from turning the display off (DPMS link-drop crash) Aug 10, 2026
@akashgagda

Copy link
Copy Markdown
Contributor Author

Agreed — that's why I reworked this. The configurable flag is gone; the PR now unconditionally drops the DPMS display-off from the lock blank.

The root cause is omarchy-brightness-display off (Hyprland DPMS disable) during the lock blank. On some monitors that makes the display physically drop its link — the Lenovo L24q here does — so aquamarine sees Connector HDMI-A-2 disconnected and tears the output out from under the lock surface. Quickshell then hits a fatal EGL error and exits (rc 255) while still holding the session lock, which ends in the gray lockscreen failsafe and needs a reboot.

The reworked blank dims only the keyboard backlight. The lock surface already covers the desktop (blurred wallpaper + password field), real display-off still happens at suspend / lid-close via omarchy-system-sleep-lock, and nothing in the shell DPMS-blanks on idle, so nothing is lost.

Verified live: with the DPMS off removed the connector never drops — 0 disconnects, 0 DPMS events, and the shell held a secure session lock well past the former 5s blank on the very monitor that normally disconnects. Keeping that single line out of the blank avoids the crash entirely, no per-hardware opt-in.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (1)

shell/plugins/lock/Service.qml:376

  • This removes display blanking for every user rather than making it configurable. No lock.displayBlank key is added anywhere in the repository, and this service never reads shell.shellConfig, so the documented default of true cannot preserve existing behavior and setting the option has no effect. Please add the default/builtin config and select this command based on lock.displayBlank, defaulting to display blanking when the key is absent.
    command: ["bash", "-c", "omarchy-brightness-keyboard off"]

@stappmus

stappmus commented Aug 14, 2026 •

Copy link
Copy Markdown

Confirmed the same failure on NVIDIA RTX 3070 with nvidia-open 610.57.04, Hyprland 0.56.2, and quickshell-git 0.3.0.r20. Four crashes followed the identical sequence: DPMS leaves no outputs, lock surfaces lose their Wayland output, EGL creation fails, and Omarchy Shell exits 255. Applied this PR's keyboard-only blank through a cloned lock plugin; it loaded successfully and avoids the triggering DPMS dispatch.

Tested by GPT-5.4 via Codex.

GPT 5.4 is just a Sol seizure, dont mind me

@stappmus

Copy link
Copy Markdown

Follow-up after testing on the NVIDIA system: removing display DPMS is not a complete fix because it regresses the expected screen-off behavior. I reverted that workaround and tested a narrower fix against the exact installed Quickshell revision (28771c7).

The output-removal path in WlSessionLock::updateSurfaces() removes the surface from its map but only calls surface->deleteLater(). Its QQuickWindow and native EGL/Wayland resources therefore remain alive until the next event-loop cleanup, long enough for Qt to render against the removed output and terminate the process. The minimal fix is to disown and destroy the window immediately while continuing to defer QObject cleanup:

this->surfaces.remove(screen);
auto* window = surface->disownWindow();
window->destroy();
window->deleteLater();
surface->deleteLater();

Validation on RTX 3070 / nvidia-open 610.57.04 / Hyprland 0.56.2 / Qt 6.11.1:

  • patched Quickshell built successfully from revision 28771c7;
  • Omarchy retained its normal omarchy-brightness-display off behavior;
  • controlled lock + forced DPMS-off remained secure for 47 seconds;
  • display woke and unlocked normally;
  • the same Quickshell PID survived, with no EGL failure, fatal Wayland error, or shell relaunch.

This appears to belong in Quickshell rather than Omarchy. Quickshell explicitly disallows AI-authored code PRs, so I have not opened one there. I recommend not merging the global DPMS removal in this PR.

Investigated by GPT-5.4 via Codex.

@howdeploy

Copy link
Copy Markdown

Confirmed the same lock/DPMS output-removal sequence on a QXL guest, with a more severe recovery path than a transient physical-monitor link drop.

System: Omarchy 4.0.1-1, Hyprland 0.56.2-1, Quickshell 0.3.1-1, Red Hat QXL [1b36:0100]. The installed lock service and omarchy-brightness-display match current quattro byte-for-byte.

Two independent boots recorded the same timing:

02:02:36.341  lock-system: lock-timeout
02:02:36.516  lock-requested
02:02:44.201  There are no outputs - creating placeholder screen
02:02:44.392  Not creating lock surface ... not backed by a valid wayland output

09:14:58.570  lock-system: lock-timeout
09:14:58.701  lock-requested
09:15:05.903  There are no outputs - creating placeholder screen
09:15:06.084  Not creating lock surface ... not backed by a valid wayland output

That 7–8 second interval lines up with the lock service's 5-second blank timer followed by omarchy-brightness-display off. Once triggered, all four QXL Virtual-* connectors reported disconnected; the guest stayed on the FALLBACK output until the VM was rebooted.

As a local diagnostic mitigation I intercepted only the DPMS-disable dispatch while passing every other hyprctl command through. Later lock attempts reached the same blank path (the blocked dispatches were logged), but Virtual-1 remained connected and the no-output signature did not recur.

This confirms QXL as another affected output-removal path. It does not resolve the design question raised above: suppressing display-off avoids the trigger, while the immediate window/resource destruction in Quickshell would preserve normal DPMS behavior and address the unsafe output lifecycle directly.

@SoubranMx

Copy link
Copy Markdown

Confirmed on a current Quattro desktop: Omarchy 4.0.3-1, Hyprland 0.56.2-2, Quickshell 0.3.1, NVIDIA RTX 4070 SUPER, and one active LG ultrawide on DisplayPort (DP-2).

With the HDMI TV disabled, omarchy system lock reaches secure=true, then the five-second blank timer produces There are no outputs - creating placeholder screen and Not creating lock surface ... not backed by a valid wayland output. The session remains securely locked but has no usable authentication UI. It reproduces on the first DPMS cycle, and there are no NVIDIA DRM or kernel errors at the event.

This makes lock.displayBlank: false the right user-facing mitigation for this setup. Thanks for proposing it.

@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 5b3a7a8, against quattro at 3faafba (it merges cleanly). The finding: this stops the crash by taking away lock-screen display-off for everyone, and nothing else in Omarchy turns a display off, so it isn't ready as the fix.

What ran. A worker VM (virtio GPU, Hyprland 0.56.2, Quickshell 0.3.1). On quattro, omarchy system lock turned the display off after the 5-second blank (dpmsStatus: false), the output stayed connected and the shell survived. So the connector drop behind this crash doesn't happen on that virtual display, and the worker can't reproduce the bug. The crash reports in this thread (HDMI on i915, NVIDIA over DP, a QXL guest) are the only evidence for it. With this branch merged into quattro, the same lock left the display on (dpmsStatus: true) with the shell alive. ./test/cli had one failure, vscode generated theme references current theme file, which fails the same way on quattro. sleep-lock-test.sh, lock-fingerprint-indicator-test.sh and lock-password-overflow-test.sh all passed.

Findings

  • Locked screens never power off. shell/plugins/lock/Service.qml:376 drops omarchy-brightness-display off, and nothing else turns a display off while it's locked or idle: the idle service only locks, and the clamshell helper only turns the internal panel back on. A desktop that's locked overnight and never suspends keeps its monitors lit showing the lock screen. That's the regression @stappmus and the maintainer raised above, and it hits every machine, not just the affected ones.
  • The blank state is now wrong. runBlank() on quattro still sets displaysBlank = true, but the panel stays lit. With a video lock wallpaper, LockView.qml:48 turns the feed off at the 5-second mark, so the poster shows on a visible screen until the next 3-second DPMS poll switches it back on. This repeats after every wake.
  • The comment is in the wrong place. It sits above property bool lockRequested instead of blankProcess. Also, the description still describes the lock.displayBlank option, which is no longer in the diff.

Second opinion. Codex Medium reviewed the same diff and base. It agreed with the first two findings and the comment placement (independence isn't guaranteed). It found the video poster flicker on its own, and it pointed out that unplugging a monitor while locked still goes through the same output-removal path, so this change doesn't make docking or hot-unplug safe.

Related. This follows up #6628. The same crash is reported in #7478, #12079, #12208 and #9843. #11072 tries a configurable version of the same approach and is marked by its author as needing rework for the same reason. The Quickshell WlSessionLock::updateSurfaces() window-lifetime change @stappmus tested above is a fix that keeps DPMS working. I haven't pushed anything here: whether to give up display-off on lock until that lands upstream is the maintainer's decision, so this is waiting on them.

@aishag80g-stack

Copy link
Copy Markdown

Tested this branch's change on Omarchy (Hyprland, NVIDIA 610.57.04, dual HDMI-A-1/A-2) — same setup as #14368.

Applied the equivalent locally by cloning the lock plugin (omarchy plugin clone omarchy.lock) and dropping omarchy-brightness-display off from the blankProcess command, keeping only the keyboard blank.

Result: loginctl lock-session no longer drops either HDMI output — both monitors stay enabled through the lock and the session is no longer stranded at no-real-screen. Before the change the blank reliably killed both outputs on this GPU/driver combo.

Second confirmation for NVIDIA HDMI, as requested. 👍

@aishag80g-stack

Copy link
Copy Markdown

Second confirmation on NVIDIA HDMI: here the same lock-blank -> monitorremoved -> no-real-screen strand reproduced on NVIDIA 610.57.04 (open module) with dual HDMI (issue #14368 has the controlled repro and logs).

Note for the branch: on Hyprland 0.56.2 the blank path in omarchy-brightness-display now goes through hl.dsp.dpms({ action = "disable" }) (the old dpms off dispatchers are gone). With that dispatch the link-drop no longer reproduces on my setup — both outputs re-train cleanly on wake — so I've disabled my local skip-blank override. The lock.displayBlank setting is still worth having as the supported escape hatch (it's exactly what we had to hand-shim); just flagging that the urgency depends on which Hyprland blank path the user is on.

@SiriusRak

Copy link
Copy Markdown

Confirming this on a second machine, with measurements before and after.

Setup: Omarchy 4.5.0-3, Hyprland 0.56.2, quickshell 0.3.2.r7.g2b4501a-1, AMD Phoenix1 iGPU, a single monitor on HDMI-A-1 (ODA 2468FZV). The monitor drops its HDMI link on DPMS off.

Without the change: 5 s after locking, idleBlankTimer runs omarchy-brightness-display off. Hyprland reports dpmsStatus=false, aquamarine logs Connector HDMI-A-1 disconnected, Hyprland falls back to FALLBACK, and the shell exits with The Wayland connection experienced a fatal error: Invalid argument / Omarchy shell exited with status 255; relaunching. The relaunched shell recovers the stranded lock and blanks again 5 s later. That is the loop described in #19377, #18896 and #17989.

With the same effect as this diff (a local omarchy-brightness-display earlier in PATH that ignores off and passes everything else through): 51 s locked, the screen stays lit, no dpms-off, no connector disconnect, no Wayland error, no shell exit, same shell PID before and after.

For comparison, #18495 (filtering FALLBACK screens) does not stop this loop on this machine: 2 exits with status 255 in 2 minutes locked with it applied. This PR removes the trigger itself.

One note: the description mentions a lock.displayBlank option (default true), but the current diff removes omarchy-brightness-display off unconditionally and adds no option. Either way fixes this hardware. An opt-out would keep display-off for monitors that handle DPMS cleanly, while the unconditional version keeps the change minimal.

Tested with help from Claude Code (Opus 5.5).

@omarchybot

Copy link
Copy Markdown
Collaborator

Rechecked unchanged head 5b3a7a8273169f080c55caa3c57261ab75cc43b9, integrated with quattro at 9aad31a99e4ef425b29ace421ce3d9bb10b8bc0d. Codex High reviewed the code and ran it on an ISO-based worker with a virtio display, Hyprland 0.57.2 and Quickshell 0.3.2.r7. After 12 seconds locked, the base reported dpmsStatus=false, this patch reported true, and reverting the patch restored false; restoring it returned true. Each run kept a secure lock and the same shell PID. The connector-drop crash did not reproduce on this virtual display.

The CLI suite and seven focused lock/sleep/monitor test files passed. Two further files stopped because the worker lacks Node, with the same result on the base. The configured Opus 5.5 High second review could not run because its weekly limit was reached; omabot review --ping confirmed it did not answer. No second opinion completed this recheck.

The earlier video-wallpaper finding no longer applies to current quattro: its lock service no longer uses displaysBlank. The remaining tradeoff still applies: this patch removes automatic lock-time display power-off for every machine, and the idle service and pre-suspend lock helper provide no replacement for a desktop that stays awake overnight. Whether to accept that change remains the maintainer's decision, so this stays waiting on them. I compared #11072, #16457 and #18495; they change the mitigation or address a different output-loss path, and no competing fix was selected here.

@SiriusRak's new AMD/HDMI measurements support suppressing the DPMS trigger, but an equivalent local override does not confirm this exact head. @akashgagda or a maintainer, please confirm repeated lock/wake/unlock cycles with 5b3a7a8273169f080c55caa3c57261ab75cc43b9 merged into current quattro. To install that combination, start with a fresh quattro checkout, run git fetch origin pull/6642/head, confirm git rev-parse FETCH_HEAD prints that full SHA, then run git merge --no-edit 5b3a7a8273169f080c55caa3c57261ab75cc43b9 and omarchy dev link <checkout-path>, accepting the reboot so the session and helpers use the same tree. Please name the full PR SHA, hardware and whether the shell survives each cycle in the result.

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

Labels

bug Something isn't working compatibility Make Omarchy work better on everything!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants