File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,9 @@ for cpu in $(ls -1d /sys/devices/system/cpu/cpu* | sort --version-sort) ; do
79
79
done
80
80
81
81
DIR_INTEL=/sys/devices/system/cpu/intel_pstate
82
+ # Same for M1 ARM
82
83
DIR_AMD=/sys/devices/system/cpu/cpufreq
84
+ FILE_AMD=$DIR_AMD /boost
83
85
if [ -d $DIR_INTEL ]; then
84
86
# now disable turbo boost
85
87
FILE=$DIR_INTEL /no_turbo
@@ -92,11 +94,10 @@ if [ -d $DIR_INTEL ]; then
92
94
# increase freq from powersaving to normal, but don't overclock
93
95
echo 100 > $DIR_INTEL /min_perf_pct
94
96
echo 100 > $DIR_INTEL /max_perf_pct
95
- elif [ -d $DIR_AMD ]; then
97
+ elif [ -f $FILE_AMD && ]; then
96
98
# 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
100
101
echo " Error: turboboost still enabled!"
101
102
exit 1
102
103
fi
You can’t perform that action at this time.
0 commit comments