committing changes in /etc made by "/usr/bin/apt-get -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold upgrade --with-new-pkgs"
Packages with configuration changes: -raspi-config 20221018 all +raspi-config 20221214 all Package changes: -bluez-firmware 1.2-4+rpt9 all +bluez-firmware 1.2-4+rpt10 all -containerd.io 1.6.13-1 arm64 +containerd.io 1.6.14-1 arm64 -raspi-config 20221018 all +raspi-config 20221214 all
This commit is contained in:
@@ -215,6 +215,7 @@ maybe chmod 0755 'default'
|
||||
maybe chmod 0644 'default/avahi-daemon'
|
||||
maybe chmod 0644 'default/bluetooth'
|
||||
maybe chmod 0644 'default/console-setup'
|
||||
maybe chmod 0644 'default/cpu_governor'
|
||||
maybe chmod 0644 'default/crda'
|
||||
maybe chmod 0644 'default/cron'
|
||||
maybe chmod 0644 'default/dbus'
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
#
|
||||
# Set default governor on all CPU cores.
|
||||
# More info https://www.kernel.org/doc/Documentation/cpu-freq/governors.txt
|
||||
#
|
||||
# CPU_DEFAULT_GOVERNOR="ondemand"
|
||||
#
|
||||
|
||||
#
|
||||
# ondemand governor: This defines what the average CPU usage between the
|
||||
# samplings of 'sampling_rate' needs to be for the kernel to make a decision
|
||||
# on whether it should increase the frequency.
|
||||
#
|
||||
# CPU_ONDEMAND_UP_THRESHOLD=50
|
||||
#
|
||||
|
||||
#
|
||||
# ondemand governor: How often you want the kernel to look at the CPU usage
|
||||
# and to make decisions on what to do about the frequency.
|
||||
#
|
||||
# CPU_ONDEMAND_SAMPLING_RATE=100000
|
||||
#
|
||||
|
||||
#
|
||||
# ondemand governor: The rate at which the kernel makes a decision on when to
|
||||
# decrease the frequency while running at top speed
|
||||
#
|
||||
# CPU_ONDEMAND_DOWN_SAMPLING_FACTOR=50
|
||||
#
|
||||
|
||||
#
|
||||
# ondemand governor: Include Input/Output (I/O) activity into CPU activity
|
||||
# calculations when using ondemand CPU governor
|
||||
#
|
||||
# CPU_ONDEMAND_INCLUDE_IO_CALC=0
|
||||
#
|
||||
+21
-6
@@ -11,20 +11,35 @@
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
if [ -f /etc/default/cpu_governor ]; then
|
||||
. /etc/default/cpu_governor
|
||||
fi
|
||||
|
||||
CPU_DEFAULT_GOVERNOR="${CPU_DEFAULT_GOVERNOR:-ondemand}"
|
||||
CPU_ONDEMAND_UP_THRESHOLD="${CPU_ONDEMAND_UP_THRESHOLD:-50}"
|
||||
CPU_ONDEMAND_SAMPLING_RATE="${CPU_ONDEMAND_SAMPLING_RATE:-100000}"
|
||||
CPU_ONDEMAND_DOWN_SAMPLING_FACTOR="${CPU_ONDEMAND_DOWN_SAMPLING_FACTOR:-50}"
|
||||
CPU_ONDEMAND_INCLUDE_IO_CALC="${CPU_ONDEMAND_INCLUDE_IO_CALC:-0}"
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
log_daemon_msg "Checking if shift key is held down"
|
||||
if [ -x /usr/sbin/thd ] && timeout 1 thd --dump /dev/input/event* | grep -q "LEFTSHIFT\|RIGHTSHIFT"; then
|
||||
printf " Yes. Not enabling ondemand scaling governor"
|
||||
printf " Yes. Not enabling $CPU_DEFAULT_GOVERNOR scaling governor"
|
||||
log_end_msg 0
|
||||
else
|
||||
printf " No. Switching to ondemand scaling governor"
|
||||
printf " No. Switching to $CPU_DEFAULT_GOVERNOR scaling governor"
|
||||
SYS_CPUFREQ_GOVERNOR=/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
|
||||
if [ -e $SYS_CPUFREQ_GOVERNOR ]; then
|
||||
echo "ondemand" > $SYS_CPUFREQ_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
|
||||
for cpu_core in /sys/devices/system/cpu/cpu?/cpufreq/scaling_governor ; do
|
||||
echo "$CPU_DEFAULT_GOVERNOR" > $cpu_core
|
||||
done
|
||||
if [ "$CPU_DEFAULT_GOVERNOR" = "ondemand" ]; then
|
||||
echo "$CPU_ONDEMAND_UP_THRESHOLD" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
|
||||
echo "$CPU_ONDEMAND_SAMPLING_RATE" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate
|
||||
echo "$CPU_ONDEMAND_DOWN_SAMPLING_FACTOR" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
|
||||
echo "$CPU_ONDEMAND_INCLUDE_IO_CALC" > /sys/devices/system/cpu/cpufreq/ondemand/io_is_busy
|
||||
fi
|
||||
fi
|
||||
log_end_msg 0
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user