From 6e8946e3bafd3365bb17bc038dc307718af1e79b Mon Sep 17 00:00:00 2001 From: Alessandro Mauri Date: Sat, 7 Oct 2023 12:44:18 +0200 Subject: [PATCH] bruh --- powersave.sh | 8 +++++++- undervolt.sh | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/powersave.sh b/powersave.sh index 7f44997..16cbc41 100644 --- a/powersave.sh +++ b/powersave.sh @@ -35,7 +35,13 @@ while getopts 'hopPg:' opt; do done shift $((OPTIND-1)) -echo "$GOVERNOR" > /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor +# set governor +CPUS="$(nproc)" +for c in $(seq 0 $((CPUS-1))) +do + echo $GOVERNOR > /sys/devices/system/cpu/"cpu$c"/cpufreq/scaling_governor +done + if $apply_lm; then # "5 is a sensible time" https://www.kernel.org/doc/Documentation/laptops/laptop-mode.txt diff --git a/undervolt.sh b/undervolt.sh index 1179183..c904782 100644 --- a/undervolt.sh +++ b/undervolt.sh @@ -3,7 +3,6 @@ # TODO: check for root privileges # TODO: check if all the required tools are available -CPUS="$(nproc)" # Out your wanted values here CORE_SPEED_HZ_P0=2300000 # 2.30GHz slightly over the base (2.10GHz) CORE_SPEED_HZ_P1=1450000 # 1.45GHz @@ -25,6 +24,7 @@ MAX_TEMP_C=85 # enable cpu frequency boost if available echo 1 > /sys/devices/system/cpu/cpufreq/boost + # # set voltage # ===========