Thursday, October 20, 2011

Ubuntu 11.10 Brightness Controller Tip


Here is a quick workaround for that :- edit the /etc/rc.local file by typing sudo gedit /etc/rc.local in terminal comment out the exit 0 by adding # in the begining such that it looks like this :-
    #!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

#exit 0
this is necessary otherise it wont work !
after this add the following line in the file
echo 0 > /sys/class/backlight/acpi_video0/brightness
such that it looks like this :-
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

#exit 0
echo 0 > /sys/class/backlight/acpi_video0/brightness
replace 0 with the required brightness value ( ranges from 0 to 10 )
save the file and exit.
now try testing the setting by typing this command in terminal
echo 0 > /sys/class/backlight/acpi_video0/brightness
if the brightness changes to minimum , you have got it right ! reboot to see the changes.
Note :- you may have to replace acpi_video0 with your device code if you have a different one ( its mostly acpi_video0 ). Most of u wont need to do so.

Finally Worked For me

echo 2 > /sys/class/backlight/acpi_video0/brightness