Computer wakes by itself, but wake source is unknown

This took a while to track down, but here it is: with automatic updates turned off, obvious scheduled tasks disabled, and even a few services experimented with, Media Center turned out to be the culprit in my case. It's possible that others might run into different issues, so here's how to go about diagnosing this.

  1. In an elevated command prompt, run powercfg /waketimers.  The /lastwake option wasn't useful at all, but /waketimers turned up the service that was waking up my machine:

    Command Prompt, transcribed below

    C:\WINDOWS\system32> powercfg /waketimers
    Timer set by [SERVICE] \Device\HarddiskVolume2\Windows\System32\svchost.exe (SystemEventsBroker) expires at 2:36:15 PM on 11/3/2015.
      Reason: Windows will execute 'NT TASK\Microsoft\Windows\Media Center\mcupdate_scheduled' scheduled task that requested waking the computer.
    
  1. This did not show up under Services, but apparently it is a scheduler task... which you have to dig for a bit in the Task Scheduler UI.

    Go to Task Scheduler → Task Scheduler Library → Microsoft → Windows → Media Center to find it:

    Media Center\mcupdate_scheduled: Check for Media Center updates.

  2. Right-click and disable with extreme prejudice:

    right-click menu → "Disable"


Disable Windows 8 Automatic Maintenance.

By default, it will wake up your computer around midnight and run some optimization and cleanup tasks.

For reference see What is the "Automatic Maintenance"?


Just ran in to a similar issue as well on a new Dell laptop running windows 10. The computer absolutely refused to go to sleep, waking up almost immediately after putting it to sleep from either a power button press or from the start menu. powercfg -lastwake produced the same result as in the question - something woke it up, but no information as to what woke it up. powercfg -waketimers showed nada. Event viewer also reported 'unknown', with no reference to sleep timers. Sleep timers also disabled completely in power settings. No USB devices. No wired network card. Wi-fi network card wakeup disabled. The command powercfg /devicequery wake_armed showed that nothing was enabled to wake the computer.

Eventually, I tried disabling "wake on magic packet" and "wake on pattern match" in the wi-fi card advanced settings. This appears to have finally worked and allowed the computer to sleep. Apparently the card was somehow waking up the computer even though that was supposed to be disabled on the power management tab.

Edit: So, it seems this worked for a while, but now the computer will go into periods where it will refuse to sleep AND refuse to shut down (wakes up/boots up about two seconds after sleeping/turning off). The only way to 'fix' that is to hard power off (hold power button until it turns off), which works for an indeterminate amount of time before the computer again refuses to sleep/shut down. I'm wondering if I may have hit either a hardware fault or an embedded power management controller firmware bug.