Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
User Journal

Journal DeadTOm's Journal: Laptop Brightness

My laptop is a Gateway NX560X that I bought in November of 2006. Naturally it came bundled with WinXP installed but I refused to allow it to be tainted by anything M$ and before even turning it on for the first time I popped in the Kubuntu Edgy live CD and installed Linux. With the exception of the modem, a winmodem which I've never needed to use anyway, it's always run beautifully. The only hitch I've run into was after upgrading from Gutsy to Hardy I could no longer adjust the display brightness using the function keys on the keyboard. A quick search of the Ubuntu.org forums turned up this post - http://ubuntuforums.org/showthread.php?t=767374. The poster advised to remove /etc/acpi/video_brightnessup.sh and replace it with a new file of the same name containing 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;
;;
87)
echo -n 100 > /proc/acpi/video/VGA/LCD/brightness;
;;
75)
echo -n 87 > /proc/acpi/video/VGA/LCD/brightness;
;;
62)
echo -n 75 > /proc/acpi/video/VGA/LCD/brightness;
;;
50)
echo -n 62 > /proc/acpi/video/VGA/LCD/brightness;
;;
37)
echo -n 50 > /proc/acpi/video/VGA/LCD/brightness;
;;
25)
echo -n 37 > /proc/acpi/video/VGA/LCD/brightness;
;;
12)
echo -n 25 > /proc/acpi/video/VGA/LCD/brightness;
;;
*)
echo -n 100 > /proc/acpi/video/VGA/LCD/brightness ;
;;
esac
----------------------------------------

Then do the same for /etc/acpi/video_brightnessdown.sh and replace it with this code:
----------------------------------------
#!/bin/bash
CURRENT=$(grep "current:" /proc/acpi/video/VGA/LCD/brightness |awk '{print $2}')
case "$CURRENT" in
12)
echo -n 12 > /proc/acpi/video/VGA/LCD/brightness;
;;
25)
echo -n 12 > /proc/acpi/video/VGA/LCD/brightness;
;;
37)
echo -n 25 > /proc/acpi/video/VGA/LCD/brightness;
;;
50)
echo -n 37 > /proc/acpi/video/VGA/LCD/brightness;
;;
62)
echo -n 50 > /proc/acpi/video/VGA/LCD/brightness;
;;
75)
echo -n 62 > /proc/acpi/video/VGA/LCD/brightness;
;;
87)
echo -n 75 > /proc/acpi/video/VGA/LCD/brightness;
;;
100)
echo -n 87 > /proc/acpi/video/VGA/LCD/brightness;
;;
*)
echo -n 50 > /proc/acpi/video/VGA/LCD/brightness ;
;;
esac
----------------------------------------

Then be sure to make both of these files executable and you're back in business. No logout or reboot required, it works immediately.

Thanks AaronMT!
This discussion has been archived. No new comments can be posted.

Laptop Brightness

Comments Filter:

"Gravitation cannot be held responsible for people falling in love." -- Albert Einstein

Working...