OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
power-suspend high occasional DISPUTE

Stop a laptop suspending with the lid open when a USB-C charger glitch reports a lid close

omarchyarchlaptopusb-csystemdhyprlanddell
CORRECTED An auditor found the fix wrong or incomplete and rewrote it. · checked against Omarchy omarchy 4.0.4-1 on 2026-10-05
AUDIT NOTE

Read issue #10690 (open, no comments). It supports the Dell XPS 14 report, the Lid closed. then Suspending... journal, and the fact that Omarchy's only logind drop-ins are 10-ignore-power-button.conf and 20-inhibit-delay.conf, which I confirmed in /etc/systemd/logind.conf.d on this workstation. HandleLidSwitch reads suspend and HandleLidSwitchExternalPower reads an empty string over busctl here. logind.conf(5) confirms that HandleLidSwitchExternalPower is ignored until set explicitly, and the Arch wiki says to reload systemd-logind. The unit is Type=notify-reload, CanReload=yes. Three corrections. (1) The issue's own trigger is unplugging or reseating the charger. At that moment external power can be offline, so logind may apply HandleLidSwitch=suspend and HandleLidSwitchExternalPower=ignore does not help. The fix now says so and gives the reporter's stronger workaround direction as a labelled option. (2) The claim that restarting systemd-logind tears down the session on Omarchy 4 has no Omarchy-specific source. It was reworded to what the wiki supports: reload is enough. (3) The fix says a real lid close on AC turns the internal panel off. omarchy-hyprland-monitor-clamshell disables the internal output only when omarchy-hw-clamshell is true and an external monitor is active, so with no external monitor the panel stays on. omarchy-system-lid-close locks only when /proc/acpi/button/lid reads closed and no external monitor is connected, so the cause was tightened. Nothing was exercised: changing logind on this workstation is out of bounds.

The cause above was rewritten on 2026-10-05 to match this note; the fix was corrected by the audit itself.
RISK

With HandleLidSwitchExternalPower=ignore, closing the lid on AC does not suspend. With HandleLidSwitch=ignore as well, closing the lid never suspends. If you then unplug and bag the laptop without suspending it from the System menu, it keeps running and can overheat and drain the battery.

Symptom

The laptop is open and in use, often playing video, on a USB-C charger. The screen suddenly goes black and the machine is asleep. Unplugging or reseating the charger wakes it. journalctl -b | grep -i lid shows systemd-logind: Lid closed. followed by Suspending..., and Lid opened. when the cable moved, though the lid never moved. Reported on a Dell XPS 14.

Cause

Some firmware sends a false lid-switch close event during a USB-C power-delivery renegotiation or a cable tug. Both logind and Hyprland see the same input switch event. logind applies HandleLidSwitch=suspend, the systemd default. Omarchy's own logind drop-ins set only HandlePowerKey=ignore and InhibitDelayMaxSec=15. Omarchy's switch:on:Lid Switch binding runs omarchy-system-lid-close, which locks the session when /proc/acpi/button/lid/*/state reads closed and no external monitor is connected. Neither debounces the event, so a few seconds of false close suspends the machine. Upstream issue #10690 is open. The firmware fault itself is not something Omarchy can fix.

Fix

**1. Confirm the lid was not really closed:**


journalctl -b -u systemd-logind | grep -E 'Lid (closed|opened)|Suspending'
journalctl -k -b | grep -iE 'ucsi|typec|thunderbolt' | tail -20
cat /proc/acpi/button/lid/*/state

A Lid closed. that lines up with USB-C or UCSI messages while the lid was open is this problem.

**2. Stop logind suspending on lid close while on external power.** HandleLidSwitchExternalPower is ignored until it is set explicitly:


sudo install -Dm644 /dev/stdin /etc/systemd/logind.conf.d/90-lid-on-ac.conf <<'EOF'
[Login]
HandleLidSwitchExternalPower=ignore
EOF
sudo systemctl reload systemd-logind

A reload applies the change, so there is no need to restart systemd-logind.

This covers a false close while the charger stays online. If the false close happens as you unplug or reseat the cable, external power may already be offline when logind decides, and HandleLidSwitch=suspend still applies. The only logind-level way to stop that is to stop it suspending on any lid close:


sudo install -Dm644 /dev/stdin /etc/systemd/logind.conf.d/90-lid-on-ac.conf <<'EOF'
[Login]
HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore
EOF
sudo systemctl reload systemd-logind

With that, closing the lid never suspends, on battery or AC. Suspend from the System menu (Super+Escape) before closing the lid.

On Omarchy 4, a real lid close still runs omarchy-system-lid-close through the Hyprland binding. It locks the session when no external monitor is connected, and the internal panel is turned off only when an external monitor is active.

**3.** Check the vendor's BIOS and dock firmware updates for USB-C power-delivery fixes, because the false event comes from the firmware.

Verify

busctl get-property org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager HandleLidSwitchExternalPower prints s "ignore". Reseating the charger with the lid open no longer suspends, and journalctl -f -u systemd-logind logs any Lid closed. with no Suspending... after it.

Sources

false-lid-close-on-usb-c-charger-suspends-open-laptop