Hello folks,
If you're like me, you recently installed Ubuntu Hardy Heron 8.04 and discovered that your laptops function keys are not properly adjusting the brightness. In essence, you are pressing the key combination and nothing is happening.
I have written a fix that simply replaces two script files. This may or may not work for you. Always create a backup first.
Here is what I edited within two files:
First we are going to change brightness up
Code:
sudo gedit /etc/acpi/video_brightnessup.sh
Replace everything in the file 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;
;;
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
Save and quit
Now we are going to edit brightness down
Code:
sudo gedit /etc/acpi/video_brightnessdown.sh
Replace everything in the file with the following
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
Save and quit
No reboot or logout required, simply press your function combination on your laptop to change brightness. If you're laptop is like mine, I press FN + Up/Down Arrow.
Let me know how it works. If this does nothing, it's best to restore the backup you made prior.
Post your comments in this thread, let me know how it goes.
- AaronMT
Bookmarks