misc: rework

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium 2024-06-19 20:51:53 +02:00
parent 93ac56d351
commit 13c7c2d730

View File

@ -132,6 +132,22 @@ 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/
PLATFORM="$(/bin/get_key_value /etc.defaults/synoinfo.conf unique | cut -d"_" -f2)"
while read -r CPU; do
if [ "${PLATFORM}" == "eypc7002" ]; then
if grep -qw "schedutil" /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors; then
echo "schedutil" > /tmpRoot${CPU}/cpufreq/scaling_governor
else
echo "performance" > /tmpRoot${CPU}/cpufreq/scaling_governor
fi
else
if grep -qw "ondemand" /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors; then
echo "ondemand" > /tmpRoot${CPU}/cpufreq/scaling_governor
else
echo "performance" > /tmpRoot${CPU}/cpufreq/scaling_governor
fi
fi
done < <(ls -d /sys/devices/system/cpu/cpu[0-9]*)
fi
fi
umount /sys