mirror of
https://github.com/AuxXxilium/arc-addons.git
synced 2024-11-23 21:50:52 +07:00
cpufreqscaling: update
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
ed887db2bb
commit
30ce161df4
@ -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
|
||||
|
@ -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 <<EOF
|
||||
DELETE FROM task WHERE task_name LIKE 'Rescaler';
|
||||
INSERT INTO task VALUES('Rescaler', '', 'bootup', '', 0, 0, 0, 0, '', 0, '/usr/sbin/rescaler.sh "${2}"', 'script', '{}', '', '', '{}', '{}');
|
||||
INSERT INTO task VALUES('Rescaler', '', 'bootup', '', 0, 0, 0, 0, '', 0, '/usr/sbin/rescaler.sh ${2}', 'script', '{}', '', '', '{}', '{}');
|
||||
DELETE FROM task WHERE task_name LIKE 'Unscaler';
|
||||
INSERT INTO task VALUES('Unscaler', '', 'bootup', '', 0, 0, 0, 0, '', 0, '/usr/sbin/unscaler.sh', 'script', '{}', '', '', '{}', '{}');
|
||||
EOF
|
||||
|
Loading…
Reference in New Issue
Block a user