Auto-suspend when idle
Posted: Sun Nov 12, 2017 4:07 pm
I have a fresh, fully-upgraded install of Lubuntu (Ubuntu 17.04 + LXDE 0.99.2-3).
I'm having trouble getting suspend-when-idle to work sensibly. I have a fairly simple intention:
* Suspend when system is idle for 15 minutes, always.
* Wake on key, LAN, and RTC.
I configured sleep-when-idle in the Power Management GUI, which is apparently xfce4-power-manager under the hood. All of the above works once, when I'm logged in and using the session. But after it wakes from key/LAN/RTC, it won't auto-suspend again. Not until I unlock it, at least.
It's very slow to debug, but it seems like the auto-suspend timer only activates when the session is unlocked. If I login and use it, then it will sleep after 15 minutes. But on wake from suspend it locks the session, and will idle forever. Manually calling pm-suspend always works.
Things I have changed:
* user account set to require NOPASSWD for sudo pm-suspend
* org.freedesktop.login1.policy defaults changed:
- allow_any: yes
- allow_inactive: yes
- allow_active: yes
Any ideas on the right way to configure it to _always_ auto-suspend? Or, if not, perhaps a list of which services/processes are even involved in suspend+wake? It seems like there are a lot of different layers involved...
Side question 1: what is considered "idle", and which service is determining it? Is it only keyboard/mouse, or is there smarter logic?
Side question 2: Any way to set the suspend timer to less than 15 mins, for debugging?
I'm having trouble getting suspend-when-idle to work sensibly. I have a fairly simple intention:
* Suspend when system is idle for 15 minutes, always.
* Wake on key, LAN, and RTC.
I configured sleep-when-idle in the Power Management GUI, which is apparently xfce4-power-manager under the hood. All of the above works once, when I'm logged in and using the session. But after it wakes from key/LAN/RTC, it won't auto-suspend again. Not until I unlock it, at least.
It's very slow to debug, but it seems like the auto-suspend timer only activates when the session is unlocked. If I login and use it, then it will sleep after 15 minutes. But on wake from suspend it locks the session, and will idle forever. Manually calling pm-suspend always works.
Things I have changed:
* user account set to require NOPASSWD for sudo pm-suspend
* org.freedesktop.login1.policy defaults changed:
- allow_any: yes
- allow_inactive: yes
- allow_active: yes
Any ideas on the right way to configure it to _always_ auto-suspend? Or, if not, perhaps a list of which services/processes are even involved in suspend+wake? It seems like there are a lot of different layers involved...
Side question 1: what is considered "idle", and which service is determining it? Is it only keyboard/mouse, or is there smarter logic?
Side question 2: Any way to set the suspend timer to less than 15 mins, for debugging?