Why won’t my computer go to sleep? Where is the energy going?


The powercfg utility has been around for a while, but in Windows 7, it gained a little bit more awesome.

powercfg /energy will analyze your computer's power consumption and report on things like devices that prevent the computer from sleeping, devices which won't suspend, and processes which are increasing your battery drain.

Another neat flag is powercfg /requests which will report on why your computer can't go to sleep, for example, because it has open files on the network, or because the clown will eat it.

Comments (20)
  1. nathan_works says:

    I hope the DDK (or WDK now ?) was also updated.. Driver power config under the win2k WDM model was, well, hard. I worked on a software driver that didn’t correctly handle power IRPs. Thanks to the OSR guys for explaining "null power management".. I was able to close out a long-standing "laptops won’t go into sleep/suspend mode when $MY_PRODUCT was installed".

    Yes, this was now almost 10 years ago.. Haven’t done much driver work in the past 8 or so..

  2. John says:

    Also, computers are afraid of seeing 2’s in their nightmares.

  3. James Schend says:

    "Gained a little bit more awesome?" You’re writing posts like Fark comments now. Awesome.

  4. mike jones says:

    I have the opposite problem… On an unattended machine a batch file uses powercfg to select the High Performance plan and my machine still goes to sleep.  Does a plan change require a reboot?

  5. spike says:

    i can just imagine …

    C:> powercfg /requests

    Can’t sleep due to fear of clowns!!

  6. Leo Davidson says:

    Very handy! Thanks for pointing it out.

    Working out which driver/etc. is b0rking sleep mode can be quite a pain and this looks like something that’ll help a lot.

  7. Puckdropper says:

    The energy switch is the most awesome addition to power management yet.  The only problem is it thinks not sleeping and going straight to hibernate is a problem.  Sleep mode is screwed up on my laptop, so sometimes it goes to sleep forever.

    I’ve love to see this one thing backported to Vista for those who are having sleep problems but haven’t upgraded yet.

  8. Adam V says:

    You’re writing posts like Fark comments now. Awesome.

    It’s more like a sbemail. The real question is, how does Raymond type with those boxing gloves on?

  9. Washu says:

    I knew those clowns were up to no good!

  10. power-shell says:

    Speaking of power management, can the horrid shell team undo some horrid changes made in Windows 7 and Vista? Please make all three power plans accessible directly from the notification area power icon, allow desktop users without a UPS to display the power icon and allow the comp to ask the user what to do when the power button is pressed every time like XP.

  11. Howard Phillips L. says:

    Research at Miskatonic University has shown that clowns are, in fact, the incarnation of evil itself.

    And ’tis a true pity that Windows PE doesn’t have any power management features. Would have been great to see the current capacity of my netbook’s battery …

    @power-shell:

    Or at least asking for confirmation without having to activate the shutdown event tracker (which doesn’t work with sleep, either).

  12. n says:

    It is about time windows can monitor power usage like this.  Maybe this will make the power management tax that much higher a priority because it is now more visible. <http://blogs.msdn.com/oldnewthing/archive/2005/08/22/454487.aspx&gt;

    @mike jones

    You need to check the machines high performance settings, because changing configs does not require a restart to take effect.

    The problem is that by default even high performance will cause the computer to hibernate when plugged in (even sooner when on battery).

    Also, when you change it don’t do it in the pretty control panel interface, you need to go into the advanced settings and also make sure that both sleep and hibernate are turned off because sleep is the only thing you can set from the pretty control panel interface.

  13. Alex says:

    I’m very impressed: this is incredible functionality. Yet another reason to go for Windows 7.

  14. Big Stew says:

    Clowns? Why don’t cannibals eat clowns? Because they taste funny…

  15. ConstB says:

    It’s good news, though I’m still curious, why "Hibernate" is no longer available through ‘start’ menu even if it’s enabled with powercfg? Why I now have to run ‘shutdown /h’ in admin shell instead of pushing a button?

  16. someone else says:

    Because Hybrid Sleep is enabled. Either disable it, or cut power after putting your computer to sleep.

  17. Jeroen Mostert says:

    nterror.h:

    #define NT_STATUS_CANT_SLEEP_CLOWN_WILL_EAT_ME(0xC0000000 | 0x07c8)

    winerror.h:

    //

    // MessageId: ERROR_COULROPHOBIC_INSOMNIA

    //

    // MessageText:

    //

    //  Windows is unable to suspend because it fears it will be

    //  eaten by a clown. If this condition persists, contact your  

    //  network psychiatrist.

    //

    #define ERROR_COULROPHOBIC_INSOMNIA 1992L

  18. kog999 says:

    "Also, computers are afraid of seeing 2’s in their nightmares."

    Its ok John, therse no such thing as a 2

  19. matt says:

    But does it FINALLY report when a SERVICE woke up the machine????

    I had the opposite problem.  In Vista, I would come home and find my machine awake – and it would wake at random times during the day and night.  And WHY???  Powercfg wouldn’t tell me.  It turned out to be the media center’s TV schedule update service that would wake the machine.

    It was infuriatingly broken – and still is.  I either disable the service and get an error message and horrible slow UI control every time I open media center, or I leave it on and have my machine waking at random times.

    Here was the whole trackdown – and LOTS of other people have this same problem:

    http://mattfife.net/wordpress/?p=178

  20. Achtanabla says:

    Hm when I enter on my Windows 7 machine powercfg /energy it doesn’t recognize /energy as a valid parameter but when I enter powercfg -energy it works.

Comments are closed.

Skip to main content