You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
242 B

  1. #!/bin/sh
  2. set -eu
  3. case "${0%%*/}" in
  4. *_performance) governor=performance;;
  5. *_powersave) governor=powersave;;
  6. *) exit 1;;
  7. esac
  8. for f in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do
  9. sudo -- sh -c "echo $governor > '$f'"
  10. done