Welcome to MSDN Blogs Sign in | Join | Help

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.

Published Monday, October 26, 2009 7:00 AM by oldnewthing
Filed under:

Comments

# re: Why won't my computer go to sleep? Where is the energy going?

Monday, October 26, 2009 7:17 AM by nathan_works

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..

# re: Why won't my computer go to sleep? Where is the energy going?

Monday, October 26, 2009 7:18 AM by John

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

# re: Why won't my computer go to sleep? Where is the energy going?

Monday, October 26, 2009 9:20 AM by James Schend

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

# re: Why won't my computer go to sleep? Where is the energy going?

Monday, October 26, 2009 9:54 AM by mike jones

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?

# re: Why won't my computer go to sleep? Where is the energy going?

Monday, October 26, 2009 11:17 AM by spike

i can just imagine ...

C:\> powercfg /requests

Can't sleep due to fear of clowns!!

# re: Why won't my computer go to sleep? Where is the energy going?

Monday, October 26, 2009 11:58 AM by Leo Davidson

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.

# re: Why won't my computer go to sleep? Where is the energy going?

Monday, October 26, 2009 12:24 PM by Puckdropper

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.

# re: Why won't my computer go to sleep? Where is the energy going?

Monday, October 26, 2009 12:35 PM by Adam V

> 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?

# re: Why won't my computer go to sleep? Where is the energy going?

Monday, October 26, 2009 1:10 PM by Washu

I knew those clowns were up to no good!

# re: Why won't my computer go to sleep? Where is the energy going?

Monday, October 26, 2009 1:23 PM by power-shell

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.

# re: Why won't my computer go to sleep? Where is the energy going?

Monday, October 26, 2009 1:32 PM by Howard Phillips L.

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).

# re: Why won't my computer go to sleep? Where is the energy going?

Monday, October 26, 2009 3:20 PM by n

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>

@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.

# re: Why won't my computer go to sleep? Where is the energy going?

Monday, October 26, 2009 5:29 PM by Alex

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

# re: Why won't my computer go to sleep? Where is the energy going?

Tuesday, October 27, 2009 1:46 AM by Big Stew

Clowns? Why don't cannibals eat clowns? Because they taste funny...

# re: Why won't my computer go to sleep? Where is the energy going?

Tuesday, October 27, 2009 4:07 AM by ConstB

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?

# re: Why won't my computer go to sleep? Where is the energy going?

Tuesday, October 27, 2009 5:58 AM by someone else

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

# re: Why won't my computer go to sleep? Where is the energy going?

Tuesday, October 27, 2009 6:04 AM by Jeroen Mostert

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

# re: Why won't my computer go to sleep? Where is the energy going?

Tuesday, October 27, 2009 12:31 PM by kog999

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

Its ok John, therse no such thing as a 2

# re: Why won't my computer go to sleep? Where is the energy going?

Tuesday, October 27, 2009 4:22 PM by matt

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

# re: Why won't my computer go to sleep? Where is the energy going?

Wednesday, October 28, 2009 6:00 AM by Achtanabla

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.

New Comments to this post are disabled
 
Page view tracker