Away Mode is a Windows feature that is designed for media PC scenarios as well as remote access to PCs and files in a business. Away Mode enables the a PC to appear turned off to the user, when the system is actually operational and processing background media tasks such as recording television content or streaming media to other devices. This paper documents the operation of Away Mode, configuration of power policies, and best practices for original equipment manufacturers (OEMs) that deploy systems with Away Mode functionality and independent software vendors (ISVs) that develop media software for Away Mode.
This information applies for the Windows Vista, Windows 7, and Windows 8 operating systems.
References and resources discussed here are listed at the end of this paper.
Disclaimer: This document is provided “as-is”. Information and views expressed in this document, including URL and other Internet website references, may change without notice. Some information relates to pre-released product which may be substantially modified before it’s commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here. You bear the risk of using it.
Some examples depicted herein are provided for illustration only and are fictitious. No real association or connection is intended or should be inferred.
This document does not provide you with any legal rights to any intellectual property in any Microsoft product. You may copy and use this document for your internal, reference purposes..
Updated Power Managent function references and added in corporate Away Mode scenarios
December 19, 2008
Removed ref to SetThreadExecutionState exiting Away Mode.
February 1, 2007
Away Mode Usage Scenarios 3
Away Mode and the Use of System Sleep States 4
Implementation Details 4
System Requirements 4
Entering Away Mode 4
Exiting Away Mode 5
Sleep Idle Time-Out 6
Away Mode and Windows Power Policy 6
Enabling Away Mode 6
Enabling Away Mode with Power Requests 7
Enabling Away Mode in the Windows Registry 8
How Windows Uses Away Mode 8
Windows Media Center Extenders 9
Windows Media Sharing 9
Using Away Mode in Applications 10
Designing Hardware for Away Mode 11
Changing the Hardware Power Indicator 11
Prompt for Password on Resume 12
Call to Action 13
Away Mode is a power management usage model for media PCs that lets the computer appear turned off to the user while the system continues to perform tasks that do not require user input, such as recording television and viewing Media Center Extender sessions.
This paper describes how Away Mode interacts with power policy in Windows, and provides guidelines and implementation details for software developers who want to take advantage of Away Mode support in their media applications.
Away Mode is designed to enable media PC scenarios that include background media sharing and recording. When the computer is in Away Mode, the system appears turned off to the user—the display is turned off and audio is muted. However, the PC remains in the on state and otherwise fully operational, which allows background tasks to continue.
Businesses can use Away Mode to access files or use remote desktop in PCs across their organization.
Away Mode is designed specifically for scenarios where the user is finished interacting with the computer, but the system must remain powered on to record a TV broadcast or share media files with other systems and devices. For example, the system might be providing access to Windows Media Center Extender or other consumer electronics devices and therefore must remain available even though the user is not interacting with the system at the local console. Away Mode enables a living room media PC to respond to a user’s power-on to power-off requests in the same manner as a television or set-top box that might appear turned off, but actually continues to work.
Away Mode Usage Scenarios
Many systems that run Windows are used primarily for entertainment and media scenarios. These machines might be in the living room and used with Windows Media Center to watch and record television or used to store and transmit media content to other computers and devices in the home.
These media scenarios require the Windows computer to remain on to record television content and respond to requests for media content from remote computers and devices. However, users might want the system to appear and behave as if it were turned off when they finish interacting with the PC at the primary display device.
Away Mode allows the system to appear and sound turned off while it remains on to respond to requests for remote media transmission and record television content. Away Mode enables the PC to deliver an experience that resembles that of a consumer electronics device, such as a set-top box.
Away Mode is designed specifically for:
Windows Media Center Extenders. The Windows computer must be continually available to extender devices for streaming media and recorded television content.
Windows Media Sharing. The Windows computer must be continually available to other Windows PCs and consumer electronics devices to enable remote audio playback, picture viewing, and so on.
Living room PC (LRPC). A Windows computer as part of an entertainment system must remain available to remote devices for media sharing, but appear and behave as if it were turned off when the user is finished viewing media locally.
Away Mode allows the PC to remain operational to provide access and process background tasks, but appear turned off to the user with the display turned off and audio muted.
Away Mode and the Use of System Sleep States
Be aware that Away Mode is not designed to replace other power management sleep states or to function as a workaround to existing availability solutions such as Wake-on-LAN (WoL). Because the system is left fully running, power consumption is commensurate with system usage. Away Mode should not be used to replace correct implementation and support of Sleep and other low-power system turned off states. System designers and software developers should plan to design and test to ensure that their media applications allow the use of system sleep with unattended operation.
This section provides details on how Away Mode works, lists system requirements for Away Mode, and describes usage models when Windows components can enable Away Mode.
Away Mode has no specific hardware or firmware dependencies. No Away Mode–specific ACPI object or interface is required to enable or use Away Mode. As long as Sleep is available—that is, the system supports the ACPI S3 Standby state (suspend to RAM)—Away Mode can be used.
When Away Mode is enabled , any user-initiated request to put the system into Standby sends the system into Away Mode. From the user’s perspective, Standby and Away Mode appear almost identical.
If Away Mode is enabled on the PC, any power action mapped to Sleep causes the PC to enter Away Mode. Power actions include:
System button presses mapped to Sleep:
Hardware Power button.
Hardware Sleep button.
Mobile lid switch.
Human interface device (HID) button events:
HID Sleep button (such as on a USB keyboard).
HID Power button (such as on an IR remote control).
Windows Start menu power button.
Windows Start menu Sleep option.
Programmatically, with the SetSystemPowerState or SetSuspendState API.
The following power actions do not cause the PC to enter Away Mode:
Any power action mapped to Hibernate.
Automatically entering Sleep or Hibernate because of an idle time-out.
When the PC enters Away Mode, the following actions occur:
The primary display is turned off.
Analog audio is muted.
A notification is delivered to registered drivers and applications that the system has entered Away Mode. For more information, see Registering for Away Mode Notifications later in this paper.
Exiting Away Mode
If the PC is in Away Mode, any of the following events cause the PC to exit Away Mode:
Any system button press:
Hardware Power button.
Hardware Sleep button.
Mobile lid switch.
Any HID Power or Sleep button event.
Any user input (such as keyboard or mouse input).
If a system button is pressed to exit Away Mode, the action that is associated with that button is not executed and the PC exits Away Mode. For example, if the hardware Power button is mapped to Shut Down in power policy, when the Power button is pressed, the system does not shut down but only exits Away Mode.
When the PC exits Away Mode, the following actions occur:
The primary display is turned on.
Analog audio is un-muted.
A notification is delivered to registered drivers and applications that the system has exited Away Mode. For more information, see “Registering for Away Mode Notifications” later in this paper.
Sleep Idle Time-Out
When the PC is in Away Mode, the PC might automatically enter Sleep if an idle time-out is configured in power policy. In corporate Away Mode scenarios, idle timeouts might prevent remote desktop or access to files on that PC. Consider the balance between file availability and PC power consumption. The PC automatically enters Sleep when the idle time-out expires unless the PC exits Away Mode or an application requests the system to stay awake by using a Power Request. You can find more information about setting power requests in Power Availability Request whitepaper and in the Power Management function references on MSDN.
When the PC wakes from Sleep because of a hardware Power button press, such as the Sleep or Power buttons, the display is turned on and audio is un-muted. If the PC wakes from Sleep because of a timer or WoL, the PC wakes but the screen remains turned off and audio remains muted.
Away Mode and Windows Power Policy
Windows provides robust configuration of Away Mode, including the ability to selectively allow Away Mode functionality for individual power plans. Away Mode can be enabled by an application or service by using the Power Management function or permanently through Windows Registry.
Software developers and system manufacturers must be cautious when enabling Away Mode because there is no graphical user interface for users to change the current Away Mode policy.
Enabling Away Mode
Away Mode must be explicitly allowed by the current power policy. The Allow Away Mode power setting enables the user to selectively allow Away Mode on one or more power plans or individually for AC and DC (on battery) power states.
Allow Away Mode Setting
Allows the system to use Away Mode. If this setting is disabled, Away Mode is not used even if programs request it.
Away Mode is not available.
Away Mode is available.
If the Allow Away Mode power setting is set to Enabled for the currently active power plan, then Away Mode can be enabled by an application by using the Power Management function. When Away Mode is enabled by an application and allowed by the current power plan, any Sleep power action causes the system to enter Away Mode.
If the Allow Away Mode power setting is set to disabled for the currently active power plan, the system never enters Away Mode. Any Sleep power action results in the system entering Sleep, even if an application has enabled Away Mode with the Power Management function or Away Mode is enabled in the Windows Registry.
If the system is in Away Mode and then transitions power sources to a state that does not allow Away Mode, the system immediately exits Away Mode. For example, this change may occur if Away Mode is not allowed on DC power for the active power plan and then the user switches the PC to battery power.
The Allow Away Mode power setting is hidden by default and is not shown in Power Options Advanced Settings. Therefore, to configure the Allow Away Mode power setting, use the PowerCfg tool. For more information about how to use the PowerCfg tool to configure Windows power policy, see “Windows Power Policy Configuration and Deployment” in “Resources” at the end of this paper.
You can examine the value of the Allow Away Mode power setting by using the /qh (Query Hidden settings) command. The following example shows how to view the value of the Allow Away Mode power setting in the default Power Saver power plan:
C:\>powercfg /qh SCHEME_MAX SUB_SLEEP
Power Scheme GUID: a1841308-3541-4fab-bc81-f71556f20b4a (Power saver)
After you change the power plan value, you must set the power plan active for the new Allow Away Mode setting value to be applied to the system. The following PowerCfg command reapplies the currently active power plan:
C:\>powercfg –setactive SCHEME_CURRENT
Enabling Away Mode with Power Requests
The preferred method for an application or service to set Away Mode is to usethe following power management functions:
Creates a power context object and returns a handle to it.
Removes an outstanding availability request on a particular request context object
Activates a power availability request and indicates the type of request.
Developers must be very cautious about enabling Away Mode in their applications because the user expects the system to transition to a Sleep state unless the system is being used for entertainment or file access scenarios. Away Mode is not a substitute for correct support of Sleep.
For more information about these functions see the Power Availability Request whitepaper.
Enabling Away Mode in the Windows Registry
Away Mode can be permanently enabled in Windows Registry. When Away Mode is enabled in the Registry, applications do not need to request Away Mode to be enabled by using the Power Management function.
Enabling Away Mode in the Registry is explicitly designed for scenarios where the system manufacturer has designed the PC and its preload software to behave like a set-top box. When Away Mode is enabled in the Registry, any Sleep power action causes the system to enter Away Mode.
To permanently enable Away Mode on the system, use the following registry key:
Away Mode is disabled on the system unless an application enables it by using the SetThreadExecutionState API.
Away Mode is permanently enabled on the system. Applications cannot disable Away Mode by using the SetThreadExecutionState API.
Value Not Present
Away Mode is disabled on the system unless an application enables it by using the SetThreadExecutionState API.
How Windows Uses Away Mode
Although Windows has no explicit user interface for Away Mode configuration, several Windows components can use Away Mode. Users can be prompted to enable Away Mode when they configure a Windows Media Center Extender device or by configuring media sharing in Windows Media Player.
When they configure a Windows Media Center Extender device with Windows, users can optionally enable Away Mode. In this scenario, Away Mode is enabled by the Windows Media Center Extender component on the PC. This configuration ensures that the system is always available for the extender connection and remote viewing of media content. The Setup program includes the following screen to enable Away Mode.
Windows Media Sharing
Users can enable Away Mode after configuring Media Sharing. Media Sharing is available in the Network and Sharing Center application in Control Panel.
The Media Sharing configuration window is shown in the following figure.
By default, when media sharing is enabled, the PC does not automatically enter Sleep when idle. However, this behavior can be configured, including the ability to enable Away Mode instead of preventing the Sleep idle time-out in Power Options.
To change the power management behavior of media sharing, follow these steps:
1. Click Start, click Control Panel, click System and Maintenance, and then click Power Options.
2. Select Change Plan Settings for the current power plan.
3. Select Change Advanced Power Settings.
4. Expand When Sharing Media from Multimedia Settings.
The following screen shot shows the Advanced Settings in Power Options with the configuration options for media sharing. Note that configuring a Windows Media Center Extender device to use High-Availability mode updates the default setting value to Allow the computer to enter Away Mode.
Using Away Mode in Applications
Applications for Windows, specifically media applications, should respond when the system transitions into Away Mode and pause local playback of media content. Pausing playback helps extend the experience that the system powered off when it entered Away Mode. Applications can be notified when the system enters and exits Away Mode by registering for a power notification.
The system transitions into Away Mode when an application, such as Windows Media Center, requests Away Mode to be enabled and the user places the system in the Sleep state. When the system enters Away Mode, local audio is muted and the display is turned off. This change gives the illusion to the user that the system is turned off, although the system remains on to transmit media content over the network or to record television content.
Media applications should register for the Away Mode transition notification and pause local playback of media content when the system enters Away Mode. By doing so, the application is in the same state when the system exits Away Mode. The user can then continue interacting with the system.
To register for the Away Mode notification, applications should use the RegisterPowerSettingNotification API and the GUID_SYSTEM_AWAYMODE power event GUID.
Any time that the system enters or exits Away Mode.
Possible Data Values
System is not in Away Mode.
System is in Away Mode.
Software developers should be cautious about having applications perform tasks that require high processor usage while the system is in Away Mode. A system in Away Mode might be located in a living room, bedroom, or other location where thermal and noise constraints exist. Depending on hardware design, high processor usage could cause the system to increase heat output and increase the speed and noise output of processor and system case fans.
For more information about how to design application software for Windows power management, including Away Mode, see “Application Power Management Best Practices for Windows”in “Resources.”
Designing Hardware for Away Mode
Although Windows has no explicit hardware or firmware requirements for Away Mode, system manufacturers might want to innovate their hardware designs for use with Away Mode. A common hardware feature is to change the power indicator to indicate that the system is in Away Mode. Additionally, system manufacturers may want to change the default value of the Prompt for Password on Resume power setting.
Changing the Hardware Power Indicator
Away Mode is not a new power state and the system remains in the on (ACPI S0) state when in Away Mode, so Windows does not change the state of the power indicator.
System manufacturers can build a separate device driver to enable this functionality and change the power indicator state when the system is in Away Mode. The device driver registers for the GUID_SYSTEM_AWAYMODE notification and communicates with the ACPI firmware to change the indicator state.
For more information and sample device driver code, system manufacturers should see “Away Mode DDK for Windows Vista.”
Prompt for Password on Resume
System manufacturers building PCs for Away Mode functionality should pay attention to the power policy values of the Prompt for Password on Resume power setting. If the Prompt for Password on Resume setting is enabled, Windows returns to the secure desktop when exiting Away Mode.
Prompt for Password on Resume Setting
Requires the user to enter a password at the secure desktop when the system resumes from Sleep or exiting Away Mode.
The system returns to the desktop when resuming from Sleep or exiting Away Mode.
The system returns to the secure desktop and the user must enter a password when the system resumes from Sleep or exits Away Mode.
If the PC is used primarily in the set-top box or living room PC scenario, the system manufacturer should consider changing the default value of the Prompt for Password on Resume Setting to Disabled. This setting lets the user return immediately to the media experience (such as Windows Media Center) when exiting Away Mode.
Many systems that run Windows are used primarily for entertainment and media scenarios. Away Mode is a technology that allows the system to appear and sound turned off while it remains on and available to share media to other devices. Away Mode is not a new system power state or a replacement for correct support of Sleep or WoL.
Away Mode can be configured in Windows power policy and may be enabled by applications by using the Power management functions. Windows takes advantage of Away Mode when it is used with Windows Media Center Extender devices or with Windows Media Sharing.
Call to Action
System manufacturers should use the information in this paper to:
Understand the operation of Away Mode and its configuration in Windows power policy.
Test correct operation of their systems with Away Mode.
Optionally, create a device driver to cooperate with ACPI firmware to change the hardware power indicator when the system is in Away Mode.
Software developers should use the information in this paper to:
Understand how to enable Away Mode by using the Power Availability Request functions.
Register for Away Mode notifications and pause playback of media when the system enters Away Mode, and resume media playback when the system exits Away Mode.
Windows Vista Power Policy Configuration and Deployment