mirror of
https://github.com/AuxXxilium/arc-addons.git
synced 2024-11-23 21:50:52 +07:00
cpufreqscaling: more rework
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
e0fe3b002d
commit
7467f158e9
@ -11,12 +11,13 @@ set -euo pipefail
|
||||
|
||||
# Load the correct cpufreq module
|
||||
cerror=0
|
||||
governor=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)
|
||||
if [ "${1}" == "ondemand" ] || [ "${1}" == "conservative" ]; then
|
||||
insmod /usr/lib/modules/cpufreq_${1}.ko || cerror=1
|
||||
fi
|
||||
# Set correct cpufreq governor to allow frequency scaling
|
||||
if [ "${governor}" != "${1}" ]; then
|
||||
echo "${1}" | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
|
||||
echo ${1} | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
|
||||
fi
|
||||
sleep 10
|
||||
# Check if the governor is set correctly
|
||||
|
Loading…
Reference in New Issue
Block a user