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:
pi
2022-12-20 08:29:16 +01:00
committed by caelebfi
parent 1f7f852f3d
commit c19c08e358
3 changed files with 57 additions and 6 deletions
+21 -6
View File
@@ -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