changes to togglecpu_pstates.sh
parent
e1a40627b3
commit
2d87ad2841
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue