8

I recently upgraded my home desktop computer to Windows 10. Ever since I've done this, my computer has been waking itself up from sleep at seemingly random times during the night. This is incredibly annoying since I sleep in the same room as my computer and it wakes me up at 3:00AM.

After some research, it appears as though it is waking itself up to automatically install updates.

I've tried several things to disable this.

  • Go to "Power Options" in the control panel. Change plan settings. Change advanced power settings. "Sleep"/"Allow Wake Timers" is "Disabled".

  • I've used powercfg -devicedisablewake to disable all devices so that powercfg -devicequery wake_armed returns NONE.

  • Wake on LAN is disabled on my motherboard.

  • In "Windows Update Settings", under advanced options, I've switched from "Automatic" to "Notify to schedule restart".

  • Finally, based on this Reddit thread, I've opened "Task Scheduler", gone to Microsoft/Windows/UpdateOrchestrator/Reboot, opened Properties and then the Conditions tab, and unchecked "Wake computer to run this task".

I thought the problem was finally solved after I turned off "Wake computer to run this task" in the reboot task for UpdateOrchestrator (the last bullet above). That seemed to solve the problem for several days. But then it happened again last night. When I looked today, the "Wake computer to run this task" option was checked again in Task Scheduler. I think the setting might have changed itself when I manually ran Windows updates a day or two ago.

This is driving me mad. How do I prevent my computer from waking itself up from sleep?

mkasberg
  • 2,503
  • 2
  • 17
  • 20
  • 3
    I got so tired of this issue I actually moved to Linux. – Pedro Rodrigues Oct 27 '19 at 16:37
  • Actually this is one of those things that without further diagnosis (as per jjhayter's answer) can't be answered... simply because your computer can wake up for other reasons and windows update takes that opportunity to run. In more recent versions of Win10, UpdateOrchestrator for example runs backup scan tasks as well. Those need to be disabled too if you don't want your comp to wake up. – Fizz Mar 10 '21 at 20:08
  • To give you an example: on a machine that was updated from Win7 to Win10, the real reason for wakeup was... `C:\WINDOWS\system32>powercfg -lastwake` ... `Owner: [SERVICE] \Device\HarddiskVolume9\Windows\System32\svchost.exe (SystemEventsBroker) Owner Supplied Reason: Windows will execute 'NT TASK\Microsoft\Windows\Media Center\mcupdate_scheduled' scheduled task that requested waking the computer.` MS apparently forgets to disable those useless (in Win10) tasks from Media Center. Those can wake up your computer and then whatever is set to run when the computer is idle... does run too. – Fizz Mar 10 '21 at 20:17
  • You can search all such tasks from powershell with `Get-ScheduledTask | where {$_.settings.waketorun}`. Just disabling `UpdateOrchestrator/Reboot` only prevents the computer from waking up *and rebooting* after updates are installed. It won't prevent them from installing if e.g. the computer wakes up for other reasons. – Fizz Mar 10 '21 at 20:20
  • Also, by the graces of MS, that setting in power plans to disable all wake timers... doesn't really work (i.e. apps can apparently work around it) https://answers.microsoft.com/en-us/windows/forum/windows_10-other_settings-winpc/why-does-power-options-sleep-allow-wake-timers/4bf24b81-c4bc-4c42-89a2-f252f509ef60 So you really need to check once in a while what might set timers with `powercfg /waketimers`. – Fizz Mar 10 '21 at 20:52
  • A common culprit nowadays seems to be MS' own start menu update process (which runs separately from the Orchestrator-based os Update)... `Timer set by [PROCESS] \Device\HarddiskVolume9\Windows\SystemApps\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\StartMenuExperienceHost.exe expires at 4:00:00 AM on .` – Fizz Mar 10 '21 at 20:56
  • In version 1909 MS acknowledged the persistent wake-up bug as machine-dependent... https://www.computerworld.com/article/3510463/bugs-continue-to-haunt-win10-version-1909.html It's not clear how much of that they fixed. – Fizz Mar 10 '21 at 21:18
  • N.B. there's simple C code [here](https://social.msdn.microsoft.com/Forums/vstudio/en-US/66778034-be34-413d-bd2a-c8c3f4babca4/how-to-automatically-turn-on-a-computer-at-a-specified-time-using-windows-api-functions?forum=vcgeneral) for setting/testing the wakeup timers API. Basically if that works then you can expect the OS update wakeups (of various kinds) to work too. I guess there might be a powershell variant of that C code that doesn't even require compilation. – Fizz Mar 10 '21 at 21:58

2 Answers2

3

I had this issue too, even after disabling the wake timers in Power Options, Windows kept waking up to install updates. I solved this by tweaking a Group Policy:

Computer Configuration 
  > Administrative Templates
    > Windows Components 
      > Windows Update
         > Enable Windows Update Power Management: set to Disable

Note: does anyone know how to automate this setting using PowerShell?

Andy
  • 241
  • 3
  • 9
3

Run the Command from an elevated command prompt; see what it tells you.

C:\>powercfg -lastwake

Example from my laptop:

 powercfg -lastwake
   Wake History Count - 1
   Wake History [0]
     Wake Source Count - 1
     Wake Source [0]
     Type: Device
     Instance Path: PCI\VEN_8086&DEV_8C31&SUBSYS_201F1043&REV_05\3&11583659&0&A0
     Friendly Name: Intel(R) USB 3.0 eXtensible Host Controller - 1.0 (Microsoft)
     Description: USB xHCI Compliant Host Controller
     Manufacturer: Generic USB xHCI Host Controller

After thinking about it it occured to me that my Logitech universal dongle was the culprit as it was a HID complaint mouse... Simply disable that in Power management and you should be golden.

jjhayter
  • 139
  • 1