Jerry Nixon on Windows: Windows 8: Connected Standby

Jerry Nixon's blog

Tuesday, April 17, 2012

Windows 8: Connected Standby

 

imageWindows 7 has Power Management features allowing you to impact power consumption. One feature is Standby (called S3); this puts your PC to bed – during which no code is executed. The resume time from S3 is very fast because the system has been suspended to RAM.

Windows Phone has similar systems to protect battery life. These include Power Saver Mode and Screen Off. Screen Off is Windows Phone’s most similar power management feature to Windows 7 Standby. During Screen Off, your phone is taking a nap and battery life is extended.

imageUnlike S3, however, during Windows Phone Screen Off code is executing. When resumed data in live tiles is up to date. It has continued to allow code execution. The image (above) illustrates “little blips” while the phone is in Screen Off.

Aside: It should be noted that even with code execution, Windows Phone battery life is astronomical. The purpose of Power Saver Mode is when battery levels are critically low, the phone can dial down code execution more like S3.

What about Windows 8?

The difference between Windows 7 Standby and Windows Phone Screen Off is an excellent analogy to understand the first difference between Windows 7 Standby and Windows 8 Connected Standby.

Windows 8 Connected Standby is about very ultra idle power. It delivers Power Off-like battery life while enabling applications to remain connected, fresh and up to date.

Connected Standby is tight integration between hardware and software to deliver low idle power. It allows applications to be fresh and up-to-date with current, live content with consistent, long battery life. Connected standby is about showing fresh data when you turn on the PC.

Logical States

A machine capable of Connected Standby supports three power states. State navigation is by the power button. And, the system can change states based on software logic. The states are:

  1. Screen On (normal)
  2. Connected Standby (default “off” state) It will be very rare for Connected Standby device to be shut down. The exception is an occasional reboot for software update or hardware installation.
  3. Shutdown (zero watt)

MSDN: The system is logically on even though the screen is off. Most important, the Connected Standby machine has battery life consistent with power off.

Core Principles

  1. Great Power Management
    Idle support within the chipset and software, quickly turning off when not in use. This influences the experience of users installing Windows 8 on older hardware.
  2. Spikes in activity are least possible
    ”Idle hygiene” is about doing what you have to do for a compelling user experience, but that’s all you do. Windows 8’s Metro model is “right by design” for power management.
  3. Connectivity enhancements
    Hardware devices need to support connectivity while the core chipset is primarily off. This influences the experience of users installing Windows 8 on older hardware.

Device Power Management

  1. Power management should be transparent to applications. Regardless of the specific hardware or hardware vendor’s implementation of power management services. Vendor partners can differentiate with innovation, while abstraction prevents the applications from having to be aware of it.
  2. Maintain constant connectivity. Offload technology allows you to use the lowest powered part to do the work. When you decode MPEG4, a dedicated chip offloads the workload from the CPU. Similarly, WLAN, Wi-Fi, Storage, and more in Windows 8 are offloaded.
  3. Extend idle duration. The longest Connected Standby battery life is when the core chipset remains in its deepest idle state. As a result, we get idle and stay idle. Wake up infrequently – only when important. Wake up & do less – only the necessary. Also, eliminate exit events (into Standby) and coalesce activity.

Note: Power Management features are not just for Connected Standby. Power Management helps extend battery life even when the Screen is on.

Metro Applications

imageMetro Applications are designed to manage power effectively. To Metro applications, Connected Standby means Suspended. But registered Background Tasks allow them to remain fresh. And, notifications allow them to handle incoming cloud-originated events.

Battery is King

The purpose of these controls and constraints is about battery life. The user’s experience is consistent, predictable, and excellent. Great, immersive applications with terrific battery life. Battery life! Battery life! Battery life!

Desktop Activity Moderation (DAM)

Many Microsoft developers assume Metro power management constraints are restricted to the Metro development model. They are wrong. Windows 8 knows desktop applications also impact battery life. Desktop developers rarely consider the battery and building power management features is difficult.

DAM suspends Desktop applications and services during Connected Standby just like Metro applications!

When a Windows 8 machine enters Connected Standby, metro applications are suspended. Identically (thanks to DAM), desktop applications are also suspended. This is transparent to the desktop application; the desktop software developer has nothing to watch, handle or do for DAM to work.

Need to remain alive?

If your desktop application has a scenario requiring it to be alive during Connected Standby – your solution is a Metro companion application or background activity – where the API and tooling already exist. There is no Connected Standby activity in the desktop.

Conclusion

Is it worth it? Of course! Special hardware will be certified as Connected Standby systems. These will have non-rotational boot volumes so periodic touches don’t compromise the system. These will will have lower-power DRAM and buses. These will drain less than 5% battery in 16 hours, and will deliver less than 300ms in exit latency (into Standby). And, these devices can transition to S3 when necessary.

Connected Standby allows applications to remain fresh, even in Standby

Connected Standby delivers an “off” experience insofar as battery, but an “on” experience insofar as applications through a mixture of innovative software and hardware. The user’s start and tiles remain fresh. The developer’s toolkit of background activities, push notifications, and schedule tasks let them keep applications up to date. And, the battery goes on and on…

Best of luck!

Thanks to Pat Stemen, Lead Program Manager on the Windows Core Team.