mirror of
https://github.com/AuxXxilium/arc-addons.git
synced 2024-11-23 21:50:52 +07:00
misc: rework more
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
215aa1dc87
commit
1ac00194c1
@ -14,8 +14,13 @@ while true; do
|
||||
echo "schedutil" >"/sys/devices/system/cpu/cpu${CPUCORE}/cpufreq/scaling_governor"
|
||||
echo "set schedutil governor for ${PLATFORM} cpu: ${CPUCORE}"
|
||||
else
|
||||
if [ -f "/usr/lib/modules/cpufreq_ondemand" ]; then
|
||||
echo "ondemand" >"/sys/devices/system/cpu/cpu${CPUCORE}/cpufreq/scaling_governor"
|
||||
echo "set ondemand governor for ${PLATFORM} cpu: ${CPUCORE}"
|
||||
else
|
||||
echo "performance" >"/sys/devices/system/cpu/cpu${CPUCORE}/cpufreq/scaling_governor"
|
||||
echo "set performance governor for ${PLATFORM} cpu: ${CPUCORE}"
|
||||
fi
|
||||
fi
|
||||
if [ ${CPUCORE} -eq 0 ]; then
|
||||
break
|
||||
|
@ -128,6 +128,12 @@ elif [ "${1}" = "late" ]; then
|
||||
echo "CPU supports CPU Performance Scaling, enabling"
|
||||
sed -i 's/^# acpi-cpufreq/acpi-cpufreq/g' /tmpRoot/usr/lib/modules-load.d/70-cpufreq-kernel.conf
|
||||
cp -vf /usr/lib/modules/cpufreq_* /tmpRoot/usr/lib/modules/
|
||||
else
|
||||
echo "CPU does NOT support CPU Performance Scaling, disabling"
|
||||
sed -i 's/^acpi-cpufreq/# acpi-cpufreq/g' /tmpRoot/usr/lib/modules-load.d/70-cpufreq-kernel.conf
|
||||
fi
|
||||
fi
|
||||
umount /sys
|
||||
|
||||
# copy cpu governor
|
||||
echo "Installing Set CPU Governor - ${1}"
|
||||
@ -151,13 +157,6 @@ elif [ "${1}" = "late" ]; then
|
||||
|
||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
||||
ln -vsf /usr/lib/systemd/system/governor.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/governor.service
|
||||
else
|
||||
echo "CPU does NOT support CPU Performance Scaling, disabling"
|
||||
sed -i 's/^acpi-cpufreq/# acpi-cpufreq/g' /tmpRoot/usr/lib/modules-load.d/70-cpufreq-kernel.conf
|
||||
echo "CPU does NOT support CPU Performance Scaling, disabling" >/tmpRoot/usr/bin/governor.sh
|
||||
fi
|
||||
fi
|
||||
umount /sys
|
||||
|
||||
# crypto-kernel
|
||||
if [ -f /tmpRoot/usr/lib/modules-load.d/70-crypto-kernel.conf ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user