Add support for controlling turbo boost in the set cpu perf perc script.
This commit is contained in:
parent
40437bec04
commit
e84fd15cf2
@ -1,13 +1,20 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
# Tell speedshift whether to maximize CPU performance (100) or energy
|
# Tell speedshift whether to maximize CPU performance (100) or energy
|
||||||
# efficiency (0).
|
# efficiency (0). If set to 101 this will enable turboboost.
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
IFS=$'\n\t'
|
IFS=$'\n\t'
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
perc=$1
|
perc=$1
|
||||||
|
|
||||||
|
if [ $perc -gt 100 ]; then
|
||||||
|
echo 0 | tee /sys/devices/system/cpu/intel_pstate/no_turbo
|
||||||
|
perc=100
|
||||||
|
else
|
||||||
|
echo 1 | tee /sys/devices/system/cpu/intel_pstate/no_turbo
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $perc -lt 50 ]; then
|
if [ $perc -lt 50 ]; then
|
||||||
echo "power" | tee /sys/devices/system/cpu/cpufreq/policy*/energy_performance_preference
|
echo "power" | tee /sys/devices/system/cpu/cpufreq/policy*/energy_performance_preference
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user