5

backlight powermanagement issue

view full story
linux-howto

http://forums.fedoraforum.org – Hi all, I have installed pm-utils on my LXDE F18 (pre-beta) boxen and want to reduce the backlight brightness when the power adapter is unplugged. I have created the following script: Code: #!/usr/bin/sh # /etc/pm/power.d/backlight # set backlight brightness depending on power source LEVEL_AC=10 LEVEL_BAT=8 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 (HowTos)