linuxscripts/system-bin/processor-performance
2019-05-21 22:25:51 -05:00

13 lines
642 B
Bash
Executable file

#!/usr/bin/env sh
if [ "$1" == "start" ] && [ -z "$2" ]; then
echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo
for fgovernor in /sys/devices/system/cpu/cpufreq/policy*/scaling_governor; do echo performance > "${fgovernor}"; done
exit
elif [ "$1" == "start" ] && [ "$2" == "turbo" ]; then
echo 0 > /sys/devices/system/cpu/intel_pstate/no_turbo
for fgovernor in /sys/devices/system/cpu/cpufreq/policy*/scaling_governor; do echo performance > "${fgovernor}"; done
exit
elif [ "$1" == "stop" ]; then
for fgovernor in /sys/devices/system/cpu/cpufreq/policy*/scaling_governor; do echo powersave > "${fgovernor}"; done
exit
fi