diff --git a/cpufreqscaling/all/usr/sbin/scaling.sh b/cpufreqscaling/all/usr/sbin/scaling.sh index df747a6..56b7c1e 100755 --- a/cpufreqscaling/all/usr/sbin/scaling.sh +++ b/cpufreqscaling/all/usr/sbin/scaling.sh @@ -17,7 +17,7 @@ error=0 # Load the correct cpufreq module if [ "${1}" = "ondemand" ] || [ "${1}" = "conservative" ]; then if [ -f "/usr/lib/modules/cpufreq_${1}.ko" ]; then - modprobe cpufreq_${1} + insmod /usr/lib/modules/cpufreq_${1}.ko echo "CPUFreqScaling: cpufreq_${1} loaded" else echo "CPUFreqScaling: cpufreq_${1} not found" @@ -33,7 +33,7 @@ for i in $(seq 0 ${cpucorecount}); do echo "${1}" >/sys/devices/system/cpu/cpu${i}/cpufreq/scaling_governor fi done -sleep 10 +sleep 5 # Check if the governor is set correctly for i in $(seq 0 ${cpucorecount}); do governor=$(cat /sys/devices/system/cpu/cpu${i}/cpufreq/scaling_governor) diff --git a/cpufreqscaling/install.sh b/cpufreqscaling/install.sh index 663ccc4..068b89e 100755 --- a/cpufreqscaling/install.sh +++ b/cpufreqscaling/install.sh @@ -14,7 +14,7 @@ if [ "${1}" = "late" ]; then cp -vf /usr/sbin/scaling.sh /tmpRoot/usr/sbin/scaling.sh [ ! -f "/tmpRoot/usr/bin/echo" ] && cp -vf /usr/bin/echo /tmpRoot/usr/bin/echo || true cp -f /usr/lib/modules/acpi_cpufreq.ko /tmpRoot/usr/lib/modules/acpi_cpufreq.ko - [ "${2}" != "schedutil" ] && cp -vf /usr/lib/modules/cpufreq_${2}.ko /tmpRoot/usr/lib/modules/cpufreq_${2}.ko && insmod cpufreq_${2} || true + [ "${2}" != "schedutil" ] && cp -vf /usr/lib/modules/cpufreq_${2}.ko /tmpRoot/usr/lib/modules/cpufreq_${2}.ko && modprobe cpufreq_${2} || true mkdir -p "/tmpRoot/usr/lib/systemd/system" DEST="/tmpRoot/usr/lib/systemd/system/cpufreqscaling.service" cat <${DEST}