mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
rpi: use systemd for cpufreq tuning
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
This commit is contained in:
parent
f27caaddc1
commit
db6ebeedbf
@ -1,13 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
||||||
# Copyright (C) 2009-2015 Stephan Raue (stephan@openelec.tv)
|
|
||||||
|
|
||||||
# Enable io_is_busy for improved sdhost performance - essentially, equivalent of force_turbo=1 but for mmc
|
|
||||||
echo 1 > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
|
|
||||||
|
|
||||||
# Configure frequency scaling properties - should improve performance a little (turbo, in most cases)
|
|
||||||
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
|
|
||||||
echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
|
|
||||||
echo 100000 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
|
|
||||||
echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
|
|
18
projects/RPi/packages/systemd/scripts/cpufreq
Executable file
18
projects/RPi/packages/systemd/scripts/cpufreq
Executable file
@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
# Copyright (C) 2009-2015 Stephan Raue (stephan@openelec.tv)
|
||||||
|
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)
|
||||||
|
|
||||||
|
SYS_CPUFREQ_GOV=$( cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor )
|
||||||
|
SYS_ONDEMAND_DIR="/sys/devices/system/cpu/cpufreq/ondemand/"
|
||||||
|
|
||||||
|
# Configure frequency scaling properties
|
||||||
|
if [ "${SYS_CPUFREQ_GOV}" = "ondemand" ]; then
|
||||||
|
echo 1 > "${SYS_ONDEMAND_DIR}/io_is_busy"
|
||||||
|
echo 50 > "${SYS_ONDEMAND_DIR}/up_threshold"
|
||||||
|
echo 100000 > "${SYS_ONDEMAND_DIR}/sampling_rate"
|
||||||
|
echo 50 > "${SYS_ONDEMAND_DIR}/sampling_down_factor"
|
||||||
|
else
|
||||||
|
echo "cpufreq: settings not found for current cpu governor." | systemd-cat -p info
|
||||||
|
fi
|
Loading…
x
Reference in New Issue
Block a user