1
0
This repository has been archived on 2024-11-10. You can view files and clone it, but cannot push or open issues or pull requests.
Lakka-rk322x/packages/sysutils/systemd/scripts/cpufreq
Ian Leonard f27caaddc1 systemd: use a cpufreq service to configure cpu governor
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
2019-10-28 15:55:22 +00:00

18 lines
569 B
Bash
Executable File

#!/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_CPUFREQ_DIR="/sys/devices/system/cpu/cpufreq"
# Configure frequency scaling properties
if [ $SYS_CPUFREQ_GOV = "ondemand" ]; then
for policy in ${SYS_CPUFREQ_DIR}/ondemand ${SYS_CPUFREQ_DIR}/policy*/; do
if [ -e $policy/up_threshold ]; then
echo 50 > $policy/up_threshold
fi
done
fi