diff --git a/files/bin/cpu_performance b/files/bin/cpu_performance new file mode 100755 index 0000000..0e53dd0 --- /dev/null +++ b/files/bin/cpu_performance @@ -0,0 +1,12 @@ +#!/bin/sh + +set -eu +case "${0%%*/}" in + *_performance) governor=performance;; + *_powersave) governor=powersave;; + *) exit 1;; +esac + +for f in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do + sudo -- sh -c "echo $governor > '$f'" +done diff --git a/files/bin/cpu_powersave b/files/bin/cpu_powersave new file mode 120000 index 0000000..84d9762 --- /dev/null +++ b/files/bin/cpu_powersave @@ -0,0 +1 @@ +cpu_performance \ No newline at end of file