Integrating apps with modern standby

Most apps that are built for Windows do not need any additional support to run in a modern standby system. Microsoft Store apps are already designed to separate background activity from the interactive pieces of the app by using background tasks. Many Microsoft Store apps use background tasks to update their live tile, generate toast or notifications, and sync data with the cloud. These same background tasks can run during modern standby.

Desktop applications are automatically paused by the Desktop Activity Monitor (DAM) after the system enters standby. The DAM suppresses desktop application execution in much the same way as the Sleep (S3) system power state in systems that support the traditional ACPI S3 and S4 states. Any differences between modern standby and S3 are largely transparent to desktop applications. These applications require no modification or update to ensure that they keep running after the system exits standby.

The following sections describe the effect of modern standby on the execution of Microsoft Store apps, desktop applications, and system services.

Microsoft Store apps

Microsoft Store apps can create background tasks by using a specific set of WinRT APIs that allow the task to execute on a regular schedule or in response to an incoming network event. (WinRT is the Windows Runtime API surface and is distinct from Windows RT, which is the version of Windows that runs on the Arm processor architecture.) The WinRT APIs for background tasks allow the app's runtime to be carefully managed by Windows to prevent excessive battery drain.

A common use of background tasks is to update the content of tiles on the Start page in response to network events. In a modern standby system, the user sees the updated tile as soon as the system turns on; that's because the background task ran during modern standby.

Note that background tasks may be paused or throttled during Modern Standby on DC power unless the app has been set as always allowed to run in the background (in Settings > System > Battery > Battery usage per app > Choose when this app can run in the background).

Apps can also use timer-triggered background tasks to periodically check for new app-specific content during modern standby. Note that timer-triggered background tasks will only run during Modern Standby on AC power; they will not run on DC power. The execution times of an app that uses a periodic timer during modern standby are automatically coalesced with the execution times of other apps. The expiration of the timer is limited to be no more frequent than once every 15 minutes, and the app has a very limited amount of CPU time available for the update.

For more information about background tasks, including how to create and register them, see Support your app with background tasks.

Desktop applications and system services

Desktop applications typically require no extra work to integrate with modern standby.

The Desktop Activity Moderator (DAM) is the Windows component that pauses all desktop applications and throttles the runtime of third-party system services during modern standby. The purpose of the DAM is to maintain basic software compatibility with existing applications and services, but mitigate their impact on battery life during sleep.

Windows prevents desktop applications from running during any part of modern standby after the DAM phase completes. Windows allows third-party system services to execute in a throttled mode after completing the DAM phase.

Additional resources

For more information about the effect of modern standby on app execution, see the following topics: