Created
August 11, 2019 18:44
-
-
Save AlexTMjugador/34aafe6892cd837a4ae943ea592852fc to your computer and use it in GitHub Desktop.
A script to configure the keyboard backlight and thermal control of a Sony laptop when pm-powersave is invoked. The laptop must be supported by the Linux sony-laptop driver.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
. "$PM_FUNCTIONS" | |
case "$1" in | |
true) | |
# Disable keyboard backlight, and set thermal control to silent | |
echo 0 > /sys/devices/platform/sony-laptop/kbd_backlight | |
echo silent > /sys/devices/platform/sony-laptop/thermal_control;; | |
false) | |
# Restore keyboard backlight and thermal control to defaults | |
echo 1 > /sys/devices/platform/sony-laptop/kbd_backlight | |
echo balanced > /sys/devices/platform/sony-laptop/thermal_control;; | |
help) exit 0;; | |
*) exit $NA;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment