omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Lock screen wakes in a loop on monitors that drop HDMI hotplug in standby

Open lucasmendesdeliver opened this issue 2 months ago • 13 comments

Lock screen wakes in a loop on monitors that drop HDMI hotplug in standby

System details

  • Omarchy: 4.0.4-1
  • Kernel: 7.2.5-3-omarchy
  • Hyprland: 0.56.2
  • Quickshell: 0.3.1-1
  • CPU: AMD Ryzen 9 5900X
  • GPU: AMD Radeon RX 550 (Lexa PRO, amdgpu)
  • Monitor: Philips 278E1 (27" 4K) on HDMI-A-1. I saw the same behavior before on an Acer monitor, and it was worse there.

What happens

While the session is locked, the display keeps turning on and off. Each time it comes back it shows the password field for a few seconds, then goes dark again. This repeats for as long as the machine stays locked.

Expected

After the lock blanks the display, it stays off until real keyboard or mouse input.

Steps to reproduce

  1. Use a monitor that drops its HPD line when it goes into standby. Many HDMI monitors do this.
  2. Lock with omarchy system lock, or let the idle timeout lock the session.
  3. Don't touch anything.

After about 5 s idleBlankTimer fires and runs omarchy-brightness-display off, which disables DPMS. A few seconds later the display wakes up showing the lock UI, and the cycle starts over.

What the logs show

The Hyprland log ($XDG_RUNTIME_DIR/hypr/*/hyprland.log) has dozens of back-to-back disconnect/reconnect pairs for the output while locked:

drm: Got a hotplug event for /dev/dri/card1
drm: Connector HDMI-A-1 disconnected
ERR from aquamarine ]: drm: Cannot commit a disconnected output
drm: HDMI-A-1 is not connected, clearing stale crtc 67
drm: Got a hotplug event for /dev/dri/card1
drm: Connector HDMI-A-1 connected
drm: Modesetting HDMI-A-1 with [email protected]      <- panel lights up with the lock UI
...
drm: Disabling output HDMI-A-1                        <- blanked again
drm: Got a hotplug event for /dev/dri/card1           <- monitor enters standby, drops HPD, loop repeats

Suspected cause

  1. The lock blanks the display (DPMS off). The monitor gets no signal, goes into standby and drops HPD.
  2. Hyprland removes the output and adds it back. The re-added output comes up with DPMS on and gets a full modeset.
  3. Quickshell recreates the WlSessionLockSurface for the new output. The pointer "enters" the new surface, so the MouseArea in plugins/lock/LockView.qml fires onPositionChanged -> wakeRequested() -> runWake(), which runs omarchy-system-wake and re-arms idleBlankTimer.
  4. 5 s later the display is blanked again, and the loop continues from step 1.

So the lock treats an output hotplug as user activity, and a newly added output ignores the fact that the lock had already blanked the screens.

Suggested fix

  • While the lock is in the blanked state, don't let an output being added or the lock surface being recreated count as activity. For example, ignore pointer enter / position changes that come with no real motion, or suppress wake for a short grace period after Quickshell.onScreensChanged.
  • When an output is (re)added while locked and blanked, keep it or put it back in DPMS off instead of leaving it on.

Workaround

Pin each connected connector's EDID at boot through debugfs edid_override, then set /sys/class/drm/cardN-<connector>/status to on. amdgpu then emulates the link while the monitor sleeps and no disconnect reaches the compositor. It works, but it needs root and a system service, and it breaks hot-swapping monitors on that port until the next reboot.

lucasmendesdeliver avatar Sep 29 '26 23:09 lucasmendesdeliver

Thanks for the detailed report. I checked it against current quattro (7dd477b35). The path you describe is still there:

  • shell/plugins/lock/LockView.qml:152: the full-surface, hover-enabled MouseArea calls wakeRequested() on every onPositionChanged.
  • shell/plugins/lock/Service.qml:502 connects that to runWake(). At Service.qml:249, runWake() runs omarchy-system-wake (DPMS back on) and re-arms the 5 s idleBlankTimer (Service.qml:743).
  • Service.qml:797: when screens change, the onScreensChanged handler drops the lock's record that the displays were blanked (displaysBlank = false). Nothing puts a re-added output back into DPMS off.

So the mechanism you describe is consistent with the source, and an output re-added with DPMS on is enough to keep the loop going. I have not reproduced it, because that needs a monitor that drops HPD in standby, and a test VM has no such monitor. Whether every reconnect actually delivers a pointer event to that MouseArea on your machine is not established.

This looks like the same loop as #11330, which is older and still open. I tried to close this one as a duplicate of it, but the independent check refused: Codex Medium, comparing the two reports alone, did not agree they are the same. So this stays open, and whether to merge the two reports is the maintainer's call. What this report adds is the pointer-wake path; #11330 only says the timer re-arms.

Three open pull requests address this loop. None of them has been shown to fix it on hardware like yours:

  • #10343 ignores pointer motion for a while after an output change, but still re-arms the blank timer, so a returning output can still light up and be blanked again.
  • #11991 wakes only on a click or a key. That removes the pointer path, but nothing turns a re-added output back off, so the monitor may stay lit.
  • #13129 debounces HDMI hotplug on amdgpu so the output is never removed at all. Whether it helps depends on how long your monitor holds HPD low.

Claude Opus 5.5 reviewed this, and Codex Medium gave a second opinion. Codex agreed the wake path is explained by the source but not confirmed, and it raised the limits of each pull request listed above. Its independence from the first review is not guaranteed. This is waiting on the maintainer to choose an approach.

omarchybot avatar Oct 13 '26 06:10 omarchybot

Same loop here, plus a few findings from chasing it that might help decide between the open PRs.

Setup: Omarchy 4.0.6, kernel 7.2.8-9-omarchy, Hyprland 0.56.2, Ryzen 9 9950X with the integrated Radeon 610M, MSI MAG B850M Mortar WiFi (HDMI is the only video output on the board). Seen with two different monitors on that port, an ASUS PA278CV (TMDS, 1440p) and a Dell U3224KB (HDMI 2.1 FRL, 6144x3456@60), so on this machine it is the GPU/port side that drops the link on DPMS off, not a particular panel. Loop period was ~22 s with the ASUS and ~40 s with the Dell; on bad days the journal shows 1,800 output removals.

Findings

  1. The amdgpu debounce (#13129) stops the loop but has two costs on kernel 7.2 with an HDMI 2.1 monitor. Wake after a real standby takes 35–50 s because FRL link training fails and the kernel never retries (AMD issue 5709), and it deadlocked the driver once when the sink pulsed HPD during such a wake (details on the PR). So I would not treat that as the fix for FRL monitors.

  2. The relight is partly self-inflicted on the shell side. In plugins/lock/LockView.qml, wakeRequested() fires on every onPositionChanged and every Keys.onPressed, and each one spawns omarchy-system-wake. In my journal a single unlock produced 27 omarchy-system-wake runs within about 5 seconds, and a reconnecting output triggers it the same way via the pointer-enter the reporter described. A short throttle (ignore wake requests for ~1 s after one has been dispatched) would cut that noise regardless of which fix is chosen.

  3. Sleeping the monitor over DDC/CI instead of DPMS avoids the whole chain. The loop only exists because DPMS off drops the HDMI link. If the lock screen instead sends the monitor's VCP power-mode command (ddcutil --noverify setvcp D6 04 to sleep, D6 01 to wake), the GPU keeps the link trained, nothing disconnects, nothing reconnects, and wake is instant because there is no link training. I have run this for a day via a PATH override of omarchy-brightness-display (so the packaged files are untouched):

    # off
    ddcutil --noverify --maxtries 5,5,5 setvcp D6 04
    # on
    ddcutil --noverify --maxtries 5,5,5 setvcp D6 01
    

    --noverify matters: once this Dell is off it stops acknowledging writes, so a verified write reports failure even though it was applied. Results: 10 lock cycles including one 7 h 20 min sleep, 0 Disabling output and 0 Connector … disconnected lines in the Hyprland log, 6K@60 intact after every wake, picture back within a second of the first key press. The monitor draws ~0.5 W in that state, the same as DPMS standby. ddcutil is already a dependency (omarchy-brightness-display-ddc uses it).

Proposal

Teach omarchy-brightness-display off|on a DDC mode, opt-in per machine (a toggle, or automatic for external monitors that answer VCP D6), with DPMS as the fallback for monitors that do not. The lock plugin would not need to change, because it already goes through that script for both blank and wake. I am happy to turn my override into a PR if the maintainers are open to it; it is about 30 lines plus a test in test/shell.d.

Caveats worth knowing: DDC/CI must be enabled in the monitor's OSD (it is by default on this Dell), DDC writes take ~0.4 s, and a monitor that will not wake over DDC needs a DPMS cycle as a fallback, which the override does.

Prepared with the help of Claude (Anthropic's AI assistant) from this machine's logs; reviewed and posted by me.

kstaikov avatar Oct 24 '26 04:10 kstaikov

One more finding from a day of logs, since it affects both the DPMS and the DDC path:

A monitor that appears while locked stays lit. plugins/lock/Service.qml arms the 5 s blank timer on lock, on a wake request and after a password attempt, but onScreensChanged only re-requests the session lock. When the output comes back during a lock (HDMI hotplug cycling, or a KVM monitor switching back to this input from another computer) it comes up lit and stays lit until someone touches an input. On my machine that was three stretches of 26 to 70 minutes in one day, each time the monitor's KVM returned from a laptop; the lock had been active for 18 hours and nothing on this box had re-blanked it.

Re-arming the blank timer in onScreensChanged while lockRequested is set would cover it. As a stopgap I run a small user service that listens on Hyprland's socket2 for monitoradded and, if omarchy-shell lock isLocked is true, re-runs omarchy-brightness-display off after 5 s; it logs each action, which is how the numbers above were measured.

The DDC approach from my earlier comment is now up as #16457.

Prepared with the help of Claude (Anthropic's AI assistant) from this machine's logs; reviewed and posted by me.

kstaikov avatar Oct 24 '26 04:10 kstaikov

Same loop on NVIDIA, so #13129 (amdgpu-only) can't cover every case.

Edited 2026-10-27: this comment first claimed the two shell-side changes below fixed it. They didn't; the connector force further down did.

Setup: Omarchy 4.5.0rc1, Hyprland 0.56.2, Quickshell 0.3.2 (2b4501a), kernel 7.2.8-10-omarchy. Lenovo laptop in clamshell (Ryzen 7 260 + RTX 5060 Mobile), LG UltraGear 4K OLED on HDMI-A-1. HDMI-A-1 is on the NVIDIA dGPU (nvidia-drm, nvidia-open 615.78.08); Hyprland renders on the AMD iGPU (aquamarine primary card1) and copies frames to it. The HPD drop is reported on the nvidia-drm connector, so the amdgpu debounce in #13129 doesn't apply. Period ~34 s: blank at lock+5 s, HPD drops ~25 s later, output back lit 2-3 s after that. A Mac on the same monitor stays dark through the same standby drop. Each drop also crashes the shell (exit 255, the #12079 / #11213 signature: Could not create EGL surface (EGL error 0x3000), then The Wayland connection experienced a fatal error: Invalid argument), about twice an hour on average.

Confirming the pointer path: with logging added to Service.qml, runWake() ran 1-3 s after the output returned, with no input on any device. Ignoring the first onPositionChanged per LockView surface (no movement yet) stopped those wakes.

Shell-side changes: not enough. I tried the pointer gate plus a re-blank (if displaysBlank was set when onScreensChanged fires while locked, call runBlank() 1.5 s after a screen is added instead of arming the 5 s timer). Every returning screen got re-blanked, but over a day of normal use the monitor still dropped out 2-3 times per lock and the shell still crashed 6 times in 16 h. They treat the symptom; the output still goes away.

What stopped it: telling the kernel to ignore hotplug on that connector, so the standby HPD drop never reaches Hyprland:

C=/sys/class/drm/card0-HDMI-A-1
D=/sys/kernel/debug/dri/$(basename "$(readlink -f $C/device/device)")/HDMI-A-1
cat $C/edid > $D/edid_override   # pin the modes in case EDID can't be read in standby
echo on > $C/status              # DRM core connector force; nvidia-drm honours it
# undo: printf reset > $D/edid_override; echo detect > $C/status   (no newline on reset, or EINVAL)

With the stock DPMS-off blank: 5 locks (2-30 min) over 6 h, 0 monitor add/remove events, 0 shell restarts (same quickshell pid throughout). Not yet checked across suspend/resume.

The catch: a forced port reads "connected" with no cable, which breaks lid-close suspend once the monitor is unplugged. I only hold the force while a USB device that is only present at my desk is attached, and release it otherwise. Something like that could live in Omarchy, but the general fix is probably in the compositor: debounce HPD loss on an output that is DPMS-off, for every driver rather than only amdgpu.

Prepared with the help of Claude (Anthropic's AI assistant) from this machine's logs; reviewed and posted by me.

ryanhendry avatar Oct 24 '26 17:10 ryanhendry

Another data point for this loop, plus a workaround that avoids DPMS on the external monitor.

Setup: Omarchy 4.0.6, Hyprland 0.56.2, aquamarine 0.15.1, amdgpu, laptop panel eDP-1 plus an MSI G271 on HDMI-A-1 (1920x1080@120). The monitor drops HPD when DPMS goes off. Hyprland's log shows one drm: Connector HDMI-A-1 disconnected followed by drm: Connector HDMI-A-1 connected per lock, and the screen goes black, comes back, and goes black again in a loop. Once, Hyprland showed the "lockscreen crashed" failsafe and I had to recover it from a TTY with hl.clear_crashed_lockscreen(). Quickshell itself stayed up: the lock log shows session-locked=true and secure=true normally, so the trigger is the monitor bounce, not a shell crash.

Workaround I'm running (patch of omarchy-brightness-display):

  • off: DPMS-disable only monitors named eDP-, LVDS- or DSI-. For external monitors, save brightness (VCP 10) and contrast (VCP 12) over DDC/CI, then set both to 0.
  • on: restore the saved values.

Brightness 0 alone left the panel visibly lit; contrast 0 as well made it black. The link stays up, so Hyprland logged no further HDMI disconnect during my lock tests, and the lock test worked on the machine. I only ran a handful of lock cycles, not a long soak. I did not try the D6 power-mode approach mentioned above, so I can't compare it. This variant leaves the external monitor on its backlight (dark), so it saves less power than standby.

Patch, installer and a pacman hook that re-applies it after omarchy upgrades: https://github.com/636B65/omarchy-lock-external-monitor

Prepared with the help of Claude Code (Anthropic) from this machine's logs.

636B65 avatar Oct 31 '26 17:10 636B65

Thanks to everyone who added logs here. I re-checked this against current quattro (175e63b62). The lock code changed after my last comment, and that changes which of the open pull requests can end this loop.

What changed on quattro. Since 7655773 (#15294), a screen that arrives while the session is locked re-arms the 5 s blank timer (shell/plugins/lock/Service.qml:827-832). So the case @kstaikov described, where a monitor that comes back during a lock stays lit, should no longer happen on quattro: it gets blanked 5 s after it appears.

Why the loop is still there. That same re-arm closes the loop without any pointer event. The blank timer runs omarchy-brightness-display off, which turns DPMS off on every display (bin/omarchy-brightness-display:87-88). A monitor that drops HPD in standby is then removed and re-added lit, the re-added screen re-arms the timer, and 5 s later it is blanked again. The pointer wake from the original report (LockView.qml:139 → runWake()) is still there too, but on quattro it is no longer needed for the loop to continue. The source shows the timer side. That these monitors drop HPD and come back lit rests on the logs in this thread, since it can't be reproduced without such a monitor.

What that means for the open pull requests:

  • #10343 and #11991 only change the pointer wake. On quattro neither can end the loop for a monitor that always drops HPD on DPMS off, because a returning screen re-arms the blank anyway. That matches @ryanhendry's result: gating the pointer stopped the extra wakes, but the monitor still dropped out. #10343 also no longer applies cleanly to quattro.
  • #13129 stops the output from being removed at all, but only on amdgpu over HDMI, only once the module option is loaded after a reboot, and only for an HPD drop shorter than the 1.5 s window. It does nothing for the NVIDIA case above. The slow wake and the deadlock @kstaikov reported on an HDMI 2.1 FRL monitor come from their testing, not from anything in the diff.
  • #16457 (new since my last comment) avoids DPMS off, so it could cover any GPU. It is opt-in, and it applies only when every enabled display is external. If any DDC write fails it falls back to DPMS for all displays, which brings the loop back. Whether a monitor keeps HPD up in DDC power-off depends on the model: the shell can't check that, and --noverify means a successful write doesn't confirm the monitor went to sleep.
  • @636B65's brightness and contrast workaround is a different approach from #16457: the monitor stays powered but dark, so the link stays up, but it saves less power.

Ending the loop for every HPD-dropping monitor needs one of two things: the HPD drop never reaches the compositor (kernel or compositor side), or the lock stops using DPMS off on those monitors. The shell-side pointer patches alone can't do it on quattro. Choosing an approach is the maintainer's call, so this is waiting on them. I haven't linked any of these pull requests to the issue, because none of them has been shown to fix it on the reporters' hardware.

Claude Opus 5.5 did this review. Codex Medium and muse-wonder (via pi, thinking high) each gave a separate second opinion, from the source and the four diffs. Both independently traced the screen-arrival re-arm to #15294, and both reached the same conclusion about each pull request. muse-wonder also pointed out that a logged runWake() doesn't by itself mean a DPMS-on was dispatched, because the display-on command skips the dispatch when every display already reports DPMS on. Their independence from my review isn't guaranteed.

omarchybot avatar Nov 02 '26 00:11 omarchybot

Thanks for the re-check. Notes on #16457 from the machine it runs on, since the caveats are all real and worth having in one place.

Opt-in. Deliberate for now. Whether a monitor honours VCP D6 and keeps HPD asserted while asleep is per model, and the shell can't probe it. Defaulting the toggle on would change lock-screen behaviour on every DDC-capable monitor, including the ones that are fine with DPMS. Once there is a list of confirmed monitors it could default on for those; I'd rather have the toggle first.

DPMS fallback on a failed write. Yes: a refused DDC write brings DPMS back, loop and all. The alternative is leaving the monitor lit behind the lock screen, which is worse. A monitor that refuses the write is the monitor that gets DPMS today, so that case is unchanged rather than regressed.

--noverify. Also true. The monitor stops answering reads once asleep, so the write can't be confirmed over DDC. What remains is the same check DPMS leaves you with: the screen goes dark. A read-back with a timeout is possible if a reviewer wants the extra round trip; on this monitor it would only time out.

Every enabled display external. This is the choice that leaves @636B65's laptop-plus-external setup out, and I agree it's the next case to cover. It's gated because omarchy-brightness-display off turns DPMS off for all displays in one dispatch; sleeping the external over DDC while the built-in panel goes DPMS needs DPMS per display. Hyprland's dispatcher takes a monitor argument (omarchy-hyprland-monitor-clamshell already uses it), so a follow-up could DDC-sleep the externals that take the command and DPMS only the built-in panel. I'd keep it out of this PR to keep the diff reviewable, unless the maintainer prefers it in. The brightness-and-contrast variant is a reasonable complement for monitors that ignore D6.

On the #15294 re-arm. Confirmed on the source, thanks. One case it doesn't reach: a KVM monitor switching back to this box after the other computer sleeps. The HDMI link never drops, so the compositor sees no screen change at all; only the monitor's USB devices reconnect, and the lock screen stays lit until an input is touched (29 min here on 2026-10-27). That's hardware-specific enough that I handle it locally with a udev watcher rather than proposing it here.

Prepared with Claude's help; reviewed and posted by me.

kstaikov avatar Nov 02 '26 15:11 kstaikov

Same loop on Intel i915, with a laptop panel and one external monitor in mirror mode, on Omarchy 4.5.0-3.

Setup: Omarchy 4.5.0-3 (stable), kernel 7.2.15-1-omarchy, Hyprland 0.56.2-4, aquamarine 0.15.1-1, Quickshell 0.3.2.r7.g2b4501a-1. Intel i7-1165G7 with Iris Xe (i915) drives both outputs. The laptop also has an NVIDIA MX350, but it does not drive a display. Laptop panel eDP-1 plus a Samsung C27R50x on HDMI-A-1 (1920x1080@60), mirrored with omarchy hyprland monitor internal mirror on.

What happens: After I lock, both screens go black, then come back with the lock screen, then go black again. This repeats every ~15 s until I unlock. On 4.0.x the monitor dropped and came back once per lock. On 4.5 it loops the whole time. This fits the #15294 re-arm described above (shell/plugins/lock/Service.qml:827-832 in my installed 4.5.0-3).

Log: Today's Hyprland log has 59 Connector HDMI-A-1 disconnected events across four locks. The last lock lasted ~12 minutes. Every cycle looks the same:

drm: Connector HDMI-A-1 disconnected
ERR from aquamarine ]: drm: Cannot commit a disconnected output
drm: Got a hotplug event for /dev/dri/card2
drm: Connector HDMI-A-1 connected
drm: Modesetting HDMI-A-1 with [email protected]
ERR from aquamarine ]: drm: Cannot commit when a page-flip is awaiting
drm: Disabling output HDMI-A-1
drm: Got a hotplug event for /dev/dri/card2

The shell journal shows the lock surfaces being rebuilt at the same ~15 s rhythm (19:12:55, 19:13:10, 19:13:25, 19:13:40).

So this also happens on i915, not only on amdgpu, NVIDIA and apple-dcp. Note for #16457: its "every enabled display is external" gate leaves out this setup too (laptop panel + one external), the same as @636B65's.

The loop has a second effect: mirror mode is off after I unlock. That has a different cause, so I filed it separately: #17917.

amyavari avatar Nov 06 '26 15:11 amyavari

Same loop here, with a few data points I did not see above.

System details:

  • Omarchy 4.5.0-3
  • Hyprland 0.56.2
  • Kernel 7.2.15-1-omarchy
  • CPU: AMD Ryzen 5 7600X
  • GPU: Sapphire RX 590 (amdgpu)
  • Monitor: Philips 243V7QDS, a single monitor, on HDMI-A-2

The monitor shows "No input", then "Entering sleep mode" at about the time the link drops (hand-timed, within about a second).

The drop does not need the lock plugin, and it is not specific to one of the card's two HDMI sockets.

  • Unlocked, sleep 5; omarchy-brightness-display off with no input: a DRM hotplug uevent arrives 11.7-12.2 s after DPMS off (two runs), monitorremoved follows about 12 ms later, and the output is back 0.74 s after that with dpmsStatus true. With the lock the cycle is the one described here (~18.5 s).
  • The same drop at 11.8 s on the card's other HDMI socket (HDMI-A-1).
  • With drm.debug=0x6, one cycle: link=3 ... is now Disconnected, DCHPD ... New sink=0, EDID changed, hotplug event, then Connected 0.7 s later. No line says why the detect ran; I did not enable the DC HPD log bits.

Forcing the connector stops it, as ryanhendry found above on NVIDIA; it works on AMD too: echo on | sudo tee /sys/class/drm/card1-HDMI-A-2/status, made permanent with a udev rule: SUBSYSTEM=="drm", KERNEL=="card*-HDMI-A-2", ATTR{status}="on". on-digital also works (that is what I used for the tests below). With the stock lock the screen blanks after 5 s and stays dark (82 s test, no hotplug event). It survived a reboot and a hibernate resume (a lock cycle after resume worked).

Caveats seen with the force on:

  • No events at all when I powered the monitor off, pulled its power cable or unplugged the HDMI cable; the picture came back normally each time.
  • After moving the cable to the other HDMI socket with the force still set on the old connector, the old output stayed as a phantom screen: the mouse moves onto it and windows open there unseen. Clear it first with echo detect | sudo tee .../status.

Second symptom, with the force on: the stock 5 s timer re-blanked 5.05 s after a wake. This monitor needs a few seconds to relight, so one key press was not enough. A clone of the lock plugin with idleMs 15000 fixes that for me (this is the case in #17228, which #17271 addresses).

An idea I have not tried, building on the force above: in the lock plugin, count a display re-appearing after the lock's own blank with no key press or mouse move in between (say twice within a minute; a user wake does not change the screen count, a single suspend resume counts once). Then either stop blanking for the rest of the lock, or force the connector connected until unlock and detect on unlock, so monitors that behave are left alone, and the force is not held at times when the monitor could be unplugged. Writing the sysfs file needs root, and plugin code runs as the user (the tailscale plugin uses pkexec). idleMs: 5000 is hard-coded in 4.5.0-3. I have not tested #16457.

#13129 (HDMI HPD debounce), tested at runtime: with the force cleared and echo 1500 | sudo tee /sys/module/amdgpu/parameters/hdmi_hpd_debounce_delay_ms (read back 1500), omarchy-brightness-display off and no input: the hotplug event still came 11.7 s later and the monitor was back 0.79 s after the removal, the same as with the parameter at 0. So on this RX 590 and monitor a runtime write did not help. I did not try setting it at module load (modprobe.d), so this does not rule the PR out.

Prepared with the help of Claude Code (Anthropic) from this machine's logs; the tests were run and the text reviewed by me.

elaraisav avatar Nov 06 '26 16:11 elaraisav

Same loop on an RX 6600 (Navi 23, amdgpu), and the connector force stops it here too.

Setup: Omarchy 4.5.0-3, kernel 7.2.15-1-omarchy, Hyprland 0.56.2, aquamarine 0.15.1-1, Quickshell 0.3.2.r7.g2b4501a-1. Desktop with two monitors on the RX 6600: LG IPS QHD (EDID GSM model 23744, 2024) on HDMI-A-1 at [email protected], and an LG UltraGear on DP-1 at 1920x1080@144. Only the HDMI monitor loops: while locked, DP-1 stays dark and HDMI-A-1 keeps coming back with the password field. One session's Hyprland log had 148 Connector HDMI-A-1 disconnected lines.

Without the lock. With misc:mouse_move_enables_dpms and misc:key_press_enables_dpms turned off for the test so stray input could not wake it, I turned DPMS off on HDMI-A-1 alone (hl.dsp.dpms({ action = "disable", monitor = "HDMI-A-1" })) and watched for 50 s:

Connector force HDMI-A-1 disconnects Hotplug events DPMS after 50 s
unspecified (default) 1, between 5 and 10 s 2 back on: re-added lit
on 0 0 still off

So on this card the output is re-added lit without any lock involvement. The lock's 5 s re-blank of a returning screen then turns that into the loop.

Workaround in use, limited to the dGPU's HDMI by PCI address (the iGPU's HDMI-A-2 on the same machine reads force = unspecified):

# /etc/udev/rules.d/99-lg-hdmi-force-connected.rules
SUBSYSTEM=="drm", KERNEL=="card*-HDMI-A-*", KERNELS=="0000:03:00.0", ATTR{status}="on"

I have not tested #16457 or #13129.

Prepared and posted with the help of Claude (Anthropic), from this machine's logs and tests.

BoldRobb avatar Nov 10 '26 02:11 BoldRobb

Same lock-screen blank/wake loop here, with one finding the thread doesn't have yet: on i915 + HDMI audio the loop eventually fills a kernel audio array, and the machine then hard-froze.

System: Omarchy 4.5.0rc2-1, linux-omarchy 7.2.8-9, ThinkPad 20W1SAU900 (BIOS N34ET56W), Intel i915, three outputs (eDP-1, DP-2, HDMI-A-1), Goodix MOC fingerprint reader (27c6:6584). Idle config is stock (idle.lock 300, idle.screensaver 150).

What the journal shows (boot of Nov 3, ended Nov 7 08:08):

Every ~18-30 s, for days:

  1. intel_atomic_commit from Hyprland -> intel_audio_codec_enable -> snd_hda_hdmi_check_presence_and_report -> sync_eld_via_acomp -> __pm_runtime_resume -> hda_codec_runtime_resume -> haswell_set_power_state -> snd_hdac_regmap_add_vendor_verb -> snd_array_new
  2. WARNING: sound/hda/core/array.c:28 at snd_array_new with (num >= 4096): the array is full, so the add is refused.
  3. The lock plugin re-creates its surfaces (lock/Service.qml:502/503 depends on non-bindable properties: WlSessionLockSurface::contentItem).
  4. omarchy-lock-fingerprint restarts: "Verification timed out" -> usb 3-3: reset full-speed USB device -> "Place your right index finger".

The (num >= 4096) warning fired 10,340 times between Nov 4 08:20 and Nov 7 08:07 (about 206 per hour, steady). The loop was already running at 08:18, so the array was full before the first warning.

The new part: the journal stops at Nov 7 08:08:01 with no shutdown, panic or oops logged. The display was on the lock screen and the whole system was unresponsive until I power-cycled it on Nov 10. Every session on the machine died with it. Journal volume had risen from ~170 to ~21,000 lines/hour during the loop.

Not established:

  • I have not shown the freeze was caused by the HDA array being full. It is the same loop, and the last log line is the same warning as the thousands before it, so this is correlation only.
  • I did not capture Hyprland's own log, so I can't say which of the three outputs dropped its link, or whether the trigger is the pointer-wake path, an HPD drop, or both.
  • Whether each commit adds an entry to the array (a leak per runtime resume) or the array filled during earlier normal use is an inference from the warning count.

If useful for triage: a lock that stays stuck in this loop is not only a UX/power problem. On this driver combination it also repeatedly drives the HDMI audio runtime-resume path, and it ended in a hard freeze after ~3.5 days.

Filed by Claude Sonnet 5.5 via Claude Code, from this machine's journal; reviewed and posted by the user.

joaoblasques avatar Nov 10 '26 11:11 joaoblasques

Another laptop + external case (the setup #16457's "every enabled display is external" gate leaves out), with a user-level workaround that needs no root, no DDC and no connector force.

Setup: Omarchy (stock lock), Hyprland 0.56.2-4, aquamarine 0.15.1-1, laptop panel eDP-1 + Acer EK251Q G on HDMI-A-1 (1920x1080@60). One lock produced 80+ Connector HDMI-A-1 disconnected → connected → Modesetting HDMI-A-1 → Disabling output HDMI-A-1 cycles — the same #15294 re-arm loop described above.

Workaround: disable the external output in Hyprland while the internal panel is DPMS-off, instead of leaving it in DPMS-off. A disabled output is not modeset when the monitor's HPD bounces, so it is never re-added lit and the loop can't start:

# internal panel blanked → take the external out of the layout
hyprctl eval 'hl.monitor({ output = "HDMI-A-1", disabled = true })'
# internal panel back on → restore it
hyprctl eval 'hl.monitor({ output = "HDMI-A-1", disabled = false, mode = "preferred", position = "auto", scale = 1 })'

Tested by hand first: with the output disabled the Acer goes to standby and stays dark, no flicker. I now run it from a small watcher started from autostart.lua that polls hyprctl monitors all -j once a second (eDP-1 dpmsStatus == false and HDMI-A-1 enabled → disable; eDP-1 back to true → re-enable, only if the watcher disabled it). Result: at most one flicker at the start of the lock, then the monitor sleeps; after unlock it comes back and its windows/workspaces return to it. Hot-plugging still works, since nothing is forced at the kernel level.

Caveats: while the output is disabled its workspaces move to the laptop panel (they moved back in my tests, but mirror setups like #17917 may need care), and I've only run this for a few lock cycles, not a long soak.

If the lock did this itself for external outputs on laptop + external setups (disable rather than DPMS-off, re-enable on wake), it would cover the HPD-dropping case on any GPU without root.

Prepared with the help of Claude (Anthropic) from this machine's logs; reviewed and posted by me.

4nozen avatar Nov 11 '26 14:11 4nozen

Checked current quattro (419a5a709). The new unlocked tests from @elaraisav and @BoldRobb distinguish the initial relight from the lock's re-blank: they report an output disappearing and returning lit after DPMS-off even without the lock, including with Hyprland's mouse/key DPMS wake disabled. @amyavari adds an i915 case. The source still re-arms the blank timer when the real screen count rises (shell/plugins/lock/Service.qml:827-833), which can continue the cycle without pointer input. I did not reproduce the hardware behavior: a disposable worker has no affected HDMI monitor.

There is another laptop path to account for when testing the output-disable workaround: monitor removal runs clamshell recovery, and if no external display remains active and the manual internal-display-off toggle is set, recovery clears that toggle and enables DPMS on all displays (bin/omarchy-hyprland-monitor-internal:50-58). Mirroring recovery also clears its toggle when no external remains, as tracked separately in #17917. Disabling and restoring outputs therefore needs to preserve layout and cooperate with those recovery paths. #16457 still excludes an enabled internal panel. The runtime-only AMD debounce test does not establish whether #13129 works when loaded at boot.

@joaoblasques, the HDA warnings and hard freeze remain correlated; the available evidence does not show when the array filled or that it caused the freeze. Please attach the affected boot ID, preserved kernel log around the first snd_array_new warning with its full call trace and the final minutes, and any saved Hyprland log identifying the reconnecting output. If known, include whether the machine still answered SSH, ping or a TTY at the time.

GPT-6 High in Codex reviewed this; Opus 5.5 High and muse-wonder (via pi, thinking high) gave second opinions. Both agreed that no existing PR head is verified as the fix and that choosing the blanking approach remains the maintainer's decision. Their independence from the first review is not guaranteed. This stays open with its bug label, awaiting that decision.

omarchybot avatar Nov 18 '26 04:11 omarchybot