Skip to content

Commit e9e2581

Browse files
committed
Consider ARM processors
The boost exists for asahi@M1 laptops but not on a raspberry with ARMv7.
1 parent 1b0f8bd commit e9e2581

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

provision-contest/disable-turboboost_ht

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ fi
6363

6464
DIR_INTEL=/sys/devices/system/cpu/intel_pstate
6565
DIR_AMD=/sys/devices/system/cpu/cpufreq
66+
# Same for some ARM CPUs
67+
FILE_AMD=$DIR_AMD/boost
6668
if [ -d $DIR_INTEL ]; then
6769
# now disable turbo boost
6870
FILE=$DIR_INTEL/no_turbo
@@ -75,11 +77,10 @@ if [ -d $DIR_INTEL ]; then
7577
# increase freq from powersaving to normal, but don't overclock
7678
echo 100 > $DIR_INTEL/min_perf_pct
7779
echo 100 > $DIR_INTEL/max_perf_pct
78-
elif [ -d $DIR_AMD ]; then
80+
elif [ -f $FILE_AMD ]; then
7981
# now disable boosting
80-
FILE=$DIR_AMD/boost
81-
echo -n 0 > $FILE || echo "Could not write to '$FILE', ignoring for now..."
82-
if [ $(cat $FILE) -ne 0 ]; then
82+
echo -n 0 > $FILE_AMD || echo "Could not write to '$FILE_AMD', ignoring for now..."
83+
if [ $(cat $FILE_AMD) -ne 0 ]; then
8384
echo "Error: turboboost still enabled!"
8485
exit 1
8586
fi

0 commit comments

Comments
 (0)