omarchy icon indicating copy to clipboard operation
omarchy copied to clipboard

Idle wake skips DPMS re-enable when dpmsStatus is stale, leaving one monitor black

Open magicboxlrs opened this issue 2 months ago • 7 comments

What happened

After the idle screensaver/lock cycle triggers and I return to the machine, one monitor in my dual-monitor setup sometimes stays completely black while the other works fine and shows the desktop normally.

hyprctl monitors shows the black monitor as disabled: false and dpmsStatus: 1 (i.e. Hyprland believes it is on and enabled) — nothing in Hyprland's own state flags it as broken.

Manually running:

hyprctl eval 'hl.dispatch(hl.dsp.dpms("off","DP-2"))'
hyprctl eval 'hl.dispatch(hl.dsp.dpms("on","DP-2"))'

immediately fixes it and the monitor comes back.

Root cause (as far as I can tell)

omarchy-brightness-display's wake path (the on case, invoked by omarchy-system-wake, which the idle service runs on every wake) has this optimization:

elif [[ $step == "on" ]]; then
  # Skip the dispatch when every active display is already lit: a redundant
  # DPMS enable right after system resume forces another modeset, which blanks
  # the panel for a beat (visible flash at the unlock screen).
  hyprctl monitors -j 2>/dev/null | jq -e '[.[] | select(.disabled == false)] | length > 0 and all(.dpmsStatus)' >/dev/null 2>&1 && exit 0
  hyprctl dispatch 'hl.dsp.dpms({ action = "enable" })' >/dev/null 2>&1
  exit 0
fi

It trusts dpmsStatus from hyprctl monitors -j as ground truth for "is this display actually lit." In my case that's false: dpmsStatus reports 1 even though the monitor is physically black (the DisplayPort link apparently doesn't come back up cleanly). Since both monitors report dpmsStatus: 1, the guard is satisfied and the script skips the DPMS enable dispatch — the exact command that fixes it — every time this happens.

Expected

Waking from idle should reliably light up every monitor, or at least there shouldn't be a code path that can definitively and permanently skip the one fix that works.

Steps to reproduce

Hard to force reliably — seems tied to my specific dual-4K@240Hz NVIDIA setup (see below) — but generally:

  1. Let the machine idle until the lock/screensaver cycle triggers (idle.lock in ~/.config/omarchy/shell.json).
  2. Return to the machine (move mouse / press a key) to trigger the wake.
  3. Occasionally one monitor stays black while the other is fine; hyprctl monitors reports the black one as dpmsStatus: 1, disabled: false.

System details

  • Omarchy: 4.0.4-1
  • Hyprland: 0.56.2
  • Kernel: 7.2.5-3-omarchy
  • CPU: AMD Ryzen 7 9800X3D
  • GPU: NVIDIA GeForce RTX 5090 (driver 610.57.04) + AMD Radeon Graphics (Ryzen iGPU, amdgpu)
  • Monitors: 2x ASUS 4K@240Hz (PG32UCDM, XG32UCWMG), both connected via the NVIDIA GPU

(Note: omarchy debug doesn't exist as a command on this version, so I gathered the above manually instead of attaching its log.)

I suspect the underlying "black screen with stale dpmsStatus" condition is itself an NVIDIA/DisplayPort link-retraining quirk specific to running two 4K@240Hz (DSC) displays off one GPU, which may be outside Omarchy's control. But the wake script's blind trust in dpmsStatus looks like an independently fixable bug — e.g. a forced retry path, or periodically re-verifying rather than a single conditional skip.

magicboxlrs avatar Sep 18 '26 04:09 magicboxlrs

Same issue here on a single-monitor setup, adding my data in case it helps.

System

  • Omarchy 4.0.4-1, kernel 7.2.5-3-omarchy
  • RTX 3070, NVIDIA driver 610.57.04 (open kernel modules, installer default)
  • Samsung Odyssey OLED G9 (G95SC), 5120x1440@240 over DisplayPort (DSC), single monitor
  • Idle config: "screensaver": 150, "lock": 300

What happens After the idle screensaver/lock cycle, the monitor stays black. Keyboard and mouse input don't bring it back. Switching VTs (Ctrl+Alt+F2, then Ctrl+Alt+F1) restores the display every time.

Manual test With the display working, I ran:

hyprctl eval 'hl.dispatch(hl.dsp.dpms("off","DP-3"))' ; sleep 3 ; hyprctl eval 'hl.dispatch(hl.dsp.dpms("on","DP-3"))'

The "on" dispatch returns ok with exit code 0, but the display did not come back on its own (waited 20+ seconds). Touching the keyboard woke it in this case.

So on this setup a plain DPMS on after DPMS off doesn't reliably restore the DP link, while a VT switch (full modeset) always does. Happy to test a fix or gather more info (e.g. hyprctl monitors while the screen is black).

algoritmohr avatar Sep 21 '26 04:09 algoritmohr

Follow-up: today the same idle lock cycle (lock at 300s) led to a full display hang. Switching VTs did NOT recover it this time; I had to hard reboot.

The last kernel message before the hang:

[drm:nv_drm_atomic_commit [nvidia_drm]] *ERROR* [nvidia-drm] [GPU ID 0x00000100] Flip event timeout on head 0

No NVIDIA Xid errors in the log. ddcutil was also failing around the same time:

Failed to find connector name for /dev/i2c-4, set_connector_for_businfo_using_edid

As a workaround I'm raising idle.lock so the display doesn't power off while I'm away.

algoritmohr avatar Sep 22 '26 17:09 algoritmohr

Same signature on a single DP monitor. Trigger here is a panel power-cycle, not an idle wake. Logs: hyprwm/aquamarine#240.

Env: Omarchy 4.0.4-1 · 7.2.5-3-omarchy · Hyprland 0.56.2-2 · aquamarine 0.15.0-2 · nvidia-open 610.57.04-1 · RTX 4070 Ti · ASUS PA27JCV on DP-1, 5120x2880@60

Trigger: switch the panel off → on at the monitor while the session runs; no idle / lock / suspend involved. Same as @aaugmentum's power-button / remote / cord table above.

Stuck state: dpmsStatus: 1, disabled: false, sysfs connected / enabled / dpms=On, no picture.

Correction to my earlier comment: no wake path runs for this trigger, so the omarchy-brightness-display on guard isn't involved here.

Why Omarchy doesn't recover it: the reconnect fires monitoradded and omarchy-hyprland-monitor-watch runs recover_modeless, but omarchy-hyprland-monitor-modeless only matches width == 0 || height == 0. DP-1 comes back at full mode with dpmsStatus: 1, so nothing retries.

Recovery: one DPMS cycle, session preserved:

hyprctl dispatch 'hl.dsp.dpms({ action = "off", monitor = "DP-1" })'; sleep 3
hyprctl dispatch 'hl.dsp.dpms({ action = "on",  monitor = "DP-1" })'

Mitigation idea (untested): DPMS-cycle the re-added output from the monitoradded handler. Caveat: @aaugmentum saw the enable itself re-trigger HPD once.

AI-assisted diagnostics; physical state verified by me.

windfocus avatar Oct 01 '26 16:10 windfocus

Another data point with a different trigger. There was no idle, lock or suspend: the monitor itself was turned off and on while the session kept running. Input works, but the screen stays black (no signal). Until now only a reboot fixed it.

System

  • Omarchy 4.0.0.alpha, kernel 7.2.5-3-omarchy, Hyprland 0.56.2-2, aquamarine 0.15.0-2
  • RTX 2060 SUPER, nvidia-open-dkms / nvidia-utils 610.57.04-1
  • Single Xiaomi Mi Monitor on DisplayPort (DP-1), [email protected], scale 2, VRR off

Tests: I logged Hyprland socket2 events and /sys/class/drm/card1-DP-1 every 0.5 s.

Monitor off/on via DP hotplug Result after reconnect
Remote control (standby) disconnected → connected ~16 s later black
Monitor power button disconnected → connected ~16 s later black
Power cord disconnected → connected ~27 s later black

Every time, Hyprland emits monitorremoved>>DP-1 and monitoradded>>FALLBACK, then on reconnect monitoradded>>DP-1. After that, DRM shows connected / enabled / dpms=On and hyprctl monitors shows DP-1 [email protected], disabled: false, dpmsStatus: 1. Nevertheless there is no picture.

What recovers it (no reboot):

  • hl.dsp.dpms disable → enable on DP-1 worked once. On the next attempt the enable itself caused another disconnect/reconnect and the screen stayed black.
  • Re-applying the same mode (hl.monitor({ output = "DP-1", mode = "[email protected]", ... })) → still black. It seems to be a no-op because nothing changed.
  • hyprctl reload → still black.
  • Switching to a different mode and back works reliably (4/4):
    hyprctl eval 'hl.monitor({ output = "DP-1", mode = "3840x2160@60", position = "0x0", scale = 2 })'
    hyprctl eval 'hl.monitor({ output = "DP-1", mode = "[email protected]", position = "0x0", scale = 2 })'
    

The wake path in omarchy-brightness-display never runs in this scenario, so this goes beyond the stale-dpmsStatus skip. When a DP monitor is re-added after a hotplug on NVIDIA at a high refresh rate, the initial modeset doesn't produce a picture, and only a real mode change brings it back. That may belong with aquamarine or NVIDIA rather than Omarchy (cf. hyprwm/aquamarine#240). A possible Omarchy-side mitigation: on monitoradded, re-apply the mode through a temporary lower refresh rate.

aaugmentum avatar Oct 06 '26 19:10 aaugmentum

I checked this against quattro at defbf90e8, where the guard you quote is unchanged, and against Hyprland 0.56.2's source. Nothing was reproduced, because a VM has no DisplayPort link to lose.

The guard is real, but skipping it would not bring the monitor back. dpmsStatus in hyprctl monitors is Hyprland's own record of the last DPMS request, not the state of the panel. When that record already says on, CMonitor::setDPMS(true) returns before committing anything to the output (Monitor.cpp#L2309-L2312). It also sets the record before it commits, and leaves it set if the commit and its single retry fail. So in the state you captured, removing the guard or always dispatching the enable gives the same result: Hyprland drops the enable and the monitor stays black. That includes the --force in open PR #13259. What makes Hyprland commit again is a transition, off and then on, which is what your manual fix does.

What your manual fix actually did: hl.dsp.dpms("off","DP-2") passes strings rather than a table. Hyprland then reads it as a toggle with no monitor (LuaBindingsDispatchers.cpp#L297-L311), so the pair turned both monitors off and on rather than DP-2 alone. It is still evidence that a DPMS cycle recovers the display. If it happens again, one thing would tell the maintainer whether Hyprland's commit failed or the link dropped after a successful one: run grep -i dpms "$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/hyprland.log" while DP-2 is black, and check for a Couldn't commit output DP-2 for DPMS = true line.

There is no contained fix to file. Recovering means Omarchy deliberately cycling DPMS on wake. That would bring back the blank the guard was added to avoid, and an earlier attempt to cycle outputs in #10925 was withdrawn after it froze an NVIDIA session. Choosing that recovery behaviour is a decision for the maintainer, not a defect a bot should patch.

Related: #9308 reports the same desync on an NVIDIA laptop and an Intel machine, and is waiting on the same decision. I proposed closing this one as its duplicate, but the second opinion judged that this issue carries what #9308 does not: a dual-monitor desktop, and an off/on cycle shown to work. Both stay open. The later reports here from @windfocus and @aaugmentum have a different trigger: the monitor itself is switched off and on, no wake path runs, and the output comes back at a full mode but black. The closest open issues for those are #9078 (the modeless recovery only retries an output at 0x0) and #11019 (aquamarine 0.15.0 outputs that never recover after a disconnect).

I did the review as Claude Opus 5.5, with Codex Medium as a second opinion. Codex agreed with the mechanism, and since it can read this session's notes, its agreement isn't fully independent. It also found the point about how Hyprland reads hl.dsp.dpms("off","DP-2"), which I then confirmed in the source. This now waits on the maintainer to decide whether Omarchy should cycle DPMS on wake.

omarchybot avatar Oct 12 '26 06:10 omarchybot

Adding a partial-output variant on AMD iGPU, where only a disable→enable cycle recovers. A forced enable alone would not have helped here.

Environment

  • Beelink SER9 (AZW SER9), AMD Radeon 880M/890M [1002:150e], amdgpu
  • Omarchy 4.0.5-1, Hyprland 0.56.2-4, aquamarine 0.15.1-1, linux-omarchy 7.2.8-9, mesa 1:26.2.5-1
  • HDMI-A-1: AOC U27N3G6R4B, 3840x2160@60, scale 1.6, transform 3 (portrait, left)
  • DP-2: 27M2U, 3840x2160@60, scale 1.6, transform 0

Symptom

After switching the monitors off at the panel and back on (no suspend, lock or reboot), HDMI-A-1 sometimes keeps updating only the bottom half; the top half stays black. This is not an all-black output.

While stuck:

  • hyprctl monitors reports the full 3840x2160 mode, disabled: false, dpmsStatus: true
  • hyprctl configerrors is empty
  • grim -o HDMI-A-1 captures the entire desktop, including the top bar

So rendering is intact and the output's scanout is stranded, with the compositor believing the output is lit.

Recovery

This immediately restores the full screen:

hyprctl dispatch 'hl.dsp.dpms({ action = "disable", monitor = "HDMI-A-1" })'
sleep 2
hyprctl dispatch 'hl.dsp.dpms({ action = "enable", monitor = "HDMI-A-1" })'

The same command pair fixed an earlier occurrence on 2026-10-12. An enable-only dispatch does nothing because dpmsStatus is already true, which matches the setDPMS(true) early-return noted in #13259 — so this case needs disable→enable, not a forced enable.

Trigger evidence

journalctl -k shows no amdgpu flip_done/REG_WAIT, DP/HDMI link-training, or HPD events around the incident. The only amdgpu display warning in that boot was a REG_WAIT timeout ... optc35_disable_crtc during startup, which appears unrelated.

This is not the aquamarine 0.15.0 0x0/recover_modeless() regression (#11019): 0.15.1 is in use, the output keeps a valid mode, and only part of the output is stale.

I'm reporting it here because the observable state (mode present, dpmsStatus true, no hotplug) and the manual off/on recovery match. Happy to move this if a partial-output strand should be tracked separately. The recovery gap in omarchy-hyprland-monitor-watch is tracked in #12481 — it only reacts to modeless outputs, so it would not have seen this state.

ZhangHang avatar Oct 19 '26 02:10 ZhangHang

I re-checked this against quattro at 82662dd26 after @ZhangHang's report. Nothing was reproduced: a worker VM has no physical output to power-cycle.

The wake-path finding is unchanged. bin/omarchy-brightness-display, bin/omarchy-system-wake, bin/omarchy-hyprland-monitor-watch and bin/omarchy-hyprland-monitor-modeless are identical to defbf90e8, where I last looked. The guard at bin/omarchy-brightness-display:94 still skips the enable, and Hyprland's setDPMS(true) still returns early when its own record says on, so only an off-then-on cycle makes it commit again. @ZhangHang's case agrees with that: an enable alone did nothing and disable→enable recovered it.

That report is a different trigger from this issue. A panel power cycle with no idle, lock or resume never reaches the wake path. What could catch it is omarchy-hyprland-monitor-watch, which only acts on an enabled output at 0x0 (bin/omarchy-hyprland-monitor-modeless:15); an output at full mode with a stranded scanout passes that test, so nothing retries. That gap is #9078 and #12481, where @ZhangHang has also posted. It also shows the panel-power-cycle strand still happens on aquamarine 0.15.1, on AMD.

For @windfocus and @aaugmentum: #11019 has since been closed as fixed by aquamarine 0.15.1 (hyprwm/aquamarine#410), now on every channel; omarchy update installs it. Both your reports were on 0.15.0-2. Whether that fix covers a DisplayPort monitor coming back black at full mode on NVIDIA is not established, so if it still happens after updating, a note here with pacman -Q aquamarine would say which problem it is.

There is still no contained fix to file: recovering from either trigger means Omarchy choosing to cycle DPMS, and #10925's earlier attempt froze an NVIDIA session. Open PR #13259 forces an enable, which Hyprland drops in this state. This waits on the maintainer to decide on that recovery behaviour.

Reviewed by Claude Opus 5.5, with Codex Medium as a second opinion. Codex agreed on all four points and added nothing that changes them; it can read this session's notes, so its agreement is not fully independent.

omarchybot avatar Oct 21 '26 17:10 omarchybot