Windows suddenly goes out of sleep (and fix)
I noticed for a while that one of my Windows rigs had some insomnia issues – Windows waking up in the middle of the night.
There is a few things that you need to check to find the culprit.
The device wake-up (or cat wake-up)
- Start by launching a “Command Prompt” ( ⊞ Win + R >
- Then execute the
powercfg -lastwakecommand line
If one of your device is waking up your computer, the command result output should show the
Wake Source device.
Cats walking onto mouse / keyboard have to be taken into consideration
The scheduled task wake-up
- “Command Prompt” ( ⊞ Win + R >
powercfg -waketimers(this will list up the potential scheduled task causing the issue)
- Open the “Task Scheduler” (⊞ Win + R >
- From there try to find the culprit task and “Disable” it
The “Event Viewer” ( ⊞ Win + R >
eventvwr) may also be helpful to troubleshoot the thing.
The Update Orchestrator Service
Startup type : Windows Service Service Name : UsoSvc Display Name : Update Orchestrator Service Dll path : C:\Windows\system32\usocore.dll Current Status : Manual/Running
The Update Orchestrator Service is the service responsible for scheduling the download of Windows updates. It’s also often the cause for getting Windows off the sleep mode. If you want to disable it, find below few solutions that will help you to do so:
Stop the Update Orchestrator Service:
⊞ Win + R >
sc stop "UsoSvc"
Disable the Update Orchestrator Service at start-up:
⊞ Win + R >
sc config "UsoSvc" start= disabled
Disable the Update Orchestrator reboot task:
⊞ Win + R >
SCHTASKS /Change /TN "Microsoft\Windows\UpdateOrchestrator\Reboot" /DISABLE
Lastly you may want to uncheck “wake computer to run task” from the Task Scheduler but there are chances Windows won’t let you to do so for the Update Orchestrator
- To by-pass this, you will need to download the PsTools provided by Microsoft
- Extract the
PsToolsarchive and change the
psexec.exeproperties to make it “Run as Administrator”
cmdand go to the extracted
- Run the
psexec.exe -i -s %windir%\system32\mmc.exe /s taskschd.msccommand (the Task Scheduler should open)
- Go to the UpdateOrchestrator reboot task and disable / uncheck “wake computer to run task”
This is the last one, but there is a possibility a device on your network is waking up your computer for some reasons. You can usually turn off Wake-on-Lan from your BIOS (usually DEL or F12 at the boot)
Hope this article will help you to get out of troubles with your Windows going out of sleep during the middle of the night.