From 2d87ad2841cd01dd29d88c6819af3a3d4b3f1d37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luka=20Prin=C4=8Di=C4=8D?= Date: Sun, 11 Sep 2022 00:04:19 +0200 Subject: [PATCH] changes to togglecpu_pstates.sh --- dot_local/bin/executable_togglecpu_pstates.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dot_local/bin/executable_togglecpu_pstates.sh b/dot_local/bin/executable_togglecpu_pstates.sh index f078031..cf70d8f 100644 --- a/dot_local/bin/executable_togglecpu_pstates.sh +++ b/dot_local/bin/executable_togglecpu_pstates.sh @@ -1,4 +1,9 @@ #!/usr/bin/env bash +# +# script to change the power and cpu throttle governor +# with new intel_pstates. use at your own risk +# this also uses the 'old' cpufreq-set to ensure that +# also the 'old' system is set the same way. if [[ -z $1 ]]; then echo "error. no argument." @@ -13,8 +18,10 @@ else CPU=`echo "${i: -1}"` sudo cpufreq-set -c $CPU -g performance done + sudo x86_energy_perf_policy --turbo-enable 1 sudo x86_energy_perf_policy -a performance + watch cat /sys/devices/system/cpu/cpu[0-9]*/cpufreq/scaling_cur_freq elif [[ $1 == "default" ]] @@ -25,8 +32,10 @@ else CPU=`echo "${i: -1}"` sudo cpufreq-set -c $CPU -g powersave done + sudo x86_energy_perf_policy --turbo-enable 0 sudo x86_energy_perf_policy -a default + watch cat /sys/devices/system/cpu/cpu[0-9]*/cpufreq/scaling_cur_freq elif [[ $1 == "power" ]] @@ -40,6 +49,7 @@ else sudo x86_energy_perf_policy --turbo-enable 0 sudo x86_energy_perf_policy -a power + watch cat /sys/devices/system/cpu/cpu[0-9]*/cpufreq/scaling_cur_freq else