Windows Energy Saver/Power Saver Background App Categories - any info

Edit5.
TLDR its specified in the Application Manifest and only affects UWP, not Clarion apps.

Edit0.
In this link:
Battery Saver | Microsoft Learn

The battery saver feature exists on Windows 11 24H1 (and earlier) and on Windows 10. It is replaced by Energy Saver on Windows 11 24H2 and later.

It says

Apps running in the background are blocked. Users can allow specific individual apps to run while in battery saver mode. Certain categories of apps continue to run. For example, VOIP apps are not blocked.

Does anyone know what the categories of apps are?

I cant find any info online about the categories or whats needed to state an app needs to be in a category. I didnt know if its a manifest setting for example or some other method which MS has introduced.

I’m also assuming this doesnt affect services.

TIA

Edit1.
This is a registry key pertaining to Energy Saver, but havent found any app specific settings in its subkeys.

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\de830923-a562-41af-a086-e3a2c6bad2da

User instructions to adjust the power setting for a background app.
Manage background activity for apps in Windows - Microsoft Support

Edit2.
Reveals the most used hidden power settings in Windows 10. The value Attributes=2 means reveal, where value of 1 or 0 means hide from Power Options. Good Tweaking! · GitHub

Edit3.
SYSTEM_POWER_STATUS (winbase.h) - Win32 apps | Microsoft Learn

Edit4. In case your monitor is poor or the cataracts are developing.
So in Win11 (mine is 23H2), Settings, System, Power & Battery, Battery Usage.
You see’ll an overall power usage graph for 24hrs, below that is a list of apps sorted by their power consumption. On the right of each entry after the %, there are three dots. If you hover your mouse over the dots, where you can change the battery usage settings because not all apps allow it, a button will appear. For the apps where the power usage cant be set, no button will appear.

Clicking the button, pops up a tooltip of sorts which is actually a popup menu with the text “Manage Background Activity”, click on the tooltip/button and it will take you Settings, Apps, Installed Apps, then the name of the app in question.

First option is titled Background apps permissions.
Prompt text: Let this app run in the background
Drop down list box showing 3 options, Always, Power Optimized (recommended), Never.

This is where an app can be kept alive when the battery/energy saver mode is switched on.

If you go Settings, Apps, Installed Apps. irrespective of the view (List, Grid, Tile), on the right are 3 dots, clicking that will present options. The app which shows Advanced Options and clicking it will take you to where you can specify the Background apps permission setting mentioned above.

AV1 Video Extension is one such “app” which has that background apps permission. Calculator is another.

The Registry Setting changes depending on what is chosen for the Background apps permission drop down.

Never option
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications\Microsoft.AV1VideoExtension_8wekyb3d8bbwe]
“DisabledByUser”=dword:00000001
“Disabled”=dword:00000001
“IgnoreBatterySaver”=dword:00000000
“SleepDisabled”=dword:00000001
“SleepIgnoreBatterySaver”=dword:00000000
“DisabledBySystem”=dword:00000000

Always option
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications\Microsoft.AV1VideoExtension_8wekyb3d8bbwe]
“DisabledByUser”=dword:00000000
“Disabled”=dword:00000000
“IgnoreBatterySaver”=dword:00000001
“SleepDisabled”=dword:00000000
“SleepIgnoreBatterySaver”=dword:00000000
“DisabledBySystem”=dword:00000000

Power Optimized (aka the default setting) option
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications\Microsoft.AV1VideoExtension_8wekyb3d8bbwe]
“DisabledByUser”=dword:00000000
“Disabled”=dword:00000000
“IgnoreBatterySaver”=dword:00000000
“SleepDisabled”=dword:00000000
“SleepIgnoreBatterySaver”=dword:00000000
“DisabledBySystem”=dword:00000000

Guidance on Background Apps.
Guidelines for background tasks - UWP applications | Microsoft Learn

Declare background tasks in the application manifest - UWP applications | Microsoft Learn

No HKLM keys, just HKCU and Hkey_Users[User Account SID’s].
HKLM stores system-wide settings applicable to all users.
HKCU contains configurations specific to the currently logged-in user.
Changes made in HKCU take precedence over similar settings in HKLM

Havent tried creating a HKLM key for BackgroundAccessApplications yet to see if it will override the user specific HKCU/HKU settings.

Docs suggest not, but its Windows using the battery mode event, telling the app how to respond, in much the same way PostMessage can send WM_EndSession messages to shutdown an app, so Windows might be looking at the HKCU/HKU\[SID] to see what to send to the UWP app.

Anyway something for another day, at least its not the problem of having to override the TrustedInstaller owner of a registry key or the MS App Store C:\Program Files\WindowsApps folder with the incorrectly set bypass (Folder) Traverse Checking…
Windows registry for advanced users - Windows Server | Microsoft Learn

System Shutdown Messages - Win32 apps | Microsoft Learn
WM_ENDSESSION message (WinUser.h) - Win32 apps | Microsoft Learn
Bypass traverse checking - Windows 10 | Microsoft Learn

I’ve not used this, but I wonder if it would be of use SetThreadExecutionState function (winbase.h) - Win32 apps | Microsoft Learn

Calling SetThreadExecutionState without ES_CONTINUOUS simply resets the idle timer; to keep the display or system in the working state

I wonder which idle timer. Is it this one or something else? I only know of this GetLastInputInfo idle timer.
GetLastInputInfo function (winuser.h) - Win32 apps | Microsoft Learn

which is tied in with the tick counts.
GetTickCount function (sysinfoapi.h) - Win32 apps | Microsoft Learn

Still a handy api to know, thanks Jeff!

Edit.
From SetThreadExecutionState function (winbase.h) - Win32 apps | Microsoft Learn

To run properly on a power-managed computer, applications such as fax servers, answering machines, backup agents, and network management applications must use both ES_SYSTEM_REQUIRED and ES_CONTINUOUS when they process events. Multimedia applications, such as video players and presentation applications, must use ES_DISPLAY_REQUIRED when they display video for long periods of time without user input. Applications such as word processors, spreadsheets, browsers, and games do not need to call SetThreadExecutionState .

I wonder if this is the battery/energy saver “Category’s” that MS refer’s to in their text quoted at the top of this thread because I still havent found out any more info on these battery/energy saver “Category’s”.

From battery/energy saver docs:

Certain categories of apps continue to run. For example, VOIP apps are not blocked.

The (SetThreadExecutionState) flag also suggests its the battery/energy saver “Category’s” referred to in the battery/energy saver docs, where it states “the call will fail” hinting at a VOIP app/category, which is probably the closest I’m going to get on establishing what these battery/energy saver “Category’s” are unless I start checking various running app’s to see what flag they are using if they are using this api.

ES_USER_PRESENT
0x00000004 This value is not supported. If ES_USER_PRESENT is combined with other esFlags values, the call will fail and none of the specified states will be set.

1 Like