Merge pull request #2684 from fewtarius/dev

LED control and scaling governor improvements.
This commit is contained in:
fewtarius 2024-01-14 22:22:50 -05:00 committed by GitHub
commit f67b3bb2c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 71 additions and 7 deletions

View file

@ -361,6 +361,18 @@ case ${1} in
set_setting led.brightness ${2}
ledcontrol $(get_setting led.color)
;;
list)
cat <<EOF
default
off
red
green
blue
teal
purple
white
EOF
;;
*)
COLOR=$(get_setting led.color)
if [ ! -z "${COLOR}" ]

View file

@ -166,6 +166,17 @@ case $1 in
ledcontrol ${COLOR} ${LEDBRIGHTNESS}
fi
;;
list)
cat <<EOF
default
off
red
green
blue
teal
purple
EOF
;;
*)
COLOR=$(get_setting led.color)
if [ ! -z "${COLOR}" ]

View file

@ -174,6 +174,17 @@ case $1 in
ledcontrol ${COLOR} ${LEDBRIGHTNESS}
fi
;;
list)
cat <<EOF
default
off
red
green
blue
teal
purple
EOF
;;
*)
COLOR=$(get_setting led.color)
if [ ! -z "${COLOR}" ]

View file

@ -144,12 +144,12 @@ case $1 in
;;
white)
off
COLOR=$(intensity 0x80 ${LEDBRIGHTNESS})
COLOR=$(intensity 0xFF ${LEDBRIGHTNESS})
ec_set ${RGB_RED} ${COLOR}
ec_set ${RGB_GREEN} ${COLOR}
ec_set ${RGB_BLUE} ${COLOR}
ec_save
set_setting led.color purple
set_setting led.color white
;;
off)
off
@ -163,6 +163,18 @@ case $1 in
set_setting led.brightness ${2}
ledcontrol $(get_setting led.color)
;;
list)
cat <<EOF
default
off
red
green
blue
teal
purple
white
EOF
;;
*)
COLOR=$(get_setting led.color)
if [ ! -z "${COLOR}" ]

View file

@ -144,12 +144,12 @@ case $1 in
;;
white)
off
COLOR=$(intensity 0x80 ${LEDBRIGHTNESS})
COLOR=$(intensity 0xFF ${LEDBRIGHTNESS})
ec_set ${RGB_RED} ${COLOR}
ec_set ${RGB_GREEN} ${COLOR}
ec_set ${RGB_BLUE} ${COLOR}
ec_save
set_setting led.color purple
set_setting led.color white
;;
off)
off
@ -163,6 +163,18 @@ case $1 in
set_setting led.brightness ${2}
ledcontrol $(get_setting led.color)
;;
list)
cat <<EOF
default
off
red
green
blue
teal
purple
white
EOF
;;
*)
COLOR=$(get_setting led.color)
if [ ! -z "${COLOR}" ]

View file

@ -20,10 +20,17 @@ else
fi
### If we don't have a default governor set, set it
### to schedutil but don't enable it.
### to schedutil if the device supports it, otherwise
### set to performance, but don't enable it.
if [ -z "$(get_setting system.cpugovernor)" ]
then
set_setting system.cpugovernor schedutil
GOVTEST="$(awk '/schedutil/ {print $1}' /sys/devices/system/cpu/cpufreq/policy0/scaling_available_governors)"
if [ -n "${GOVTEST}" ]
then
set_setting system.cpugovernor schedutil
else
set_setting system.cpugovernor performance
fi
fi
### Set the default GPU performance mode

View file

@ -172,7 +172,6 @@ syncthing.enabled=0
system.autohotkeys=1
system.automount=1
system.battery.warning=1
system.cpugovernor=schedutil
system.hostname=@DEVICENAME@
system.language=en_US
system.loglevel=none