Fix the Brightness up/down Button on ubuntu 8.04 running on Compaq Presario V3000
Replace the contents in the following files given by the code given below.
Replace /etc/acpi/video_brightnessup.sh with the following code
#!/bin/bash
CURRENT=$(grep "current:" /proc/acpi/video/VGA/LCD/brightness |awk '{print $2}')
case "$CURRENT" in
100)
echo -n 100 > /proc/acpi/video/VGA/LCD/brightness;
;;
92)
echo -n 100 > /proc/acpi/video/VGA/LCD/brightness;
;;
84)
echo -n 92 > /proc/acpi/video/VGA/LCD/brightness;
;;
76)
echo -n 84 > /proc/acpi/video/VGA/LCD/brightness;
;;
68)
echo -n 76 > /proc/acpi/video/VGA/LCD/brightness;
;;
60)
echo -n 68 > /proc/acpi/video/VGA/LCD/brightness;
;;
52)
echo -n 60 > /proc/acpi/video/VGA/LCD/brightness;
;;
44)
echo -n 52 > /proc/acpi/video/VGA/LCD/brightness;
;;
36)
echo -n 44 > /proc/acpi/video/VGA/LCD/brightness;
;;
28)
echo -n 36 > /proc/acpi/video/VGA/LCD/brightness;
;;
20)
echo -n 28 > /proc/acpi/video/VGA/LCD/brightness;
;;
*) #default case
echo -n 68 > /proc/acpi/video/VGA/LCD/brightness ;
;;
esac
Replace /etc/acpi/video_brightnessdown.sh with
#!/bin/bash
CURRENT=$(grep "current:" /proc/acpi/video/VGA/LCD/brightness |awk '{print $2}')
case "$CURRENT" in
100)
echo -n 92 > /proc/acpi/video/VGA/LCD/brightness;
;;
92)
echo -n 84 > /proc/acpi/video/VGA/LCD/brightness;
;;
84)
echo -n 76 > /proc/acpi/video/VGA/LCD/brightness;
;;
76)
echo -n 68 > /proc/acpi/video/VGA/LCD/brightness;
;;
68)
echo -n 60 > /proc/acpi/video/VGA/LCD/brightness;
;;
60)
echo -n 52 > /proc/acpi/video/VGA/LCD/brightness;
;;
52)
echo -n 44 > /proc/acpi/video/VGA/LCD/brightness;
;;
44)
echo -n 36 > /proc/acpi/video/VGA/LCD/brightness;
;;
36)
echo -n 28 > /proc/acpi/video/VGA/LCD/brightness;
;;
28)
echo -n 20 > /proc/acpi/video/VGA/LCD/brightness;
;;
20)
echo -n 20 > /proc/acpi/video/VGA/LCD/brightness;
;;
*) #default case
echo -n 68 > /proc/acpi/video/VGA/LCD/brightness ;
;;
esac
for other laptops
run as root
grep "levels:" /proc/acpi/video/VGA/LCD/brightness
And replace the brightness values in the files above.
:)
3 comments:
TYVM. I have a Compaq Presario V3118AU and the brightness keys just stopped working one day. This fixed the problem
I have c Compaq Presario CQ40 Taptop. I Replace the your code but not working. Can you point out what should be the changes which fix the Brightness. Thanks,
nuwan, your path to .../LCD/brightness might be different than the posters ... mine is /proc/acpi/video/GFX0/LCD/brightness for instance. Check your own in your terminal. Thank you for this.
Post a Comment