Power Policy Manager
How the Power Policy Manager (PPM) worksWith a layered approach, many power modes can be active at once, without hard-coding exceptions. Among the active power modes, system-determined hierarchies prevent power mode conflicts. The Framework The PPM breaks down power policy management by using plug-ins, layers, and modes.
A mode contains the list of which layers to activate. Multiple modes can be active at the same time. If two modes select different layers, the commands sent to the plug-ins will be based on a combination of the layers. Higher priority layers take precedence. For example, if one layer had the plug-in command, "cpu performance max", but a higher priority layer had the plug-in command, "cpu performance cool", the latter command would be sent to the cpu plug-in. Layers are transparent, which means that commands from lower priority layers that don’t overlap with commands from higher priority layers, are active. A policy layer is a grouping of plug-in commands, with an associated priority. Example layer 1 For example, a low-power layer might contain commands to:
Example layer 2 A second layer, dealing with thermal issues, might:
Which layer takes precedence? The thermal policy layer would have the highest priority, to make sure that the system doesn’t overheat.
Code example A layer file would look something like this (first release is simple text description):
Layer content An example of the 00_default policy: CPU Performance Max radio radio allowed wifi radio on display screensaver user display brightness 50 bt radio off |