Hidden Windows 7 Tool Troubleshoots Sleep Mode Problems
Windows only: Ever wonder why your laptop’s battery seems to die too quickly? The Windows Help blog points out a hidden command-line switch that generates a report with loads of helpful troubleshooting information.
The report lists all of the devices that are causing problems with sleep mode, explains the different power saving modes your computer supports, and even gives you detailed information on your battery—invaluable information when your system takes forever to go in and out of sleep mode. Generating the report is easy enough—just open up a command prompt in administrator mode using the context menu -> Run as Administrator option, and then type in the following:
powercfg -ENERGY
The utility will take a while to generate the report, sometimes more than the 60 seconds it quotes you—but when it finishes you can open up the generated file in your favourite web browser. Once you’ve examined the report, you can figure out if you need to do some tweaking or update a driver. (Back in November, we speculated that this feature might get a friendlier front end, but that’s not looking too likely now we’ve hit RC.)
powercfg –ENERGY – Windows 7 – Power Management Reports [via Tweaking with Vishal]
- Next Post: Move Your iTunes Library To An External Hard Drive »
- « Previous Post: Cobocards Is An Impressive, Collaborative Flash Card Webapp
Comments (AU Comments | US Comments)
This is cool. Thank you for posting Lifehacker!!
Windows 7 is awesome
pvtryan2
I've had unwanted wakeup problems with my Windows 7 computer. Seems like it's caused by external USB drives, even my MP3 player. I suppose it's possible that it's a hardware issue - its a new computer that hasn't had any other OS.
GirafficPark
@nonewhatsoever: Not terribly likely, but you could check the Task Scheduler. Tasks can be set to wake up the computer if they need to run.
OptionalJoystick
It'd be nice for a similar tool for Vista. My PC wakes up automatically after going to "sleep". Sometimes instantaneously, seemingly always within a minute or so. LAN card, keyboard, and mouse are all disabled from waking the computer. Any thoughts on what's causing these constant wakeups?
Nice. This mean we still will have sleep issues on Windows 7. Just like XP and Vista. I love progress :)
AloysiaPolynices
I'm having problems with my internet conection after Sleep Mode in Windows 7. When my computer comes back from Sleep, I don't have internet and I can't reconnect, the only choice I have is to reboot the machine. I already checked energy stuff that some links from Google told me to do (looks like the same occured in Vista), but no success. Anyone solved this mess?
CapriceAmphimachus
@SDreamer: my question exactly
gpzbc
That's a nice addition (the -ENERGY switch). Actually the powercfg command itself, however, has been around at least since the XP days. On Vista or XP you can still use it to troubleshoot sleep/wake issues, although it's a bit more manual.
See Raymond Chen's article:
[blogs.msdn.com]
Shadowman615
Know if Vista SP2 has this? Isn't vista SP2 suppose to come with new power management?
@angrysteel:
Wish the report had direct links to change the settings on each error.
angrysteel
Any Linux or Mac alternatives?
nka
Awesome! Thank, LH!
I was having sleep problems on my desktop with Vista. Disabling "prevent sleep while sharing media" in the advanced power settings helped, but not always. The system would start backing up RAM to the hard drive, via Hybrid Sleep, but then it would just hang there. If I touched the mouse or keyboard, the system would resume as if the screen saver had only kicked in. Even worse, sometimes the system would hang, but also disable the mouse & keyboard. I would have to hard-reset the machine to get it working again.
The winning combination seems to be allowing idle to sleep AND disabling Hybrid Sleep. My system now sleeps within 10 seconds without any issues.
BlackMage is doing the Time Warp agaaaaaaain!!!
Windows 7 just continues to amaze me with its little hidden hacks
Fun!
angrysteel
Hmmm, that was a waste of time: "The Power Efficiency Diagnostic library (energy.dll) could not be loaded"
CGA
@perryizgr8: Well my Linux box does have sleeping & hibernating issues. However, I think the problem might be the video card. My Dell is a dinosaur.
nka
USB not powering off according to this, but nothing is plugged in. In power schemes (laptop) selective suspend is enabled.
is there another way to enable power saving on USB ports? (or forcing it..?)
unruled
@pvtryan2: yeah. so awesome that even sleep is broken.
perryizgr8
@nka: no because they don't have any sleeping problems.
perryizgr8
@angrysteel: can't expect much for a CLI app. Perhaps someone will write a GUI for it.
planetarian
@nonewhatsoever: I have the same exact problem, and it really sucks because I carry my laptop to class in a laptop bookbag. As protected as it is from the weather and bumps, that extra insulation means the heat caused by a non-sleep laptop running in a tightly enclosed space makes for a rather bad combination. Not to mention it drains my battery. I have noticed that the second time putting it to sleep usually works.
@CGA: It's not working for me either. When I try to load the document Firefox says that the file cannot be found.
Windows 7 x64 b7100
Dell XPS M1330
Steven Rahn
@CGA: Same problem here... I'm running the beta not the RC at the moment though.. that might be the problem.
NICU
Doesn't seem to be working for me. "An unexpected error condition has occurred. Unable to perform operation. You may not have permission to perform this operation." I am the only user this computer has ever seen, and I clicked "run as administrator." What went wrong?
BettinaFenderburg
@unruled:
Can you post the usb part of the report here? It might be some internal usb devices.
Brian Nguyen
@SDreamer: Nope. I tried it and it said that it's an invalid command.
Works great after running as Administrator.
Also if you want to avoid navigating to the mentioned html file after the test is done, just type "start energy-report.html" at the command prompt (no quotes) to open the report in your web browser.
quadrant6
@perryizgr8: With an infinite amount of drivers and hardware available, there will be problems. Microsoft has no control over whether manufacturers make their hardware and drivers sleep compliant. Damn fanboys.
shufflemoomin
Windows Vista Failed. Windows 7 Wins. Was this microsofts plan? PR's a bish eh?
@unruled: Looks like there are two devices that do not enter selective suspend. One is the fingerprint reader, and the other, my guess, is an integrated webcam. Can you check the laptop manufacturer's website to see if they have updated drivers for these two devices? The new drivers might support selective suspend.
Device Name USB Composite Device
Device ID USB\VID_05A9&PID_7670
Device Name TouchChip Fingerprint Coprocessor
Device ID USB\VID_0483&PID_2016
Brian Nguyen
@Brian Nguyen:
see this:
[pastebin.com]
unruled
N/M I just had to navigate to it in IE x64.
Everything works up to the point where I try to start/navigate to the energy report in my web browser. I seem to have a lot of problems too. Oh well.
@CGA: CGA, did you run "powercfg /energy" from a 32-bit cmd window on a 64-bit win7? Can you describe how you run "powercfg /energy"?
Brian Nguyen
@Steven Rahn: Steven, can you try either:
- copy the report to some temporary folder (e.g. c:\temp)
- launch 64-bit IE, then open the report using the address bar (or File menu)
Brian Nguyen
Forget laptops, I'm running a desktop and Windows 7 began having sleep problems here a few weeks after I installed it. I'm sure it's a driver or an app but I can't figure out which.
So THANKS for this.