Display panel can't persistently turn off internal display — Omarchy watcher reverts it
System
- Omarchy 4.0.0-1
- Hyprland 0.56.2 (v0.56.2, commit
efb5099) - ASUS ROG Zephyrus G14 GA403UI / AMD Ryzen 9 8945HS w/ Radeon 780M
What happened
In the Display panel (bar monitor icon → "DISPLAYS"), toggling off the internal laptop display works only momentarily; Omarchy's omarchy-hyprland-monitor-watch re-enables it within seconds whenever an external monitor is active.
Expected
Turning off the internal display from the panel should persist while docked, matching what omarchy hyprland monitor internal off does (and not fight the watcher).
Why it happens
Panel.qml:299-303, toggleDisplay() issues a raw
hyprctl keyword monitor <name>,disable
This doesn't create Omarchy's persistent disable flag at ~/.local/state/omarchy/toggles/hypr/internal-monitor-disable.lua. The watcher (omarchy-hyprland-monitor-clamshell → enable_internal) therefore re-enables it, since no manual-disable flag is present.
Suggested fix
In the Display panel, when toggling off an internal (eDP|LVDS|DSI-) monitor while an external is active, call omarchy-hyprland-monitor-internal off instead of the raw keyword (and mirror on/recover semantics), so it cooperates with the clamshell watcher.
Steps to reproduce
- Dock / connect an external monitor.
- Open Display panel → DISPLAYS → click your internal display row to disable it.
- Observe it re-enables within ~2s (watcher poll) while docked.
Confirmed on current quattro (b83d3df). The panel no longer uses hyprctl keyword, but the cause you described still holds. toggleDisplay in shell/plugins/panels/monitor/Panel.qml:300 turns the internal output off with a bare hl.monitor({ output = "eDP-1", disabled = true }) eval and writes no internal-monitor-disable.lua flag. While a laptop is docked, omarchy-hyprland-monitor-watch runs omarchy-hyprland-monitor-clamshell every two seconds. With the lid open, that reaches enable_internal. With no manual flag there, sync_internal_scale reads the disabled panel as having no scale and evals it back on at the configured one.
I reproduced it on a disposable worker with a stubbed hyprctl (eDP-1 plus DP-3, lid open). After the panel's command runs, the clamshell sync re-enables eDP-1 on quattro. I also found a second defect on the same path: omarchy-hyprland-monitor-internal off writes its flag without creating ~/.local/state/omarchy/toggles/hypr. On an install where no toggle has ever been set, that directory doesn't exist, so the write fails while the notification still reports the display as disabled.
I've drafted a fix and it passes on the worker. The panel sends the internal display through omarchy-hyprland-monitor-internal off/on, as your suggestion proposed, and off creates the toggles directory. With the fix, the panel-disabled display stays off through the clamshell sync. Reverting the fix brings the failure back. The CLI tests pass. The shell suite's failures also fail on quattro and none of them touch monitors. Mirror mode is not covered: off still does nothing while the display is mirrored, which #14519 addresses.
No second opinion ran. The reviewer answers (Codex Medium), but today's review budget was already spent. The fix will be opened as a pull request once that review has run, and this issue will be linked from it.
This also occurs on Omarchy 4.5.0-3 across reboot. With an external monitor connected, I disable the internal laptop display through the bar’s Display panel. After rebooting with the external monitor still connected, the internal display is enabled again. I expected the external-only choice to persist.
I compared the v4.5.0 source with current quattro (c6be7abb9). In v4.5.0, Panel.qml:301–314 still sends a runtime-only hl.monitor disable without writing internal-monitor-disable.lua. The panel therefore saves no off-state to restore after reboot, which explains the persistence problem in the newer report.
On quattro, #17159 (9dbd12dd2) removed the panel's on/off control entirely; the display picker now selects a display to configure. That removes the faulty entry point without providing the persistent switch requested here. The October draft targets the removed control, so I have not carried it forward. The newer clamshell code also avoids explicitly enabling a runtime-disabled panel while an external display is connected, so the October stub test should not be read as a current compositor reproduction.
This was a source review; no worker tests or hardware reproduction ran this time. Opus 5.5 High and muse-wonder via pi, thinking high checked the current code and agreed that there is no contained default-branch fix to file; independence of that agreement is not guaranteed. This remains open for the maintainer to decide whether the older release needs a separate persistence fix.