Repository navigation
keep awake: option to also block suspend and the lid switch - #3942
Conversation
Keep Awake only inhibits the Wayland idle timer, so closing the lid still suspends (duxlabs-dev#2836). With the new "Stay awake with the lid closed" option, the core holds a logind sleep:handle-lid-switch block inhibitor while Keep Awake is on. Since suspend no longer locks the session, the core locks it on lid close when lock before suspend is on and logind does not report the machine as docked. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
The original plugin (https://github.com/pltanton/dms-vibe-shift) has more: its own bar icon and a custom duration field with a parser ( |
|
this is really cool, would love if the devs fast-tracked this :) |
|
/claude review |
Claude reviewThe lid-close lock never fires, because logind does not emit change signals for
|
logind before v256 and elogind do not emit LidClosed changes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Fixed in 8e24e6d: the lid-close lock now uses UPower |
…o keep-awake-lid-closed # Conflicts: # core/internal/server/loginctl/actions.go
|
/claude review |
Claude reviewNo issues found. The earlier lid finding is fixed: the lock now uses UPower |
port 2.1 (cherry picked from commit f822666)
Description
Keep Awake only blocks the Wayland idle timer, so closing the lid still suspends. This adds a "Stay awake with the lid closed" toggle to the Keep Awake page. While Keep Awake is on and the toggle is on, the core holds a logind
sleep:handle-lid-switchblock inhibitor.Suspend no longer locks the session in that case, so the core locks it on lid close, if "Lock before suspend" is on and logind doesn't report the machine as docked.
loginctl.setKeepAwake, lid-close lock, testskeepAwakeBlocksSleepsetting, sync inSessionService, toggle inIdleInhibitorDetailCode was written with Claude Code; I reviewed and tested it.
Type of change
Related issues
Closes #2836
Screenshots / video
Checklist
I18n.tr()with translator context, reusing existing terms where possiblemake fmt, added/updated tests,make testpasses, andgo mod tidyis cleanmake lint-qmlwith no new warnings