Windows Vista Power Management

The hardware that makes up today’s laptops has gotten quite efficient and we have worked hard to improve Windows' ability to manage that hardware.  One of the biggest improvements in the mobile PC experience for Windows since the early 1990 is longer battery life.  The trick here is to make the system as efficient as possible while still maintaining a great user experience.  At the same time, the increased cost of electricity has become a key factor for enterprise customers who are under continued pressure to manage TCO (total cost of ownership).  As a result of all of these factors, we decided to make some extensive changes in the power management sub-system for Windows Vista.

The Windows Vista power management goals were simple:  1) making turning a computer "off"/"on" as reliable, simple, and fast as turning off/on a TV, and 2) maximizing the active usage if on battery and reducing the energy consumption if on A/C power.  The first goal involved not only improving the predictability of the behavior when a PC was switched "off", but more importantly changing the model for what "off" and "on" means.  Everyone knows that turning a TV off doesn’t really turn it off.  It is still available to receive the remote control signal, etc. so that it can come back on quickly.  We wanted to emulate this for Windows Vista machines.

To the degree possible, "off" equals "sleep" in Windows Vista, where the system state is saved in RAM.  This creates the best balance of user experience for speed of resuming and lowest usage of power.  However, if the PC is running on batteries even that minimal power usage could drain the batteries eventually.  Remember the top goal here is to make sure that we can enable a fast on experience (like your cell phone) and a fast off experience, while still making sure that you don't lose your work when a Windows PC is turned off.  To do this, we created a new approach that we call "hybrid sleep state" that is the best of the sleep and hibernate modes (which existed separately in Windows XP).  In this hybrid mode, the state is stored both in RAM and on disk, so nothing can be lost if power goes out.  Then the system is suspended into the low powered sleep state for a period of time (like your cell phone).  Normally, when the user returns and wakes the machine, system state is just restored from RAM, and resume responsiveness to the user is fast.  However, if for some reason power is lost (for example, if the PC is unplugged to move it -- like you might move your TV), the system can still resume from the hibernate image previously saved to disk with all context and data intact.

While Hybrid Sleep can be used on a laptop computer, it isn’t as applicable to laptops for a couple of reasons.  First, a desktop is vulnerable to power loss, while a laptop can of course run on its internal battery.  A laptop can also detect or even wake up from standby when the battery is low so Windows can save everything to the disk before the battery is completely drained -- and remember, in the sleep state all the battery needs to do is to refresh the RAM, which takes very little power.  Also, mobile users want a grab-n-go usage model, so taking extra time after the laptop lid is closed spinning the disk to write out a potentially large hibernate file could be a problem.  Lastly, after a laptop has been in sleep for a while, the system will wake up and immediately go into the hibernate state.  This state uses absolutely no power, so even the minimal battery drain used in standby is removed.  If the system is in this power state when the user wants to use the system, then the system state is restored from disk.

In either case (suspend to RAM or disk), though, the user conceptually just thinks of "on"/"off."  In the case that the machine hasn't been used for a long time, then the only difference to the user is that it just takes slightly longer to resume back to where they were.  As I mentioned, if the system is A/C-powered, then by default we leave the system in the sleep state (never going into hibernate) so that the machine can be virtually instantly available, but still have substantial power savings compared to past systems.  The bottom line is that because there is no reboot, the PC can respond much more quickly.

In order to ensure that "off" worked effectively with this new model, we needed to address some unpredictability that occurred with sleep in Windows XP.  Instead of waiting for each application, service and device to agree before going into power saving mode, in Windows Vista we changed the approach so that we give the application, services and devices a notice of the impending suspend and then wait a maximum of 2 seconds for them to finish up any work and put themselves into a state they can continue from when the system wakes up.  With Windows Vista there won’t be any more sinking feelings when the airplane is at 10,000 feet and you reached into your laptop bag to find the laptop all cozy and warm because it didn’t go into power saving mode when you were running for the plane -- caused because some device, service, or application wasn't well behaved.  One of the interesting things about the new power management system is that Windows Vista is able to come back from the sleep state so quickly that the first time you open the lid on a suspended Windows Vista laptop you might wonder if it was on the whole time -- trust, me it wasn’t.

Our second goal was to reduce the power consumption of PCs when they are idle.  In the past the few users who did shut down their PCs when not in use had to sit through a long boot process to get their PC back on.  However, many enterprises and home users just leave their PCs on 7x24.  While this is nice to be able to have the PC ready to respond when you sit down at it, powering a PC overnight just so it can be available to you when you sit down at 8AM is a pretty expensive approach.

In order to achieve the second objective -- reducing power usage -- we made changes to dramatically improve idle power consumption.  The dream was to reduce power consumption by powering key components down more frequently and leaving them powered down for longer periods while still maintaining a great user experience.  For example, while Windows XP did a great job of lowering CPU speed and voltage whenever possible, in Windows Vista we added enhanced capabilities to use power more efficiently on multi-core systems.  And we have created new APIs so that driver and application developers can get notifications about the power scheme being used on the system and then adapt their behavior for the power scheme.  Finally, all of the power management configurations parameters can be controlled by the IT department (on a PC-by-PC basis) using Group Policy if they want to tweak the defaults, making corporate deployment of these features easily manageable.

How much power is used and how great the experience is depends on all the equipment and software attached to your system.  So, we created some great tools including the Power Event Monitoring tool to help develop and test applications, as well as some great content for developers on power management.  We have also made the power management system extensible, so that instead of writing separate power management solutions, third parties including computer manufacturers can closely integrate their unique features and capabilities with Windows.

If you look at the impact in power-savings terms of the Windows Vista design, it is pretty amazing.  (BTW, there is a great white paper on this on Microsoft.com, but I will net it out for you here).  A typical Pentium 4 PC with a 17" LCD monitor draws about 102.6 watts of power (think about a 100 watt light bulb).  That same PC and display in a sleep state draws only 5.6 watts, or 97 fewer watts.  If you figure that a PC is used for active work for 10 hours a day, 5 days a week, 52 weeks per year, that is 2,600 operating hours. With 8,760 hours in a year (365*24), there are actually 6,160 potential idle hours per year.  Since sleep mode uses 97 fewer watts than full power mode, the total savings is 597 kWh per year -- and by the way, the impact is obviously even greater (760 kWh) if you use a CRT monitor since they draw more power than LCDs.

The paper uses an estimate of $0.0931 per kWh from the US Department of Energy, so for a home user with one PC, the savings amounts to $55.63/year (more if the PC is used less than 10 hours a day).  While that is great saving for a home user, think about an enterprise with 10,000 desktops where the potential cost savings would be $556,300/year -- and we haven’t even tried to estimate the HVAC savings.  With IT budgets becoming sequentially tighter year over year, it's nice to be able to have this kind of impact.  I would be remiss if I didn’t mention the fact that there is also a significant environmental impact as well.  The EPA estimates that every kWh of electricity generates 1.55 pounds carbon dioxide (CO2) emissions so each PC that moves to Windows Vista generates 926 fewer pounds of carbon dioxide or about 8% of what the EPA estimates that a typical car generates in the course of a year-- so for every 12 and a half PCs that are running with Windows Vista’s new power management capabilities, it’s like having one less car on the road. 

I strongly encourage you to use the defaults in Windows Vista.  And no need to think much anymore about different power-saving modes and terms like hibernate, sleep, etc -- just hit the symbol for "on" and "off" and let the system do the thinking and power saving for you.

power switch 

jim


Comments

  1. Posted on: April 01, 2007 at 6:26PM  

    This is all a bad joke. All I want to do is have the machine do is power OFF by itself after a period of inactivity. Hibernate is not an option (32GB of RAM) and sleep does not shut down all the drives or idle the CPU (yes, speedstep is installed). Do you know how hot a dual quad core XEON gets? I travel and all I want is to do a WOL and let it shutdown again. If I do an intentional power off, my understanding is that WOL will not work? I'll have to see if that's true but so far this whole new Power thing is, IMHO, a royal mess. MS gets an "F" on this one.

  2. Posted on: April 10, 2007 at 6:34PM  

    I can't find a solution for this anywhere, but it does appear that lots of other people are having it.  When I boot or resume my laptop, the power manager somehow tricks itself into thinking the machine is "plugged in, not charging" when in reality, it is NOT plugged in and running off the battery.  The huge problem with this is that wrong power scheme settings are used, and the machine will shut off without warning when the battery is drained.  The only way to get the power manager straightened out is to attach and disconnect the power supply.  That's weak.

  3. Posted on: April 17, 2007 at 10:33AM  

    "poweroffplease", You can change the power buttons settings in Vista by going in to the Control Panel and into the power settings applet and selecting advanced. There, you will see options for both the Start Menu power button default and the system case power button and you can change them both over to Shutdown instead of sleep or hybernate. You can even disable the Hybrid sleep state from in there!

    Hope that helps!

  4. Posted on: May 24, 2007 at 7:56AM  

    As a new Windows Vista user I am very disappointed in power management support. I own an Acer Travelmate 4002 WLMi notebook, which has a very good configuration (Pentium M 1,6 GHz, 2GB RAM, Radeon 9700 with 64MB of dedicated RAM, 80GB HDD) and has passed all test in the Vista upgrade adviser prior to install. The BIG problem is that there is no driver for the notebook battery and Vista does not accept the system as being battery enabled. NO WINDOWS MOBILITY CENTER SUPPORT! I have contacted Acer Customer Support in Hungary and in Germany, but despite the fact that the problem has been announced when RC1 was made available there is no solution to the day. Microsoft also knows about this issue, since on their Technet forum there's a discussion with Missing drivers for "Microsoft SMART Battery Subsystem" title. Several other Acer models are affected along with Benq, Toshiba and Packard Bell systems. If somebody reads this besides me PLEASE write some drivers and put them out on Windows Update because MS is loosing customers because of compatibility issues.

    have a nice day!

    PS: if MS is still offering free Vista licences to people who report bugs I certainly deserve one.

    contact me: kadar.zsolt@gmail.com

  5. Posted on: May 30, 2007 at 8:11PM  

    Can some one please explain excactly how the hibernate feature works and why it is so fast in rebooting the computer compared to a cold start?

  6. Posted on: May 31, 2007 at 1:44PM  

    I am all for easy power management and reduction of power consumption.  What I see missing in VISTA that has us considering turning OFF the power saving features is that when a user has network applications open and connected the system will still go into sleep mode.

    Even at the simplest of levels, we would like to be able to have power management enabled when a user is logged off the system but while they are logged in to operate differently.  

    Even Outlook connected to Exchange server results in authentication issues sometimes after a sleep mode resume.  It comes up and asks the user to re-enter their password so it ca reconnect to Exchange.  It also offers to the user a check box to save this password locally.  The latter is not something you want happening in a secure network environment.

    Any help of guideance would greatly be appreciated with respect to Database Applications that are connected at the time a device goes into sleep mode.

  7. Posted on: June 10, 2007 at 4:12AM  

    ditto the remarks by Cmdrdata;

    1.

    imagine this scenario:

    High performance chosen on

    notebook running Vista Ultimate, with batteries removed;

    customized plan to dim display after 1min; then disabled all settings for turning off hard disks/hybrid sleep.

    Notebook will randomly "freeze" after an extended period of time.

    2.  Changing to customized plan/setting is difficult; basically only the 3 built-in schemes are easily selectable;

    so if I wanted to switch between Never Turn off the Display, to Turn Off after 1min ->

    I'd have :

    1. left click More Power Options on the icon,

    2. left click Plugged In/OnBattery, then type either 1 repeatedly or N.

    3. then click Save Changes.

    previously -> you can just click on the power icon and select your customized scheme.

    Pray tell - how is the UI improved?

  8. Posted on: June 12, 2007 at 12:55AM  

    please, please, please go back to the drawing board and fix vista's power management. I am on a brand new HP laptop. I have fully charged my battery and put it in standby only to have my battery drained within hours. My Macbook can last weeks. I am not the only laptop user going through these issues.

  9. Posted on: June 19, 2007 at 3:29AM  

    issues i have with the power management:

    - options for pressing power button now disclude 'ask me what to do' (are you serious?)

    - screen saver works only when it wants to, apparently

    - with an external display attached, it is impossible to close laptop and have it truly 'do nothing' (it swaps entire desktop to ext display screwing up my multiple monitor desktop)

    i'm glad i still haven't activated.  XP is much more productive and there isn't anything i need to get done that can't be done there.  i'll check back in a few months.  till then the power screw ups alone are more than i needed to revert.  now i just need to remember to image the install after i've suckled all my updates during that small glimmering point in time between patched and infested with bloatware.  bah, what is the computer world coming to?  sorry guys, Vista just isn't ready to actually be used by anyone but a fanboy yet.  i need to get actual work done.

  10. Posted on: July 16, 2007 at 3:21PM  

    When I use this option, my network connection (that is to my ADSL router) is off and I have to re-initiate it (when it wants to, sometimes it takes a re-start).  I would love to use this feature, but not at that cost, tried it in several machines at the office, still the same results with a normal Belkin router :-(

Trackbacks

  1. Posted by: Craig Nicholson on December 08, 2006 at 7:39PM

    I'm a fan of Windows Vista already just from my experience with the release candidates. The product is

  2. Posted by: Bit-cycling on December 08, 2006 at 10:14PM

    In this second episode of my ongoing series entitled "Vista Notes" (wherein I expound on an interesting

  3. Posted by: The things that are better left unspoken on December 09, 2006 at 3:32AM

    Treehugger magazine has a very clear statement on Microsoft Windows XP and its "high-performance"

  4. Posted by: Rich Mercer's Blog on December 09, 2006 at 10:41AM

    I was talking with my Dad last night about the new Sleep state in Windows Vista, and returned home to

  5. Posted by: Erwyn van der Meer on December 09, 2006 at 1:20PM

    None other than Jim Allchin, the soon to retire Co-President of the Platform and Services Division at

  6. Posted by: Note di programmazione ... e non solo! on January 01, 2007 at 10:33AM
  7. Posted by: Mighell's blog on January 08, 2007 at 6:03PM

    Chi ha già provato Vista (o chi ha letto documentazioni a riguardo), sa che Windows Vista implementa

  8. Posted by: Jeff Alexander's Weblog on March 30, 2007 at 3:18AM

    Global Warming is something that has been on my mind for sometime now. One of the things that challenges

  9. Posted by: TechBlog on May 05, 2007 at 7:24PM

    The Windows Vista-bashing thread du jour says the operating system's pretty Aero interface is causing Vista to drain batteries faster than its predecessor, Windows XP. From ZDNet: Vista, while touted as having improved power management capabilities that

  10. Posted by: Jeff Alexander's Weblog on July 06, 2007 at 10:20PM

    The Live Earth Concerts just kicked off in Sydney with a great introduction by Al Gore via live satellite

  11. Posted by: Robert Hensing's Blog on August 05, 2007 at 11:26AM

    Okay it's time for another shameless 'wow - Vista rocks' type blog post. :) So I have a notebook and

  12. Posted by: Colt Kwong's Blog on September 01, 2007 at 10:07PM

    I run into a problem that my laptop cannot wake up after sleep / hibernate, I try many different settings

  13. Posted by: Colt Kwong on September 01, 2007 at 10:08PM

    I run into a problem that my laptop cannot wake up after sleep / hibernate, I try many different settings...

  14. Posted by: .NET Hacks and Tips (beta) on December 25, 2007 at 9:38PM

    I run into a problem that my laptop cannot wake up after sleep / hibernate, I try many different settings

  15. Posted by: Satisfy Me on January 16, 2008 at 3:55PM

    Off to a quick lunch, but first a posting of some of the articles in my reading pile, courtesy of del.icio.us

  16. Posted by: Leon Meijer's Weblog on May 11, 2008 at 4:59AM

    Vista won't enter Sleep Mode, how to fix it

  17. Posted by: Monitor went to sleep - Windows Vista Help Forum on March 02, 2009 at 6:29PM

    Pingback from  Monitor went to sleep - Windows Vista Help Forum