You are not logged in.
I'm trying to set LCD brightness in script. But unfortunately the desired command do not work.
I've grepped my VGA card number
01:05.0 VGA compatible controller: ATI Technologies Inc RS780M/RS780MN [Radeon HD 3200 Graphics]"setpci -s 01:05.0 F4.B=F0" do not change the brightness whatever value I use.
My pc is a thinkpad laptop. If there is any workaround?
Last edited by tasty_minerals (2011-10-12 20:13:37)
lenovo thinkpad EDGE 13'
Offline
try using xbacklight or echo [0-24] > /sys/class/backlight/acpi_video0/brightness as root
Offline
"echo [0-15] > /sys/class/backlight/acpi_video0/brightness" works.
Thank you
lenovo thinkpad EDGE 13'
Offline
Now could somebody help me a little bit with the script.
Bumped here
sudo echo 8 > /sys/class/backlight/acpi_video0/brightness :Permission denied
I understand that first time sudo is invoked only for echo command, how can I make it actually run the whole chain?
lenovo thinkpad EDGE 13'
Offline
I used this script binded with two keys:
#!/bin/bash
file="/sys/class/backlight/acpi_video0/brightness"
level=$(cat $file)
if [[ "$#" -eq 0 ]]; then
cat $file
elif [[ "$1" = "-" ]]; then
echo $(( level - 1 )) > $file
elif [[ "$1" = "+" ]]; then
echo $(( level + 1 )) > $file
fiBy adding the location of the script to root's $PATH, i.e $HOME/myscripts, it can be run with sudo. It accepts '+' and '-', but it can easily be changed to handle brightness [0-24] values I guess.
Last edited by roygbiv (2011-10-12 14:47:38)
Offline
I used this script binded with two keys:
#!/bin/bash file="/sys/class/backlight/acpi_video0/brightness" level=$(cat $file) if [[ "$#" -eq 0 ]]; then cat $file elif [[ "$1" = "-" ]]; then echo $(( level - 1 )) > $file elif [[ "$1" = "+" ]]; then echo $(( level + 1 )) > $file fiBy adding the location of the script to root's $PATH, i.e $HOME/myscripts, it can be run with sudo. It accepts '+' and '-', but it can easily be changed to handle brightness [0-24] values I guess.
thanks again, will try it out
lenovo thinkpad EDGE 13'
Offline