Hi,
Originally Posted by
mobody
I've installed tlp for powermanagement and it has an own startup script. Putting the original "echo 7 > ..." line there solved the proplem.
You should not do it that way. Either the next TLP update will kill your local changes or you're excluding yoursef from further updates of the TLP startup script.
Instead create the script file /etc/pm/power.d/backlight
Code:
#!/bin/sh
# /etc/pm/power.d/backlight
# set backlight brightness depending on power source
LEVEL_AC=15
LEVEL_BAT=7
BRIGHT=/sys/class/backlight/acpi_video0/brightness
case "$1" in
true) level=$LEVEL_BAT ;;
false) level=$LEVEL_AC ;;
*) exit 0 # invalid argument
esac
[ "$(cat $BRIGHT)" != "$level" ] && echo -n $level > $BRIGHT
exit 0
Make it executable:
Code:
sudo chmod 755 /etc/pm/power.d/backlight
Bookmarks