Modern standby SleepStudy

Starting with Windows 8.1, a software tool, SleepStudy, became available as an inbox component in all Windows PCs that implement the modern standby power model. SleepStudy can measure modern standby performance with minimal impact. Details on the report's contents can be found below.

Watch this video to learn how to use SleepStudy to find and fix components that cause unexpected battery drain.

Tracking system activity and battery drain during modern standby can be difficult because the tracking itself can cause unnecessary activity and battery drain. For example, traditional disk-based logging has the unwanted side effect of causing excessive battery usage when the disk is activated for logging. In contrast, the SleepStudy tool is designed to avoid generating activity that could interfere with the modern standby performance that it measures.

The most detailed way to measure power consumption during modern standby is to use an instrumented system, which is a physical system that has power measurement leads connected to every major hardware subsystem of interest. However, testing to this level of detail is not practical in many cases because of engineering cost, and systems that have already been sold to customers typically cannot be tested in this way.

The SleepStudy tool provides overview information about each modern standby session. This information includes the active time, the idle time, and the power consumed. A session starts when the system enters the modern standby state, and ends when it exits this state.

SleepStudy also provides first-level information about the causes of activities that occur during each modern standby session. This feature allows for easy investigation of long-running activities.

Battery Information: Each SleepStudy report concludes with information about the system battery configuration. In addition to name and manufacturer, this information includes battery size and design capacity. The battery size and design capacity are particularly important for SleepStudy because they are taken into account when estimating modern standby battery life.

In some cases, the capacity ratio will exceed 100 percent. This is expected and will change over time as the battery chemistry changes.

For more information about running SleepStudy and interpreting the results, please reference the following videos:

Running SleepStudy

The SleepStudy tool runs from a Command Prompt window and is simple to use. SleepStudy outputs an easy-to-read HTML report.

To run SleepStudy, open a Command Prompt window as Administrator and enter the following command:

powercfg.exe /SleepStudy

In response to this command, the built-in powercfg.exe command-line tool creates an HTML file named Sleepstudy-report.html in the current working directory.

Advanced Options

By default, the SleepStudy report covers the last three days of system operation. To change the duration covered by the SleepStudy report, use the powercfg.exe tool's /duration option. With this option, you specify an additional parameter, which is the number of days (up to 28) that the SleepStudy report covers.

For example, to generate a SleepStudy report for the last seven days of system operation, open a Command Prompt window as Administrator and enter the following command:

powercfg /sleepstudy /duration 7

For more information about powercfg.exe, see Powercfg command-line options.

SleepStudy Reports supporting TShell

You can also generate SleepStudy reports on mobile images that support TShell: connect to TShell, navigate to writeable directory in data partition (eg. 'cd c:\data\')

  1. Run the following command:

    powercfg /sleepstudy /xml
  2. Copy sleepstudy-report.xml that is generated in the local directory to the host machine.

  3. Run the following command:

    powercfg /sleepstudy /transformxml <path to sleepstudy-report.xml>

Sleep study traces are automatically generated on mobile for screen off sessions longer than 10 minutes and are maintained for the last 7 days. The reports contain the last 3 days, by default, but can be extended with the '/duration' flag.

Report Details

The SleepStudy report is organized as a series of modern standby sessions. A modern standby session is defined as one instance of the screen turning off and then back on again.

For each session, an overview is provided at the top of the report with a hyperlink to a detailed section for each session in the HTML report.

The SleepStudy report also contains:

  • Static configuration information about the hardware platform, its operating system installation, and firmware version.
  • A graphical view of the usage trend over the last 72 hours.
  • A summary table of each modern standby session, which includes:
    • Session start time, end time, and duration.
    • Power source (AC or battery power).
    • Battery power consumed and average power consumption.
  • Detailed information for each modern standby session, which includes:
    • The information contained in the summary table.
    • A histogram chart of idle time.
    • The five most active components ("top offenders") in the modern standby session. The information shown for each component includes the component type, name, and device path (if applicable).
  • Information about the system battery configuration, including design capacity and cycle count.

The remainder of this topic describes a sample SleepStudy report, and explains how to interpret the report and understand the information that it contains.

System information

Every SleepStudy report begins with basic system information, which includes system name and firmware version. This information is essential because changes to the operating system, firmware, and BIOS can have significant impact on modern standby battery life.

Every SleepStudy report includes a graphical view of system usage that includes modern standby periods.

The graph is color-coded. Green, orange, and red segments correspond to low, medium, and high system activity, respectively.

The default period that the graph covers is three days.

The graph consists of dotted, solid, and no-line segments, which indicate AC power, battery power, and system-off periods, respectively. The following graph legend is included with each SleepStudy report.

Summary information

Each SleepStudy report includes a table that summarizes the modern standby sessions that are evaluated in the report.

Each row in the summary table contains information about one modern standby session. The rows in the summary table are color-coded to identify sessions that should be investigated for improvement.

The color coding for each session is based on a combination of the drain rate and the deepest runtime idle platform state (DRIPS) rate (percent low power). The color is determined by the worst performance of either drain rate or DRIPS rate, according to the following rules:

  • Red indicates at least one of the following:
    • The DRIPS rate is < 80 percent.
    • The drain rate is >= 1 percent per hour. (If the drain rate is >= 1 percent per hour, the modern standby battery life will be at most four days.)
  • Orange indicates at least one of the following:
    • The DRIPS rate is between 80 and 94 percent.
    • The drain rate is between 0.333 and 1 percent. (If the drain rate is under 0.333 percent, the platform will achieve 12+ days battery life in modern standby.)
  • Green indicates all other cases.

By design, some sessions are active (red rows). But most sessions can be expected to reflect low activity and low power (green). The color scheme is designed to make potential high-drain sessions easy to identify. You should be most concerned about long sessions (of several hours) that show high sustained battery drain—these sessions have the most impact on the battery.

SleepStudy calculates drain rate by using remaining capacity information that is provided by the platform battery and charging subsystem. The battery capacity, in milliwatt-hours, is recorded at the start and end of each SleepStudy session. The battery capacity information is provided by the platform through the ACPI _BST control method under the battery device object in the ACPI namespace.

The summary table includes the following basic information (from left to right):

  • The session number (left column) starts with one, and increments for each session that is reported during this period. The default report period covers the last three days.
  • START TIME (local time) is shown in YYYY-MM-DD HH:MM:SS format. Additional sessions on the same day do not repeat the year-month-day information.
  • DURATION, in hours:minutes:seconds, of the modern standby session. This duration time covers the approximate period between the transition to screen off and subsequent transition to screen on.
  • ENERGY CHANGE shows the number of absolute milliwatt-hours (mWh) that are consumed and the relative percentage of the battery's last full-charge capacity. A session in which no change occurs in remaining capacity is indicated by a hyphen (-), as shown in session 6 in the summary table in the preceding example.
  • ENERGY CHANGE shows the number of absolute milliwatt-hours (mWh) that are consumed and the relative percentage of the battery's last full-charge capacity. A session in which no change occurs in remaining capacity is indicated by a hyphen (-), as shown in session 6 in the summary table in the preceding example.
  • CHANGE RATE, in milliwatts, and AC (Charge) or DC (Drain) power source indicator. The change rate is calculated by dividing the ENERGY CHANGE value by the DURATION value.
  • % LOW POWER STATE TIME shows the DRIPS rate and (if applicable) hardware DRIPS as the percentage of time in which the SoC resides in the lowest power state (DRIPS). Hardware DRIPS (denoted by HW: preceding the residency percentage) is available on Intel and Qualcomm SoC-based Windows PCs only.

modern standby sessions of less than ten minutes are not tracked by the SleepStudy report. To measure modern standby performance, session duration should be greater than ten minutes. Longer periods (more than one hour) are reflective of real user experience.

Energy change is not tracked for AC sessions (indicated by the Charge keyword under CHANGE RATE). This information is captured in other reports, such as the report that the powercfg/energy command generates, because energy policies that are used when the platform runs on AC power are different from the policies that are used when the platform runs on battery (DC) power. In general, these policies are less strict and allow for different use cases. Every row in the summary table is a hyperlink to per-session details that are presented in the SleepStudy report.

Session details

A per-session details section of the report starts by repeating the session information from the summary table.

The table can show the following types of offenders:

  • Fx Device. A device that has a driver that implements support for the Windows power framework (PoFx). Typically, this type of device resides on the SoC itself.
  • Activator. A software component that can keep the system active to perform valuable work during modern standby. (In the preceding example, the name BI identifies the broker infrastructure, which is a Windows software component that coordinates background task execution.)
  • Networking. A networking subsystem device or component.
  • Processor. CPU active time that occurs outside of an activator being enabled.
  • PDC Phase. Time that is spent in the different phases of entering or exiting modern standby.
  • Other. Includes miscellaneous tracking information. For example, CPU utilization outside of an enabled activator is listed under TYPE as Other.

Each component in the Top Offenders table is color-coded by activity time. If it is over ten percent busy, the row is highlighted in red. If the component is between five and ten percent active, it is colored orange. Otherwise, the component row is highlighted in green. All rows in the preceding example are green because all five components are less than five percent active.

The preceding example session does not display any top offenders that exceed the ten percent active time, but the session itself is orange. That's because the session exceeded the expected drain rate of 0.333 percent per hour but is below one percent per hour, resulting in an orange color code for the session.

See also