omarchy-dpms-guard
Keeps the display off while the session is locked, on monitors that wake themselves back up.
Plugin id: shokupan.dpms-guard
Read this before installing
This plugin exists for one specific hardware fault. If you do not have that fault, you do not need it, and you should not install it.
The fault: some monitors connected over USB-C (and some over DisplayPort) drop their DP link when they deep-sleep after a DPMS off. The kernel reports that as a connector hotplug, and Hyprland sometimes answers a hotplug by re-enabling the output — so the lock screen comes back on and stays lit for hours. It was diagnosed here on a BenQ panel over USB-C, and matches Hyprland discussions #13654 and #11356.
You have this fault if, and only if: you lock the session, the display goes dark, and some minutes later you find it lit up again on the lock screen with nobody having touched the machine. If your display stays dark, this plugin has nothing to fix.
The guard does not detect the offending monitor model. It detects the symptom — locked, user still idle, yet an output is powered on — and re-asserts display-off. That is a no-op on hardware without the fault, but it is still a background timer and a subprocess you do not need, and it deals with your display power. Installing it speculatively is not recommended.
What it does
While the session is locked, every 30 seconds it asks: is the user still idle,
and is any output powered on? If both are true it runs
omarchy-brightness-display off again.
The check cannot be event-driven. The self-wake happens inside aquamarine's DRM
layer and emits no Hyprland event at all — verified by watching socket2 with
socat while it happened — so there is nothing to subscribe to. Hence the poll,
and hence the poll running only while locked.
Two safety gates:
- Idle. Real input marks the monitor active, so a user returning and typing their password is never blanked mid-password.
- Locked. The timer does not run at all during normal desktop use.
It also stands down while the lock screen is authenticating.
Install
omarchy plugin add https://github.com/austin-karren/omarchy-dpms-guard.git --enable
This is a service plugin with keepLoaded: true — there is no bar widget and
nothing visible. Confirm it loaded by locking the session and watching the
shell's log for shokupan dpms-guard ... lock engaged: polling:
journalctl --user -t omarchy-shell -f | grep dpms-guard
(Omarchy pipes the shell's log into the journal under the omarchy-shell tag —
see omarchy-launch-shell.)
Remove
omarchy plugin remove shokupan.dpms-guard
No preview image
There is nothing to show: this plugin has no user interface. It is a headless
service, so this repo deliberately has no preview.png rather than an invented
one.
Dependencies
hyprctl, jq, and omarchy-shell / omarchy-brightness-display — all part
of a standard Omarchy on Hyprland install. Nothing external.
Hyprland-only: the check reads hyprctl monitors, so this will not work on
another compositor.
License
MIT — see LICENSE. Original work.