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 > cmd )
  • Then execute the powercfg -lastwake command 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 > cmd )
  • Then powercfg -waketimers (this will list up the potential scheduled task causing the issue)
  • Open the “Task Scheduler” (⊞ Win + R > taskschd.msc)
  • 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:

  1. Stop the Update Orchestrator Service:
    ⊞ Win + R > sc stop "UsoSvc"

  2. Disable the Update Orchestrator Service at start-up:
    ⊞ Win + R > sc config "UsoSvc" start= disabled

  3. Disable the Update Orchestrator reboot task:
    ⊞ Win + R > cmd > SCHTASKS /Change /TN "Microsoft\Windows\UpdateOrchestrator\Reboot" /DISABLE

  4. 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 PsTools archive and change the psexec.exe properties to make it “Run as Administrator”
    • Start cmd and go to the extracted Pstoolsfolder
    • Run the psexec.exe -i -s %windir%\system32\mmc.exe /s taskschd.msc command (the Task Scheduler should open)
    • Go to the UpdateOrchestrator reboot task and disable / uncheck “wake computer to run task”

The Wake-on-LAN

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.