Browse Source

bin: add cpu_performance/cpu_powersave helpers to set cpu scaling_governor

Signed-off-by: Alejandro Mery <amery@geeks.cl>
master
Alejandro Mery 4 years ago
parent
commit
6a99bb2571
2 changed files with 13 additions and 0 deletions
  1. +12
    -0
      files/bin/cpu_performance
  2. +1
    -0
      files/bin/cpu_powersave

+ 12
- 0
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

+ 1
- 0
files/bin/cpu_powersave

@ -0,0 +1 @@
cpu_performance

Loading…
Cancel
Save