fix: linux screensaver, lock screen and DPMS blocked by session-desktop#1940
fix: linux screensaver, lock screen and DPMS blocked by session-desktop#1940BonesGit wants to merge 1 commit into
Conversation
On Linux, 'prevent-app-suspension' maps to systemd-inhibit --what=idle which blocks the entire idle pipeline (screensaver, lock screen, DPMS). Changed systemd-inhibit to use --what=sleep, and the Electron fallback to use 'prevent-display-sleep', so only suspend is blocked. Fixes session-foundation#1437 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
|
Hey, |
|
Will double check it |
|
From what I can tell Session is still running when screen is locked and display goes off. I received messages while in that state. the idle state on linux is what leaves apps running, that's the core of the fix here. Do you want a log to look through it? I captured output from start-prod and it shows messages coming in during the time the screen was locked from idle/sleep state. Anything specific you are looking for? This fix will still block sleep state. Which is when processes are actually paused via suspend. |
|
From systemd inhibitor docs: Seven distinct inhibitor lock types may be taken, or a combination of them:
I changed to use "sleep" which allows idle (screensavers, lock, dpms) but still inhibits sleep (suspend and hibernate). This allows Session to stay awake and run and receive messages while the display is off. But if someone wants their system to go into suspend state then they should know they won't get messages any longer until they wake from suspend. |
|
This works. Have a look please.
|
Fixes #1437
Summary
prevent-app-suspensionmaps tosystemd-inhibit --what=idlewhich blocks the entire idle pipeline (screensaver, lock screen, DPMS) — not just suspendsystemd-inhibitto use--what=sleepso only suspend is blockedprevent-display-sleepon Linux for the same reasonprevent-app-suspensionremains correctTest plan
🤖 Generated with Claude Code