Please check the status of this specification in Launchpad before editing it. If it is Approved, contact the Assignee or another knowledgeable person before making changes.

Summary

The Power Policy Manager (PPM) is a layered, system-wide power policy framework. Most power managers assume a binary power policy. For example, they change power policies when AC power is removed, but don’t provide a way for users to override these settings. Many policy managers that do provide user choice attempt to hardcode exceptions, and do not provide a way for users to select multiple power policies.

This functional specification proposes the addition of PPM package into the UME apt repository to solve the Mobile-Internet-Device specific power policy needs.

Release Note

By adding the ppm implementation, a new mechanism for defining device power profiles will be added to the UME technology pool. For the most part the operations of the PPM will be seen by the end user, but eventually new control panel applets and/or status bar indicators could provide additional controls and/or information about the device power state.

A classic example would be a control panel applet that would provide a UI for placing the device into "Airplane Mode", which would trigger the device to turn off all radios (per federal air regulations) and also enable various low level power saving settings to enable the end-user to use their device for as long as possible.

Rationale

What is needed is a flexible power policy manager that allows users to select multiple policies, and easily modify those policies to fit their system. The system should leverage existing system power management capabilities, such as Advanced Configuration and Power Interface (ACPI). It should also allow users to write their own power management code for new hardware. Most importantly, it should be a system-wide policy manager that focuses on more than just the CPU frequency.

Use Cases

Normal System Starup

User Un-Docks Device

User Sets 'Airplane Mode'

User Starts Power Policy Aware Application

Assumptions

Design

The Framework The PPM breaks down power policy management by using plug-ins, layers, and modes.

image003.png


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.

image001.png

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

Implementation

The source tree for the ppm is available in a public git tree via: http://www.lesswatts.org/repos/projects/ppm.git/

The implementation is split into:

UI Changes

The PPM package does not present a UI, but as soon as the PPM is available in UME then a moblin-applets control panel applet will be added that allows the user to set airplane mode.

Code Changes

This is all new code.

Migration

N/A since this is all new code.

Test/Demo Plan

A functional spec for the PPM is hosted on the project home page: http://www.lesswatts.org/projects/power-policy/

Testing will focus on three main functional areas:

Testing will not explicitly cover individual device policies, but device specific policy files will be created and exercised for a handful of devices in order to meet the functional testing goals stated above.

NOTE: It is the device vendor / solution creator that will need to craft device specific policy and potentially PPM plug-ins. Since the PPM is general purpose, it is impossible to test for the infinite number of devices that might hit the market.

Outstanding Issues

This should highlight any issues that should be addressed in further specifications, and not problems with the specification itself; since any specification with problems cannot be approved.

A standard mechanism for measuring system power utilization needs to be adopted before an optimal power policy can be created. The lesswatts project is working towards this goal.

BoF agenda and discussion

N/A

See also


CategorySpec

MobileAndEmbedded/PowerPolicyManagement (last edited 2008-08-06 16:26:39 by localhost)