Fine Tuning Media Center 7 – Power and Sleep

The iMon remote controller was always able to turn off our Media Center by itself – but then when a Logitech Harmony remote is introduced, things got ugly. 9 times out of 10, the PC would NOT shut down when the Harmony sent the command. This is likely due to the complexity of the iMon remote commands. This was alleviated when I switched the iMon manager software to recognize standard MCE remote commands instead of iMon remote commands. This solved the issue! Now that powering down the system was reliable using the remote, I wanted to address the issue of a full boot every time the system is used.

Anyone that has used the Sleep function in Windows 7 knows that it is much improved – return from sleep is often under 10 seconds. This was not a viable option when the remote was not able to turn the system off reliably – and to be honest, when I had tried briefly in the past to simply put the system to sleep instead of powering off, it would always wake back up at some point. Now it was time to investigate. There are a few commands that can help get some insight into this:

  • powercfg -devicequery all_devices will return all devices present in the system capable of waking from sleep
  • powercfg -devicequery wake_armed will list devices that are currently configured to wake the system from any sleep state
  • powercfg -devicedisablewake <devicename> will disable the device from waking the system
  • powercfg -lastwake will report information about what woke the system from the last sleep transition

Using this, I found that there were a few devices setup to be able to wake the system that really did not need to be – notably, a wireless keyboard, wireless mouse, and another USB HID. I then disabled those devices and tried putting the system to sleep again. The next morning, I awoke to find the system awake again! Was there some stray IR remote signal causing the iMon to power the system on using [essentially] the power button? Further investigation:

Nope. It was a scheduled task – more specifically, the mcupdate_scheduled task. While I do appreciate the Media Center update service, I don’t want it waking my system. That was quickly changed:

Uncheck the Wake the computer to run this task and we will see if the system will stay asleep from now on.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.