microsoft / microsoft/WindowsAppSDK
Feature: Add EnergySaverStatus2 API to Microsoft.Windows.System.Power.PowerManager
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 4.7k
- Forks
- 471
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 28
Description
This issue tracks the implementation of the new `EnergySaverStatus2` API in
the Windows App SDK
(`Microsoft.Windows.System.Power`), expanding the existing two-state
`EnergySaverStatus` (On/Off)
to a three-state model introduced in the Windows Germanium release (Windows11, 24H2 build).
## Background
The existing `PowerManager.EnergySaverStatus` property reports only `On` or
`Off`. Energy Saver now has three distinct states:
- **Off** – Energy Saver is disabled
- **Standard** – Energy Saver active; mild performance impact acceptable
(battery > 20%)
- **HighSavings** – Energy Saver active; maximum power savings preferred
(battery ≤ 20%)
The legacy API has a known bug: when Energy Saver is in Standard mode, it
incorrectly reports
`Off`. `EnergySaverStatus2` fixes this.
## New APIs
All APIs are under `Microsoft.Windows.System.Power`, contract version
`PowerNotificationsContract v3`.
```csharp
// New enum
public enum EnergySaverStatus2 { Unknown = 0, Off, Standard, HighSavings }
// New PowerManager members
public static EnergySaverStatus2 EnergySaverStatus2 { get; }
public static event System.EventHandler EnergySaverStatus2Changed;
public static bool IsEnergySaverStatus2Supported();
Legacy Mapping
┌────────────────────┬───────────────────────────────────────────┐
│ EnergySaverStatus2 │ Legacy EnergySaverStatus │
├────────────────────┼───────────────────────────────────────────┤
│ Off │ Off │
├────────────────────┼───────────────────────────────────────────┤
│ Standard │ Off (not distinguishable in legacy API) │
├────────────────────┼───────────────────────────────────────────┤
│ HighSavings │ On │
└────────────────────┴───────────────────────────────────────────┘
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Microsoft.Windows.System.Power.PowerManager entry point and the PowerNotificationsContract v3 API surface described here. Trace how the existing EnergySaverStatus is exposed, then implement the enum, property, change event, and support check; done means Standard is distinguishable from Off and the stated legacy mapping remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, csharp
- Domain
- api, desktop, operating-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100