Posted by: kurtsh | April 27, 2007

INFO: ‘Sleep’ in Windows Vista for laptop users… and why it rules.

Recently, How-To Geek posted an article about disabling Hybrid Sleep mode for laptop users.  This basically just echoes the sentiments of Jim Allchin in his article about Windows Vista Power Management on the Windows Vista blog… that Hybrid Sleep exists for desktop PCs and not for laptop users.

Jim Allchin on Windows Vista Power Management
http://windowsvistablog.com/blogs/windowsvista/archive/2006/12/08/windows-vista-power-management.aspx 

WHAT IS "SLEEP"?  (Versus "STANDBY")
One of my personal favorite improvments to Windows Vista is "Sleep" which is a great way to rapidly power down a machine within seconds and enabling the machine to be woken up almost instantaneously, almost as if the display was just powered down but the computer had been running all the time.

Windows Vista’s behavior is in great contrast to how this ‘power-saving mode’ worked with Windows XP. 

With Windows XP, there was a feature called "Standby" which essentially put a machine into a "ACPI standard S3 Sleep State".  (ACPI’s sleep state is a hardware condition and should not be confused with Windows Vista’s Sleep function.)  A common complaint about "Standby" however was that for many people it took forever for their Windows PC to go into Standby resulting in that embarrassment of not being able to ‘turn off all portable electronic devices’ when the paranoid flight attendants say so.  For some, it would often simply refuse to go into Standby altogether and you’d end up with a machine that had to either be hard-shutdown… or simply left on.

WHY DIDN’T "STANDBY" WORK?
The problem is explained in short on Raymond Chen’s site and it has to do with, once again, the trust that Microsoft has placed in application developers to create software that behaves properly when the user tells the computer to go to Standby mode.  Essentially, in Windows XP it was possible for all the running applications to take their sweet ol’ time cleaning up their state in memory, save content to disk, paint its toenails, watch paint dry, etc.  The end result was a verrrrrrry slow transition to "Standby" for many users.

In fact, worse yet, the application would tell Windows, "No. I won’t go to sleep. I’m too important and have to run so you just go and tell the user that he can stick it."  And rather than risk going afoul of the application and it’s developer’s wishes, succumbed and told the user, "There are applications that are preventing the computer from going into Standby," frustrating the user and the end result is usually them cursing Microsoft for their crappy software.

WHAT’S CHANGED IN WINDOWS VISTA?
Folks – this was one of the many areas that Windows Vista is radically different from Windows XP:  We completely redesigned how Power Management works from top to bottom.

To quote Jim Allchin, 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.  In other words, we used to give developers the power to ‘veto’ the PC’s state transition to ‘Standby’… but not any more.  They’ve lost that right in Windows Vista. (And not every developer is happy about that)

Basically, there’s a new sheriff in town:  His name is Windows Vista and he’s tired of his ancestors historically getting pissed on because of other 3rd parties making his family look bad.

OKAY.  SO IT’S FASTER.  IS THAT IT?
Oh heck no.  The main reason I love the new Power Management functionality in Windows Vista is because it’s smart.  In addition to making ‘Sleep’/’Standby’ work:

  1. PERIPHERAL POWER CONTROL
    It’s highly configurable for the user to determine what components & peripherals to turn off to save power while on battery.
  2. BATTERY LIFE INDICATOR ACCURACY
    The battery meter is accurate with excellent estimations on battery life.
  3. HIBERNATE DURING SLEEP

…aaaaaaannnnd is this last bullet, "Hibernate during sleep" that no one seems to talk about, but is an incredibly useful facility in Windows Vista for the majority of laptop users that travel around quite a bit and use "Sleep"/"Standby" functionality a lot.

HIBERNATE DURING SLEEP
Have you ever been travelling, and had to quickly "standby" your Windows XP computer, frantically shove it into your laptop bag (because the thing was taking too damned long to change state), and forget about it?  Here are the 4 outcomes of this situation as I’ve experienced them:

  • ALL GOOD
    Windows XP ‘Standby’ worked as advertised.  The PC eventually went to a low power state and allowed you to continue where you last left off once you got to you destination.
  • NEVER STOODBY
    Windows XP was prevented from going to ‘standby’ because of an application, service, or process that ‘vetoed’ the ‘standby’ instruction to change to a low power state resulting in the machine continuing to run while in your laptop bag, effectively chewing up your battery.
  • WENT TO STANDBY, THEN WOKE UP
    Windows XP did in fact go to ‘standby’ then was woken up for some reason, again, chewing up the battery power until it was used up.
  • CHANGED TO STANDBY AND YOU FORGOT ABOUT IT
    Ah… the most common scenario:  The machine went to ‘standby’, you forgot about it, and over two days, the battery drained itself completely.  CRAP.  In this last scenario, you really have no one to blame but yourself.

Windows Vista to the rescue!  If you go to "sleep"/low-power usage state, then forget about the fact that your PC is slowly eating juice from your battery, within 20 minutes (the default) Windows Vista will wake up, put your PC into HIBERNATE state – effectively saving everything in memory on disk, then shutting down the PC completely.

This saves your hide when you ‘forget’ that you left your PC in a trickle-charge state.  Instead of leeching all the power out of your battery, Windows Vista halts all power usage on the hardware long before the laptop completely runs out of power and ensures that you’re going to have a good amount of juice available once you decide to turn your computer back on.

NOTE:  To those of you who don’t think this is a big deal, you’ve obviously never been in sales.  I mean sh-t happens no matter how thorough a salesperson you are.  You put your laptop to sleep while landing on a plane, and exhausted you forget you left your laptop on (even in a low power state) and you end up having dinner and drinks with a client that night.
…the next day, you flip your laptop open and you hook it up to a projector in boardroom.  You realize your laptop doesn’t have enough juice to do the whole presentation because of your forgetfulness the night before so you have to break out your power supply… except that the power cable won’t stretch far enough to the wall or the power strip so you end up tap dancing, asking people for an extra power strip or extension cable, wishing that someone would get off their butts and invent "wireless power".


Categories

%d bloggers like this: