Fix

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]

Comments (AU Comments | US Comments)

  • pvtryan2

    This is cool. Thank you for posting Lifehacker!!

    Windows 7 is awesome

    pvtryan2

  • GirafficPark

    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

  • OptionalJoystick

    @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

  • nonewhatsoever

    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?

  • AloysiaPolynices

    Nice. This mean we still will have sleep issues on Windows 7. Just like XP and Vista. I love progress :)

    AloysiaPolynices

  • CapriceAmphimachus

    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

  • gpzbc

    @SDreamer: my question exactly

    gpzbc

  • Shadowman615

    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

  • SDreamer

    Know if Vista SP2 has this? Isn't vista SP2 suppose to come with new power management?

  • angrysteel

    @angrysteel:

    Wish the report had direct links to change the settings on each error.

    angrysteel

  • nka

    Any Linux or Mac alternatives?

    nka

  • BlackMage is doing the Time Warp

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

  • Saad Baig

    Windows 7 just continues to amaze me with its little hidden hacks

  • angrysteel

    Fun!

    angrysteel

  • CGA

    Hmmm, that was a waste of time: "The Power Efficiency Diagnostic library (energy.dll) could not be loaded"

    CGA

  • nka

    @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

  • unruled

    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

  • perryizgr8

    @pvtryan2: yeah. so awesome that even sleep is broken.

    perryizgr8

  • perryizgr8

    @nka: no because they don't have any sleeping problems.

    perryizgr8

  • planetarian

    @angrysteel: can't expect much for a CLI app. Perhaps someone will write a GUI for it.

    planetarian

  • MC Double Def DP

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

  • Steven Rahn

    @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

  • NICU

    @CGA: Same problem here... I'm running the beta not the RC at the moment though.. that might be the problem.

    NICU

  • BettinaFenderburg

    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

  • Brian Nguyen

    @unruled:

    Can you post the usb part of the report here? It might be some internal usb devices.

    Brian Nguyen

  • C.I.%%

    @SDreamer: Nope. I tried it and it said that it's an invalid command.

  • quadrant6

    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

  • shufflemoomin

    @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

  • 1g33k

    Windows Vista Failed. Windows 7 Wins. Was this microsofts plan? PR's a bish eh?

  • Brian Nguyen

    @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

  • unruled

    @Brian Nguyen:
    see this:
    [pastebin.com]

    unruled

  • deadpanwalking

    N/M I just had to navigate to it in IE x64.

  • deadpanwalking

    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.

  • Brian Nguyen

    @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

  • 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

  • angrykeyboarder

    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.

Post Your Comments

Got something to say? There are two ways to comment:

1. Guests

Click here to comment instantly.

2. Facebook Users

Click below to comment using your Facebook account.

We're looking for comments that are interesting, substantial or highly amusing. If your comments are excessively self-promotional, obnoxious, or even worse, boring, you will be banned from commenting. All comments are moderated.