If you have the most updated operating system, you shouldn’t encounter most system issues, including your computer going to sleep randomly. Whenever this error occurs, it indicates misconfigured power settings.
Even if you suddenly started encountering the issue without having changed such settings, it is possible that another admin user made such modifications. Apart from that, it is also possible that some third-party processes are causing such issues.
So, first,install all the latest updatesavailable. If your computer continues going to sleep, try out the possible solutions below.
Check Power Settings
If you haven’t already checked the sleep settings in your power plan,
If the drop-down box is grayed out, its corresponding group policy setting is overriding this setting. To change it,
If yourcomputer is part of a domain, you need to contact your network admin and have them make this change in the relevant group policy object.
Check Screen Saver Settings
Your screen saver settings include an option to display the logon screen on resuming from the screen saver. If you have a blank screen saver while this option is enabled, the effect will be the same as your computer going to sleep after a certain time. To change the setting,
Check System Unattended Sleep Timeout
The Advanced Power Options also include an attribute called System Unattended Sleep Timeout. It puts the device to sleep after the specified time of inactivity, which is 2 minutes by default. This attribute is hidden by default, so you need to show it before checking it.
Check Your Programs
You should also check all the available programs in your system and see if there are any apps that may be causing this issue.