master
Alessandro Mauri 1 year ago
parent b5eb8d5542
commit a5ebf51ebf
  1. 5
      powersave.sh

@ -4,7 +4,7 @@ GOVERNOR="powersave"
apply_lm=true
while getopts 'hopPg:' opt; do
case opt in
case $opt in
'h')
echo "Usage: powersave [-hopP] [-g governor]"
echo " -h this message"
@ -30,8 +30,8 @@ while getopts 'hopPg:' opt; do
GOVERNOR=$OPTARG
apply_lm=false
;;
'?'|*) ;;
esac
''
done
shift $((OPTIND-1))
@ -40,6 +40,7 @@ CPUS="$(nproc)"
for c in $(seq 0 $((CPUS-1)))
do
echo $GOVERNOR > /sys/devices/system/cpu/"cpu$c"/cpufreq/scaling_governor
printf '[cpu %d] %s\n' "$c" "$(cat "/sys/devices/system/cpu/cpu$c/cpufreq/scaling_governor")"
done

Loading…
Cancel
Save