Windows 7 Powercfg -energy for Sleep Management

Windows 7 Powercfg -energy for Sleep Management

Windows 7 has a new switch for the built-in Powercfg command, it’s called -energy.  Appending this switch is invaluable when troubleshooting sleep problems, particularly on Windows 7 laptop or notebook computers.

Topics for Windows 7 Powercfg -energy


Guy’s Rule for Laptops and Notebooks
Every Laptop Gives One of These Problems with Power Management

  • Won’t wake up from sleep or hibernate.
  • Wakes up when you don’t want it to!
  • Cannot set at least one of: Sleep, Hibernate or Standby.
  • Battery is flat after 40 minutes of solid typing.

Control Panel Applets – E.g. Power Options

Every Control Panel applet, including the Power Options cpl, has at least 4 alternative ways of changing its settings.

  1. GUI – It’s always worth LOOKING at the settings and getting a feel of what’s possible.
  2. Registry – Essential where there is no GUI for a setting.
  3. Group Policy – Especially useful for setting multiple machines in a domain.
  4. Scripting with PowerShell (or VBScript).
  5. Built-in Command line utility, such as powercfg.

If you are going to examine the settings of an item in the Control Panel then only a DOS extremist would eschew at least take a peak at the GUI.  If you are troubleshooting, and the GUI does not get the job done, then where do you turn next?  Probably the Group Policy editor, or maybe the Registry.  Yet in the case of Power Options I would place the command line powercfg as the number 2 tool for examining sleep and hibernation settings.

Guy’s Observations on Windows 7 Powercfg

  • Powercfg is more than just a toy.  It’s a worthy alternative to the Control Panel’s Power Management GUI.
  • Useful for troubleshooting Power problems such as won’t wake from sleep or hibernate.
  • Handy to see which devices are supposed to wake a sleeping computer.
  • Gives an insight into the design and inter-relationship between the sleep components.
  • Leads you to think, ‘How could I use the command line to automate?’ 
  • Prompts you to deduce, ‘There must group policies to control sleep’.
  • Laptops have special settings / commands / challenges when running on their battery.

Guy Recommends: SolarWinds Free Wake-On-LAN UtilitySolarwinds Wake-On-LAN

Encouraging computers to sleep when they’re not in use is a great idea – until you are away from your desk and need a file on that remote sleeping machine!

WOL also has business uses for example, rousing machines so that they can have update patches applied.  My real reason for recommending you download this free tool is because it’s so much fun sending those ‘Magic Packets’. Give WOL a try – it’s free.

Download your free copy of SolarWinds Wake-On-LAN

Getting Started with Powercfg

I start by clicking the Start Orb, Type ‘cmd’, remembered to right-click and ‘Run as administrator’.  Now I am ready to type the command powercfg.  Actually one of the first switches I use is the ubiquitous -?  Next I recommend trying the -devicequery switch.  I mention this because it initially I could not get it to work, then I realized that: powercfg -devicequery needed another parameter for example:

powercfg -devicequery wake_up_from_S3_supported
powercfg -devicequery wake_from_any

The reason that I chose this example was to encourage you study the help (powercfg -?), and thus get into the rhythm of this command.  powercfg -MainSwitch Further_refinement.  If you can do this then I declare you an expert on Powercfg, and I wish you good luck in researching your specific sleep or hibernate problem.

Troubleshooting Windows 7 with powercfg -energy

The secret of success is that once this command ‘powercfg -energy’ completes, you type, ‘energy-report.html’.  Now you should see a browser pane with detailed information about what happens when the laptop tries to sleep.

My first point is that the powercfg command is harsh on errors.  Even machines that seem to be working fine generate at least 3 Errors.  The reason that I recommend running powercfg -energy is to set you on the correct path when trying to track down a serious sleep or hibernate problem.

Trap 1 The command: powercfg -energy only works with Windows 7 (Not Windows Server 2008)

Trap 2 The energy-report.html file is created in the current directory.  Guy thought that it was always created in the \windows\system32 folder – wrong.  These days before I create a report with -energy I cd: to a folder on my e:\ drive.

Bonus – Check Your Battery Capacity Status

Look for a similar entry at the bottom of your report.

Battery:Battery Information
Battery ID Sony Corp.
Manufacturer Sony Corp.
Serial Number
Chemistry LiOn
Long Term 1
Design Capacity 57720
Last Full Charge 57720

More Troubleshooting Ideas

powercfg -lastwake
powercfg -devicequery wake_armed

Solarwinds Config GeneratorGuy Recommends: The Free Config Generator

SolarWinds’ Config Generator is a free tool, which puts you in charge of controlling changes to network routers and other SNMP devices.  Boost your network performance by activating network device features you’ve already paid for.

Guy says that for newbies the biggest benefit of this free tool is that it will provide the impetus for you to learn more about configuring the SNMP service with its ‘Traps’ and ‘Communities’. Try Config Generator now – it’s free!

Download your free copy of Config Generator

PowerCfg Registry Values

I have found these two settings in the registry, but I am not impressed they don’t seem to ‘work’.   Normally I love tweaking the registry, but in the case of powercfg, it’s the command line that gets the job done for me.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Controls Folder\PowerCfg

HKEY_CURRENT_USER\Control Panel\PowerCfg

If we research CurrentPowerPolicy, then I have discovered two contradictory explanations.  I say again, this was a fruitless journey for me, but if you make sense of these values, then please do let me know.

0 – Home/Office desktop
1 – Portable/Laptop computer
2 – Monitor on for presentations
3 – Network computer (no Wake-on-LAN)
4 – Optimized for high performance
5 – Optimized for power saving

Index Power setting type For use on
0 Power Saver AC
1 Power Saver DC
2 Balanced AC
3 Balanced DC
4 High Performance AC
5 High Performance DC

See more on Windows 8 Powercfg -Energy »

Summary of Windows 7 Powercfg -energy

Windows 7 has a new switch for the built-in Powercfg command, it’s called -energy.  This technique is invaluable for troubleshooting sleep problems, particularly on Windows 7 laptop or notebook computers.


If you like this page then please share it with your friends


Microsoft Windows Version 7 Configuration Topics