rickysarraf/laptop-mode-tools — pull request #39 by tivek (2014-11-18 01:42:16+00:00)
Title: Add support for intel_pstate internal governors "performance" and "powersave".

In the current version of laptop-mode-tools, the intel_pstate module is responsible for power management of CPUs governed by the intel_pstate scaling driver. However, even though the intel_pstate module can control the min and max frequency as well as the turbo flag, it does not support the two internal intel_pstate governors, performance and powersave. (Note: these are not the classic performance and powersave governors, but two specialized scaling algorithms used internally by the intel_pstate driver.)

This patch adds three new configuration variables for the intel_pstate module: NOLM_AC_INTEL_PSTATE_GOVERNOR, LM_AC_INTEL_PSTATE_GOVERNOR, and BATT_INTEL_PSTATE_GOVERNOR which can contain two possible values, "performance" or "powersave".

Patch tested on Arch Linux. With default configuration
* on AC power:
```
# cpupower frequency-info
...
current policy: frequency should be within 1.20 GHz and 3.20 GHz.
The governor "performance" may decide which speed to use
within this range.
...
```
* on battery:
```
# cpupower frequency-info
...
current policy: frequency should be within 1.20 GHz and 3.20 GHz.
The governor "powersave" may decide which speed to use
within this range.
...
```