Repository navigation
Conversation
The fixture built a single external connector, so the case its comment described -- one display removed while another remains -- was never exercised. omarchy-hw-external-monitors scans every connector and answers from the first connected one it finds, so a disconnected connector read before a connected one must not settle the answer. Take the external states as arguments and add the two-connector case. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
Reviewed by Claude Opus 5 with an independent second opinion from Codex at xhigh reasoning. The change holds up. Reading it as a truth table over (external physically connected, Hyprland reports an external active, toggle present), the guard changes exactly one cell — DRM says gone, Hyprland still says active, toggle present — from "do nothing" to "recover". Every other cell behaves as it did on Checked the shapes this must not disturb, since a monitor script runs on every hardware shape:
One thing for the maintainer rather than for you: with the lid shut and the panel disabled by the manual toggle, this now re-enables it on physical disconnect. That is the same thing Pushed one commit (9c26006): the new test's fixture built a single external connector, so the case its own comment described — one display removed while another remains — was never actually exercised. Tests, all on a disposable VM with a real compositor, never on the review machine: Codex raised the case of a DRM connector reporting Waiting on the maintainer to merge. |
|
Looked at this again against current What Hyprland actually leaves behind. The live capture in #10584 shows that after Why #10586 over this one. #10586 excludes
#12616 fixes the same cause by requiring a DRM connector behind every counted output, which also stops counting deliberate headless outputs. #12253 requires a non-zero mode, which does not help here because The recovery assertions in Checked: read the diffs of this PR, #10586, #12616 and #12253 against Waiting on the maintainer to choose between the competing fixes. |
|
I run 4.0.4-1 on my T14 and have to daily connect/disconnect to various screen setups. After I applied these changes alongside https://github.com/omacom/omarchy/pull/10586/changes manually to my setup I am no longer having these recovery issues. Perhaps this info is helpful. |
|
@shimsangjoon thanks, that helps. With both applied, though, it can't tell the two fixes apart, and that is the open question here. #10586 alone would be enough if what kept the panel dark was Hyprland's If you can, please run with only #10586 applied (revert this PR's changes to Checked: re-read this PR, #10586, #12616 and #12253 against current Still waiting on the maintainer to choose between the competing fixes. The recommendation is still #10586. |
Disabling the laptop screen with SUPER + CTRL + DEL can leave the laptop screen still dark after removing the HDMI cable.
Apparently Hyprland can temporarily retain a disconnected output as active even after DRM reports that it is physically disconnected. Every event-driven recovery attempt can therefore exit early, leaving the internal-display toggle enabled.
Fix is to check that a external monitor is connected with the DRM and that Hyprland reports a connected external monitor
Fixes #7209