mirror of
https://github.com/AuxXxilium/arc-addons.git
synced 2024-11-23 21:50:52 +07:00
misc: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
376b1b4284
commit
215aa1dc87
@ -124,12 +124,7 @@ elif [ "${1}" = "late" ]; then
|
|||||||
modprobe acpi-cpufreq
|
modprobe acpi-cpufreq
|
||||||
# CPU performance scaling
|
# CPU performance scaling
|
||||||
if [ -f /tmpRoot/usr/lib/modules-load.d/70-cpufreq-kernel.conf ]; then
|
if [ -f /tmpRoot/usr/lib/modules-load.d/70-cpufreq-kernel.conf ]; then
|
||||||
CPUFREQ=$(ls -ltr /sys/devices/system/cpu/cpufreq/* 2>/dev/null | wc -l)
|
if [ -d /tmpRoot/sys/devices/system/cpu/cpu0/cpufreq ]; then
|
||||||
if [ ${CPUFREQ} -eq 0 ]; then
|
|
||||||
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
|
|
||||||
else
|
|
||||||
echo "CPU supports CPU Performance Scaling, enabling"
|
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
|
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/
|
cp -vf /usr/lib/modules/cpufreq_* /tmpRoot/usr/lib/modules/
|
||||||
@ -156,6 +151,10 @@ elif [ "${1}" = "late" ]; then
|
|||||||
|
|
||||||
mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants
|
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
|
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
|
||||||
fi
|
fi
|
||||||
umount /sys
|
umount /sys
|
||||||
|
Loading…
Reference in New Issue
Block a user