Skip to content

Don't reload a 0x0 monitor that already has video modes - #12857

Open
suhitanantula wants to merge 1 commit into
omacom:quattrofrom
suhitanantula:fix/modeless-requires-empty-mode-list
Open

suhitanantula wants to merge 1 commit into
omacom:quattrofrom
suhitanantula:fix/modeless-requires-empty-mode-list

Conversation

@suhitanantula

Copy link
Copy Markdown

The bug

#6701 / omarchy-hyprland-monitor-modeless treats any enabled 0x0 output as the unpowered-EDID case from #6668: a partial EDID with no video modes, so only hyprctl reload can recover it.

That is also how a rejected atomic modeset presents. Hyprland still has the full EDID (availableModes populated) and width/height stay 0. Reload cannot apply those modes. The watcher sees modeless, reloads, retries the same EINVAL commit, and never stops.

Confirmed on Omarchy 4.0.4, Hyprland 0.56.2, aquamarine 0.15.0-2, Framework 13 AMD Krackan (1002:1114, Radeon 840M). After docking, Kogan DP-3 sat at 0x0@60 with 21 availableModes. The Hyprland log walked every mode, including the max_bpc retry from hyprwm/aquamarine#316, then failed with:

ERR atomic drm request: failed to commit: Invalid argument, flags: ATOMIC_ALLOW_MODESET
WARN drm: atomic commit failed with max_bpc set, retrying without max_bpc
ERR atomic drm request: failed to commit: Invalid argument, flags: ATOMIC_ALLOW_MODESET

omarchy-hyprland-monitor-modeless returned 0 the whole time. Reloads did not light the screen. What did: bitdepth = 8 on the monitor rule (and disabling the second external so it stopped sharing 1410x0).

The same 0x0 + full mode list + EINVAL walk-down is hyprwm/aquamarine#386. This PR does not fix that modeset. It stops Omarchy from looping a reload that cannot.

The fix

Count an output as modeless only when it is enabled, 0x0, and availableModes is empty (or absent, which is the original #6668 fixture).

omarchy-hyprland-monitor-watch already stops when the helper returns 1, so the loop ends on a rejected modeset.

Tests

test/shell.d/monitor-modeless-test.sh:

  • 0x0 with availableModes: ["[email protected]", …] is not modeless
  • 0x0 with availableModes: [] is still the unpowered-EDID case
  • the watcher does not reload a 0x0 output that already has video modes

Existing no-field fixtures stay modeless (availableModes // []).

./test/shell.d/monitor-modeless-test.sh

18/18 passed.

Related

omacom#6701 recovers the unpowered-EDID case: 0x0 and an empty mode list, where
only a reload re-reads the EDID. A rejected atomic modeset looks the same
at width/height but still advertises availableModes. Reloading that retries
the same EINVAL commit and never recovers.

Treat 0x0 as modeless only when availableModes is empty, so the watcher
stops looping on a failed modeset.
@llstrk

llstrk commented Sep 22, 2026

Copy link
Copy Markdown

Verified: No actionable defect found in the tested scope at ce873568. The updated helper excludes zero-sized outputs with advertised modes from missing-mode recovery, while retaining the empty/absent-list recovery path.

Synthetic monitor responses, using the production helper and recovery logic:

Enabled output Baseline PR
0x0, populated availableModes Triggers reload Recovery worker exits without reload
0x0, empty or absent availableModes Triggers reload Still triggers reload
Empty-list 0x0 changes to populated-list 0x0 Reloads again Stops recovery

Another output with an empty mode list can still trigger a global reload. Excluding an output from recovery does not mean it is displaying correctly or that the underlying modeset failure is fixed.


Review information

Test scope: Baseline/head shell-level comparisons with synthetic hyprctl responses and packaged Bash/jq, including explicit recovery-worker completion and malformed/unreachable-query controls. No physical monitor, EDID, DRM or atomic-modeset failure was reproduced.

Community review: Independent automated community review, unaffiliated with the Omarchy team, intended to help prepare PRs for their review.

Automated AI review: Astra source inspection, independent Opus 5 xhigh and Astra xhigh technical reviews, followed by coordinator verification against saved targeted evidence and a fresh Astra Medium editorial check.

@omarchybot omarchybot added the bug Something isn't working label Sep 27, 2026
@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Oct 2, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at ce873568. Nothing found to change.

What ran. I ran omarchy-hyprland-monitor-watch on a disposable Omarchy worker (Hyprland 0.56.2) against a stubbed hyprctl whose reload changes nothing, and counted reloads over 10 seconds:

Enabled output quattro this PR this PR, helper reverted
0x0, availableModes populated 3 reloads 0 3 reloads
0x0, availableModes: [] 3 reloads 3 reloads 3 reloads
0x0, field absent (the #6668 fixture) 3 reloads 3 reloads 3 reloads
2560x1440 0 0 0

test/shell.d/monitor-modeless-test.sh passes 18/18 on the head and fails on quattro's helper. ./test/cli is green. The real Hyprland on the worker reports the field as availableModes, a list of strings, which is the shape the jq expects.

What could not run. A QEMU worker's virtio-gpu accepts every mode, so the rejected modeset itself could not be produced there. The state this PR keys on comes from people other than its author: #13073 (NVIDIA: every EDID mode listed at 0x0, reload rejected again, the watcher reloading every 60 seconds) and hyprwm/aquamarine#386 (Intel and AMD docks, every mode down to 720x400 failing). The #6668 report says that case has no modes, so the original recovery should still fire. The new tests cover that with a stub, not with that hardware.

Scope. One jq condition and its tests, which is proportionate to the problem. It stops the loop and does not bring the screen back. #13073 still wants that, and its second half (an output left disabled: true at 0x0) is untouched here, so I have not linked it as fixed. #12683 edits the same watcher for ghost internal connectors. That is a different failure and doesn't compete with this one.

Second opinion. None. The configured reviewer (Codex Medium) answered a ping but refused the review because the day's review budget was spent. This verdict rests on Claude Opus 5.5's review and the worker run alone, so the PR is labelled verified and not ready. It is waiting on a second review, then on the maintainer.

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

Labels

bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants