Repository navigation
Add optional idle suspend timeout - #11686
michaelgarrettbrown-collab wants to merge 6 commits into
Conversation
Automated AI review
Outcome: With default timings, an Suspend countdown restarts on window eventsHyprland 0.56.2 restarts the full timeout of a Suggested change: Count from the original idle start like A huge
|
[Medium impact] The PR appears safe to merge; the previous activity-cancellation issue is fixed. SummaryAdds optional
Reviews (9) · Last reviewed commit: "Cancel suspend for activity during scree..." · Reviewed by Greptile |
|
This looks like the implementation for #9931 (configurable auto-suspend). It's currently CONFLICTING — please rebase onto quattro. Also worth a short note on how |
d749d30 to
71ecaf6
Compare
|
Tested this on Omarchy 4.0.6-1 (Hyprland, Lenovo LOQ 15IAX9E, Intel + NVIDIA hybrid). I applied only the Result: left idle with Stay Awake off, no video playing and no logind block inhibitors, the screensaver started, the displays went to DPMS off, and the laptop was suspended when I came back. That is the behavior this PR is meant to add. The journal confirms it was the idle service and not the lid or a manual action. The suspends came from the shell's and the same pair again later in the day. A lid close, for comparison, logs I also built a small UI on top of it in a cloned power panel (a "Suspend after" row with Never / 10 min / 15 min / 30 min / 1 h buttons that writes Stay Awake: with Stay Awake on, the laptop does not suspend, as expected. Inhibitors (correction): an earlier version of this comment said a YouTube tab and LLM agent apps holding a logind sleep block both held off the suspend. I could not verify that, so I'm retracting it. What I did verify:
This follows from the design: Screensaver and lock reset the suspend countdown (side finding). With
Resume, one finding. After a real suspend, the next cycle depends on input arriving after the wake:
So waking without any later input (lid open, power button) leaves the machine up and locked indefinitely. It may be worth calling Design note: One observation that might be useful for the inhibitor path: a Chrome tab playing video shows |
71ecaf6 to
11e9643
Compare
|
Thanks for the thorough live testing. The PR has been revised to address the reported cases:
|
|
Thanks for the quick revision, and for taking the live-test findings seriously. Reading the new commits against what I reported, each point has a counterpart:
One caveat: I could not retest this revision. On my machine (4.5.0-3) Two things I noticed while reading, in case they are useful:
Happy to rerun the same scenarios (long-running task with a logind idle block, wake with no input, screensaver/lock with a short |
Adds an optional
idle.suspendtimeout to Omarchy Shell, in seconds from the start of a user-idle cycle. Omitted, invalid, or non-positive values leave automatic suspend disabled.Behaviour
idleinhibitors and failed inhibitor queries defer suspend. The service retries after one minute if the countdown is still pending.Validation
git diff --checkpassed.omarchy-screensaverpackage required by this Quattro checkout. The journal shows that the shell attempted the screensaver at its deadline, followed by lock and suspend on schedule.