1 diff -urN laptop-mode-tools-1.72.2/etc/laptop-mode/conf.d/intel_perf_bias.conf laptop-mode-tools-1.72.2-perf_bias/etc/laptop-mode/conf.d/intel_perf_bias.conf
2 --- laptop-mode-tools-1.72.2/etc/laptop-mode/conf.d/intel_perf_bias.conf 1970-01-01 01:00:00.000000000 +0100
3 +++ laptop-mode-tools-1.72.2-perf_bias/etc/laptop-mode/conf.d/intel_perf_bias.conf 2018-03-21 21:39:56.484459906 +0100
6 +# Configuration file for Laptop Mode Tools module intel_perf_bias.
8 +# For more information, consult the laptop-mode.conf(8) manual page.
11 +###############################################################################
12 +# Manage Energy vs. Performance Policy via x86 Model Specific Registers
13 +# -------------------------------------------------
15 +#__COMMENT Laptop mode tools can automatically adjust your kernel CPU performance
16 +#__COMMENT vs. energy policy.
18 +#__COMMENT See x86_energy_perf_policy(8) or cpupower-set(1) for details,
19 +#__COMMENT and https://patchwork.kernel.org/patch/8439681/ for background.
21 +###############################################################################
23 +# Enable debug mode for this module
24 +# Set to 1 if you want to debug this module
28 +# Should laptop mode tools control the CPU energy policy settings?
30 +# Set to 0 to disable
31 +CONTROL_INTEL_PERF_BIAS="auto"
33 +# The range of valid numbers is 0-15,
34 +# where 0 is maximum performance and 15 is maximum energy efficiency.
36 +# balance-performance 4
41 +#On AC, Laptop Mode Tools inactive
42 +NOLM_AC_INTEL_PERF_BIAS=0 # Performance
44 +#On AC, Laptop Mode Tools active
45 +LM_AC_INTEL_PERF_BIAS=0 # Performance
48 +BATT_INTEL_PERF_BIAS=8 # Balance-power
49 diff -urN laptop-mode-tools-1.72.2/usr/share/laptop-mode-tools/modules/intel_perf_bias laptop-mode-tools-1.72.2-perf_bias/usr/share/laptop-mode-tools/modules/intel_perf_bias
50 --- laptop-mode-tools-1.72.2/usr/share/laptop-mode-tools/modules/intel_perf_bias 1970-01-01 01:00:00.000000000 +0100
51 +++ laptop-mode-tools-1.72.2-perf_bias/usr/share/laptop-mode-tools/modules/intel_perf_bias 2018-03-21 21:55:32.250744460 +0100
55 +# Laptop mode tools module that handles Intel's performance policy.
58 +X86_ENERGY_PERF_POLICY=$(which x86_energy_perf_policy 2>/dev/null)
59 +CPUPOWER=$(which cpupower 2>/dev/null)
61 +# Set perf bias value
62 +# Parameter 1: the value
63 +set_intel_perf_bias_param () {
66 + if [ -x "$X86_ENERGY_PERF_POLICY" ]; then
67 + log "VERBOSE" "Executing: '$X86_ENERGY_PERF_POLICY $1'"
68 + x86_energy_perf_policy $1
70 + elif [ -x "$CPUPOWER" ]; then
71 + log "VERBOSE" "Executing: '$CPUPOWER set -b $1'"
75 + if [ $RESULT != 0 ]; then
76 + echo "SETTING CPU PERFORMANCE POLICY FAILED"
80 +if [ x$CONTROL_INTEL_PERF_BIAS = x1 ] || [ x$ENABLE_AUTO_MODULES = x1 -a x$CONTROL_INTEL_PERF_BIAS = xauto ]; then
81 + if [ $ON_AC -eq 1 ] ; then
82 + if [ "$ACTIVATE" -eq 1 ] ; then
83 + INTEL_PERF_BIAS="$LM_AC_INTEL_PERF_BIAS"
85 + INTEL_PERF_BIAS="$NOLM_AC_INTEL_PERF_BIAS"
88 + INTEL_PERF_BIAS="$BATT_INTEL_PERF_BIAS"
90 + set_intel_perf_bias_param "$INTEL_PERF_BIAS"