From 30ce161df404aea9859b207dcbc0c2a8cc48c25f Mon Sep 17 00:00:00 2001 From: AuxXxilium Date: Thu, 20 Jun 2024 21:19:44 +0200 Subject: [PATCH] cpufreqscaling: update Signed-off-by: AuxXxilium --- cpufreqscaling/all/usr/sbin/rescaler.sh | 7 +++++-- cpufreqscaling/install.sh | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cpufreqscaling/all/usr/sbin/rescaler.sh b/cpufreqscaling/all/usr/sbin/rescaler.sh index adfa545..9c58aeb 100755 --- a/cpufreqscaling/all/usr/sbin/rescaler.sh +++ b/cpufreqscaling/all/usr/sbin/rescaler.sh @@ -5,8 +5,8 @@ set -euo pipefail rm -f /usr/sbin/stopscale -systemctl enable cpufreqscaling.service -systemctl start cpufreqscaling.service +#systemctl enable cpufreqscaling.service +#systemctl start cpufreqscaling.service # Get cpu cores count minus 1, to allow maping from 0 cpucorecount=$(cat /proc/cpuinfo | grep processor | wc -l) @@ -20,6 +20,9 @@ if [ -f "/usr/lib/modules/cpufreq_${1}" ] || [ "${1}" = "schedutil" ]; then echo "${1}" >/sys/devices/system/cpu/cpu"${i}"/cpufreq/scaling_governor done fi + if [ "${1}" = "ondemand" ] || [ "${1}" = "conservative" ]; then + modprobe cpufreq_${1} + fi else echo "No cpufreq_${1} module found" exit 1 diff --git a/cpufreqscaling/install.sh b/cpufreqscaling/install.sh index cb8372a..97657ac 100755 --- a/cpufreqscaling/install.sh +++ b/cpufreqscaling/install.sh @@ -48,7 +48,7 @@ else echo "User=root" >>${DEST} echo "Type=oneshot" >>${DEST} echo "RemainAfterExit=yes" >>${DEST} - echo "ExecStart=/usr/sbin/rescaler.sh \"${2}\"" >>${DEST} + echo "ExecStart=/usr/sbin/rescaler.sh ${2}" >>${DEST} echo >>${DEST} echo "[X-Synology]" >>${DEST} echo "Author=Virtualization Team" >>${DEST} @@ -65,7 +65,7 @@ fi export LD_LIBRARY_PATH=/tmpRoot/bin:/tmpRoot/lib /tmpRoot/bin/sqlite3 /tmpRoot/usr/syno/etc/esynoscheduler/esynoscheduler.db <