What I assume is the same issue I ran into years ago - where a computer going to sleep, a user would wake it up, and when they stopped using it - it would go back to sleep in a super short amount of time (I believe it was 2 mins).
After years I found out this was the System unattended sleep timeout setting, which is a hidden setting by default. This setting can be unhidden so you can change it in the GUI via
powercfg -attributes SUB_SLEEP 7bc4a2f9-d8fc-4469-b07b-33eb785aaca0 +ATTRIB_HIDE
Or you can change the registry
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\238C9FA8-0AAD-41ED-83F4-97BE242C8F20\7bc4a2f9-d8fc-4469-b07b-33eb785aaca0
The Attributes DWORD controls how long before the system goes back to sleep.
0 - disables it
OK - onto today's issue.
User's computer went to sleep sometime yesterday - woke it up - between the amount of time the user stared at the screen, them typing in their password and pressing enter to start the login process - the timeout timer expired - putting the computer back into sleep mode.
The user would then wake the computer to find a - can't log in error message (Don't recall exact message).
Rebooting the computer instantly solved this issue - which they claimed they did - hmm.. now that I'm writing this - I need to look at the logs and see if they actually did reboot - I'm guessing not.
Of course when the user reported this issue - they reported - I try to log in - the spinny thing spins - then the computer just powers off. Of course once I arrived and watched the process happen - I noticed the slow flashing power light - indicating sleep mode, which instantly lead me to the situation I mention at the start of this post.
I rebooted the computer and was able to log in instantly. I logged out, had the user log in and it worked fine!
I went in search of the registry key (during which I updated my ancient post here) to change the system to not use System unattended sleep timeout.
Let's see how long until this user has their next issue.