PowerManagement_SetSystemPowerProfile Function

Header: #include <applibs/powermanagement.h>

Sets the system power profile. The system dynamically adjusts the CPU frequency to balance power consumption and performance according to the specified Power Profile.

int PowerManagement_SetSystemPowerProfile(PowerManagement_System_PowerProfile desired_profile);

Note

Power profiles do not persist across reboots and should always be set when your application starts.

Parameters

  • PowerManagement_PowerSaver indicates that the system should prioritize power savings over performance.
  • PowerManagement_Balanced indicates that the the system should balance power savings and performance according to system load.
  • PowerManagement_HighPerformance indicates that the system should prioritize performance over power savings.

Errors

Returns -1 if an error is encountered and sets errno to the error value.

  • EACCES: access to set system power profile is not permitted as the required entry is not listed in the application manifest.
  • EINVAL: an invalid system power profile was specified for desired_profile.

Any other errno may also be specified. Such errors aren't deterministic and the same behavior might not be retained through system updates.

Return value

Returns 0 for success or -1 for failure, in which case errno will be set to the error value.

Application manifest requirements

To use PowerManagement_SetSystemPowerProfile(), your application must declare the SetPowerProfile value in the PowerControls field of the application manifest.