This blog is a bit off-topic for in-koherence, but dealing with Windows 10’s inability to sleep through the night has been incredibly frustrating. Apparently it’s been for quite a few others too, so I decided to share my experience and ultimate solution (which fortunately did not involve burning my laptop.)
Since upgrading to Windows 10, I’ve come into the office on a couple occasions to find my laptop powered on. The first couple times I figured I must have forgotten to hibernate the system before leaving. But I was pretty sure I hibernated the system last night before going to bed…so what was it doing on?
A bit of web crawling suggests that this is a fairly pervasive problem. A number of users are reporting that their laptops or desktops are waking from hibernation in the middle of the night. They then stay on (since they’re on AC power – and like me, they probably have the system set to remain powered on while on AC. It also suggests that almost every other system is waking up, and then eventually going back to sleep/hibernating according to the system’s power plan settings.)
Perhaps Microsoft is conspiring with the power utilities to ensure that our PCs will draw power for no good reason during off-peak hours? I mean with everyone going solar the utilities need to justify their existence (and generate some cash flow) somehow.
Conspiracy theories aside, I’m not thrilled with having my laptop sitting around sucking power. So why is it waking up?
Causes of Insomnia
One way to determine this is to run the powercfg utility from the Windows command line:
C:\> powercfg /waketimers
will show the timers that have been set to wake up the system.
In my case, there were two timers:
- Windows Media Center Activation. This is apparently some holdover from the Windows 7 to Windows 10 upgrade. There’s no Media Center in Windows 10, so this event is basically useless (there’s some suggestion that it’s meant to clean up Media Center, but one would think after two weeks all of that cleanup would have been done, no?)
- Automatic Maintenance. Apparently Microsoft decided it would be a great idea to wake up the system in the middle of the night to do some maintenance. I’m not entirely sure what type of maintenance is being performed, but some users have suggested that Windows Update is one of the things being run.
While I’m all for running these background chores at a time when the system should be idle, I’m not at all thrilled with the idea of Microsoft waking up my laptop to do it. Especially when it doesn’t go back to sleep. There’s a lot of idle time available (like when I’m browsing the web, or writing blog entries). Or even better these tasks could be run as part of the hibernation process, before the system actually powers off (much the way there used to be an option to install updates prior to shutdown.)
Cures for Insomnia
So now that these have been identified, how do we get rid of them?
Automatic Maintenance can be managed via Settings:
- Start the Settings app.
- In the search bar, enter “Maintenance”. “Security and Maintenance” should appear as one of the search results. Select it.
- Expand the Maintenance section. This should reveal a number of items, including “Automatic Maintenance”.
- Select “Change maintenance settings” under “Automatic Maintenance”.
- Uncheck the box that says “Allow scheduled maintenance to wake up my computer at a scheduled time”.
Note that in my case, this box was already unchecked, yet Automatic Maintenance was still waking up the system! Well, as it turns out checking it, clicking OK, then unchecking it, and clicking OK, had the result of removing the “Automatic Maintenance” wakeup timer.
Getting rid of the Media Center Activation wakeup event can’t be done from Settings. Instead you’ll need to use the Task Scheduler app. You can launch it by typing “Task Scheduler” after bringing up the Start menu. Once there:
- In the left pane is a Task Scheduler Library tree. We’ll need to expand several levels. First expand the “Task Scheduler Library” by clicking on the arrow to the left.
- After expanding “Task Scheduler Library” a few folders should appear. Expand the “Microsoft” folder.
- Expand the “Windows” folder under “Microsoft”
- Click on the “Media Center” folder
- The pane to the right should populate with a number of items. In the list should be an item named “mcupdate”. Double click on it. This will bring up a new window “mcupdate Properties”
- Select the “Conditions” tab in the “mcupdate Properties” window.
- Under the “Power” section is an item “Wake the computer to run this task.” Uncheck this box.
C:\> powercfg /waketimers
again to verify that the mcupdate and Automatic Maintenance timers are gone. If there are any timers still displayed, review them carefully to ensure that your PC isn’t needlessly waking up in the middle of the night.