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: August 19, 2007 at 1:08AM  

    This guy has the same problem as I do with Vista

    http://www.pcmag.com/article2/0,1895,2171472,00.asp

  2. Posted on: October 04, 2007 at 12:44PM  

    Vista power management is the biggest joke I've seen. I'd like to see an update to this post as clearly there are problems and it frustrates me to see that they aren't acknowledged.

    I completely agree with richiec's comment. Macbooks can last for weeks in sleep.

    I have a brand new Sony Vaio G-11 which is supposed to last for 9 hours - but this is undermined by Vista's poor power management. It  can't even last a day in sleep.

    Microsoft - How are you going to fix?

  3. Posted on: October 04, 2007 at 1:12PM  

    hgld: out of curiosity, have you tried the recently released patches that address power management issues?

    Check out: http://support.microsoft.com/kb/941649

  4. Posted on: October 26, 2007 at 8:54PM  

    I need to buy a Vista.

    http://www.rechargeable-battery.us

  5. Posted on: November 01, 2007 at 4:25PM  

    I have Vista on the new Dell XPS M1330 and one thing I dislike about Vista is how the Power Management handles this situation.  I have my power settings set to stay on when I close the lid and the power cord is plugged in and to Sleep when I close the lid and it is running on the battery. So sometimes when I am getting ready to head off to class and I have my laptop on my desk plugged in and turned on, then I close the lid, so it stays on, then I unplug the laptop.  Now here's what happens I put the laptop in my bag thinking it is "sleep." However when I get to class I open the lid and the laptop is HOT! and its still on, because it isn't programmed to switch to the selected behavior of closed lid-on battery when the lid is already closed.  I wish MS would really fix this. I just don't think about doing this in any particular order especially when I am in a big hurry.

  6. Posted on: November 07, 2007 at 6:11PM  

    my name says it all, shame i had to get my new laptop with vista on it, how do i downgrade to xp

    main point, when i switch off my laptop , i want it to be off how do i do this, i do not want it to sleep or to hibernate

    will ahve to find a forum that explains how i can  extend my screen from xp laptop to vista laptop, and no , i dont want to do it vice versa for several reasons

  7. Posted on: November 17, 2007 at 8:51AM  

    Vista has a nice feature called "Help and Support" that you can access from the start menu.  I typed my query:  power off button

    The FIRST result said the following:

    <BEGIN RESULT>

    Change the function of the Power button on a mobile PC

    By default, pressing the power button on a mobile PC turns it off. Alternately, you can choose to put your mobile PC to sleep or put it into hibernation when you press the power button. You can apply the same setting to all of your power plans or you can apply different settings to individual plans.

    To apply the same setting to all plans

    Click to open Power Options.

    On the Select a power plan page, click Choose what the power button does.

    On the Define power buttons and turn on password protection page, next to When I press the power button, choose what you want your mobile PC to do when you press the power button, both for when your mobile PC is running on battery and when it is plugged in.

    Click Save changes.

    To apply a setting to a specific plan

    Click to open Power Options.

    On the Select a power plan page, click Change plan settings for the plan that you want to change.

    On the Change settings for the plan page, click Change advanced power settings.

    On the Advanced settings tab, expand Power buttons and lid, expand Power button action, and then choose what you want your mobile PC to do when you press the power button, both for when your mobile PC is running on battery and when it is plugged in.

    Click OK.

    See Also

    Change what happens when you close your mobile PC lid

    When my computer wakes, do not require a password to unlock it

    Change, create, or delete a power plan (scheme)

    Power plans: frequently asked questions

    </END RESULT>

    How can it get any better?  The very first result in Help told me how to solve your "problem" with the power button.  The defaults can't make EVERYONE happy, but if you spend 20 seconds in the Help feature the answer is clear.  The power plans are fully customizable.

    (There's a common saying regarding reading the manual that I'll refrain from posting here.)

  8. Posted on: March 24, 2008 at 4:43PM  

    Jim,

    I recently went to Vista on my laptop, and have constantly had a "plugged in, not charging" notification for my battery state.

    Is there a white paper/faq/blog some where which stipulates the triggers for Vista to charge a laptop battery?  Even with a completely drained battery, the battery does not charge.  

    Thank you.

  9. Posted on: April 09, 2008 at 7:16AM  

    Saving energy is great and all, but as for me, this feature kills me, for me, I want my computer to turn off the screen, but it's actualy 'on'. Because once I set for my screen to turn 'off' at a set amount of time, it cuts off connection to the internet, meaning the system is suspended until the mouse is moved. Right now, I need something which turns off the screen making it dark, yet does not terminate internet connection, this goes 'closing lid' as well.

    What I really want is a feature where I can control what 'on' and 'off' does.

  10. Posted on: September 04, 2008 at 10:53PM  

    Is this related to the hard disk parking its head after 6 seconds of idling? It makes a clicking noise quite annoying. As there are many 6-second periods of time idling during normal use, it sometimes clicks 2 or 3 times per minute. Is this normal?

    Thanks in advance for your answers.

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 &quot;high-performance&quot;

  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