New default auto-suspend causes *immediate* suspend on logout to GDM
When logged in for a while to a GNOME session, then logging out, GDM/GNOME immediately suspends.
I'm guessing? that GDM's idle timer is running even when it's not active, then when the GDM session is activated, it is immediately looking at its idle time (which will usually be the entire duration the user has been logged in) without resetting it due to the activation of the GDM, and so immediately sleeping.
I'm not sure if this is the cause, but if it is, either:
- the idle timer should not run when a session is inactive, or
- the idle timer should be reset on session activation before being read for sleep purposes
Even with this, I can think of all sorts of broken behaviour with e.g. multi-head, remote sessions etc. Idle state and behaviour needs to be global or pooled (i.e. only entering the highest configured idle power states of all active users, after the longest of all idle times).
I'm also seeing this "immediate sleep on logout" problem despite having configured org.gnome.settings-daemon.plugins.power sleep-inactive-{ac,battery}-type to 'nothing' for the only human user account plus the GDM user - I'm assuming that should prevent idle sleep entirely, but it doesn't.
Lastly, there are devices that don't support S3 sleep - mine's one of them. In this case, it's not possible to wake the machine at all afterwards. So that results in "log out = death" :J