install_cpupower.sh 398 B

123456789101112131415161718192021222324
  1. #!/bin/bash
  2. # fail if any commands fails
  3. set -e
  4. # debug log
  5. #set -x
  6. # Set superuser privileges command if not set
  7. if [[ -z $su ]]; then
  8. export su="sudo"
  9. fi
  10. $su apt update
  11. $su apt full-upgrade -y
  12. cd || return
  13. # system
  14. $su apt-get -y --fix-missing install linux-cpupowe
  15. $su cpupower frequency-info
  16. $su cpupower frequency-set -g powersave
  17. $su cpupower set -b 15
  18. $su cpupower frequency-info