GNOME suspends immediately after login on multi-user systems
Using GNOME 3.30.2 on a multi-user system:
Actual behavior:
- Both user 1 and user 2, which exist as local user accounts on the system, have set the suspend time to 15 minutes (AFAIK the default). Both users log into their accounts and then lock the session without logging out, i.e. they keep their sessions running, but locked.
- User 1 logs out.
- 15 minutes pass and GNOME suspends the computer.
- User 2 presses a key on the keyboard to resume the computer.
- GNOME shows the login screen.
- User 2 logs in by entering the login credentials and clicking the unlock button or pressing the Enter key.
- GNOME immediately suspends the computer again.
- User 2 presses a key on the keyboard to resume the computer.
- User 2 logs in again, now things are working and GNOME doesn't suspend again right after unlocking.
Expected behavior:
Everything like above, except 7-9.
The issue possibly happens because GNOME, after user 2 unlocks his session, again compares the idle time of the newly-unlocked user to the last time he was logged in, notices that the difference exceeds the suspend-timeout of the user and decides to suspend the computer.
There seems to be either an unwarranted check for suspend right after login, or a failure to correctly reset the suspend timeout as soon as any user resumes the computer and the login/unlock screen is shown.
I have NOT looked into the code.