How to prevent your Windows/WS OS Server from sleeping/locking?

Created on 2021-08-21 Updated on 2024-01-06

If you are experiencing an issue where your Windows Server goes to sleep after becoming idle for some time, there is a possible quick and easy fix that should do the trick. Follow these steps to resolve the issue:


  1. Open "Group Policy".
  2. Navigate to Computer Configuration > Administrative Templates > System > Power Management > Video and Display Settings.
  3. On the right side section, Double-click on the "Turn Off the Display (Plugged in)", enable it and setting, and change the "Turn Off the Display (seconds)" value to 0.
  4. Re-start your server.


The "Caffeine" App Method


According to Source: If you have problems with your PC locking or going to sleep, caffeine will keep it awake. It works by simulating a keypress once every 59 seconds.


Please download and install Caffeine on your Windows Server, then open it and double-click (it needs to be like the shown screenshot)  which will keep your machine awake and keep it active in the Windows Task Bar / Task Tray.

That's it, this should prevent Windows from locking or going to sleep. 

Note: This does not include the Windows Updates Auto-Restart, that's another matter that needs to be handled separately.


Once you complete these steps, test your Windows OS Server if it no longer goes to sleep after becoming idle. However, if you still experience the same issue, please create a ticket, and we will be happy to assist you in applying additional settings and methods and preventing it from happening again.

Found this article helpful?

[ 3 Out of 5 Found Helpful ]

You did not find your answer? let us assist you.

Create a ticket and wait for a support agent to join you very soon.