Repository navigation
Conversation
|
Separately, part of the issue here is the Aquamarine package in Arch and Omarchy doesn't include a newer fix.
Neither have the fix. I backported the Aquamarine fix into the version Omarchy uses, named it |
|
Triage (not posted): Clever approach — hold Two packaging/ops nits before this is merge-ready:
Also: false “connected” DRM nodes would leave lid-close inert while undocked — please document that risk (or filter known-bad connectors) in the manual section. |
[High impact] The PR appears safe to merge, though the existing acceptance test still fails for an enabled administrator-customized unit. Findings
SummaryThe PR adds a system service that holds a lid-switch inhibitor while an external monitor is physically connected, plus shared installation and migration setup, acceptance checks, and documentation. No PR-file changes were made since the previous review.
|
|
|
||
| unit=omarchy-docked-lid-inhibit.service | ||
| pacman -Qo "/usr/lib/systemd/system/$unit" >/dev/null || fail "docked lid unit is package-owned" | ||
| [[ $(systemctl show --property=FragmentPath --value "$unit") == "/usr/lib/systemd/system/$unit" ]] || |
There was a problem hiding this comment.
Administrator overrides fail acceptance. If an administrator keeps an enabled, customized unit in
/etc/systemd/system, initialization preserves it, but this assertion requires the active unit to come from /usr/lib/systemd/system. The acceptance test fails even when lid protection is enabled and running. Check for the vendor unit only when no administrator override is present.
|
Thanks @jandrusk! I've tried to address your notes and the three Greptile findings.
Focused regression and packaging tests pass, plus eight isolated checks using real systemd/logind, synthetic DRM status, and a simulated greeter. Since I’m no longer running Omarchy, this revision hasn’t had a fresh ISO/full graphical acceptance run or physical lid-closed logout/login retest. The companion packaging change needs to land before this runtime source ships. |
|
Supporting evidence for this PR: the fix here also covers a second trigger I hit, and no separate fix is needed. The trigger is the idle lock's display blank, with no logout involved. Same root cause (DPMS-off makes logind think the laptop is undocked), but without an inhibitor it can turn into a suspend loop. Setup: ROG Zephyrus G16 (GA605KM): AMD iGPU drives the panel, the RTX 5060 drives HDMI-A-1. Omarchy 4.0.4, systemd 261.2, kernel 7.2.3, NVIDIA 610.57.04, Hyprland 0.56.2 / aquamarine 0.15.0. On AC, lid closed, external monitor on HDMI, idle. Sequence (from the journal and the Hyprland log):
Something woke the machine about 5 s into each suspend (I haven't found the wake source), so it looped every ~31 s: 788 suspend/resume cycles over ~7 h, until the lid was opened. Aftermath: every ALSA card came back on profile So beyond logout and display-manager startup, any DPMS-off while docked defeats |
The only conflict was docs/file-layout.md, where this branch and quattro's new Platform root section both added text after the system-sleep paragraph; both are kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Reviewed at f0a32e3, plus a merge of current The bug is real. logind decides "docked" from the DRM What ran, on a disposable Omarchy VM with systemd 261.2:
Problems found:
What happens next is the maintainer's call. They need to decide whether to carry a second, system-level inhibitor in Omarchy or wait for the logind fix upstream, and if it's carried, whether it should replace |

With an external monitor connected and the laptop lid closed, logging out can suspend the machine before SDDM has finished starting. logind counts enabled DRM outputs when deciding whether the laptop is docked, so compositor teardown or DPMS can temporarily defeat
HandleLidSwitchDocked=ignoreeven though the display remains physically connected.This was observed on an X1 Carbon gen 14 running Omarchy 4.0.4, systemd 261.2, and Intel Panther Lake/xe: logout, SDDM startup, and suspend occurred in the same second, followed by external DisplayPort link-training failures on resume. Related upstream discussion: systemd/systemd#41898.
The system service holds only a
handle-lid-switchinhibitor while Omarchy's physical-connector detector finds an external monitor and the configured docked policy isignore. It survives session teardown, releases on unplug or policy change, and resumes monitoring without restarting. Explicit suspend and idle policy remain available.Type=notifyandNotifyAccess=alldelay display-manager startup until readiness; docked startup reports readiness only after acquisition succeeds. Undocked and non-ignore-policy startup report readiness promptly. The notification socket is explicitly restored for the inhibited child.default/systemd/system/; companion packaging PR Package the docked lid service as an updatable vendor unit omarchy-pkgs#763 is required before this source is packaged. Both settings recipes install the live vendor unit under/usr/lib/systemd/system/, so normal package updates replace its definition. Setup retires only known, unchanged earlier PR copies and repairs their enablement links; administrator units and masks are preserved. Running helpers pick up updates on the next restart or boot./usr/bin, package ownership, the vendor fragment, service readiness/activation, and a real inhibitor when an external monitor is connected. The manual documents false connected reports and disable/mask/re-enable workarounds.Validation for this revision:
git diff --checkpass.A fresh Omarchy ISO install, full graphical acceptance, and physical lid-closed logout/login have not been rerun for this revision. The earlier full suite had upstream/headless/companion-fixture failures documented in the previous description; this revision was checked with the focused suites above.