Skip to content

Commit 375c74b

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

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
@@ -79,7 +79,9 @@ for cpu in $(ls -1d /sys/devices/system/cpu/cpu* | sort --version-sort) ; do
7979
done
8080

8181
DIR_INTEL=/sys/devices/system/cpu/intel_pstate
82+
# Same for M1 ARM
8283
DIR_AMD=/sys/devices/system/cpu/cpufreq
84+
FILE_AMD=$DIR_AMD/boost
8385
if [ -d $DIR_INTEL ]; then
8486
# now disable turbo boost
8587
FILE=$DIR_INTEL/no_turbo
@@ -92,11 +94,10 @@ if [ -d $DIR_INTEL ]; then
9294
# increase freq from powersaving to normal, but don't overclock
9395
echo 100 > $DIR_INTEL/min_perf_pct
9496
echo 100 > $DIR_INTEL/max_perf_pct
95-
elif [ -d $DIR_AMD ]; then
97+
elif [ -f $FILE_AMD && ]; then
9698
# now disable boosting
97-
FILE=$DIR_AMD/boost
98-
echo -n 0 > $FILE || echo "Could not write to '$FILE', ignoring for now..."
99-
if [ $(cat $FILE) -ne 0 ]; then
99+
echo -n 0 > $FILE_AMD || echo "Could not write to '$FILE_AMD', ignoring for now..."
100+
if [ $(cat $FILE_AMD) -ne 0 ]; then
100101
echo "Error: turboboost still enabled!"
101102
exit 1
102103
fi

0 commit comments

Comments
 (0)