Fix the problem by editing your registry
Many affected users have also had luck with applying a certain fix to their registry and
then configuring custom power settings to make sure that your computer only goes to sleep after
a longer period of inactivity. To do so, you need to:
Press Windows Logo key + R to launch a Run
Type regedit into the Run dialog and press Enter.
In the left pane of the Registry Editor, navigate to the following directory:
HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Control > Power > PowerSettings > 238C9FA8-0AAD-41ED-83F4-97BE242C8F20 > 7bc4a2f9-d8fc-4469-b07b-33eb785aaca0
In the right pane of the Registry Editor, double-click on a value named Attributes to modify it.
Replace whatever is in this value’s Value data field with 2.
Click on OK.
Exit the Registry Editor.
Once you have applied the registry fix, you need to change your system unattended sleep timeout to a
longer period of time. To do so, you need to:
Open the Start Menu.
Search for “power options”.
Click on the search result titled Power Options.
Click on Change plan settings under your selected power plan.
Click on Change advanced power settings.
Click on Change settings that are currently unavailable.
Click on Sleep.
Select System unattended sleep timeout. The value for this setting will probably be set to 2 minutes – change
it to something longer, for example, 30 minutes.
Apply and save the changes you have made, exit, and the problem should have been fixed.