Since the last version of Ubuntu – 13.10 – “saucy salamander”, I’ve been experiencing several issues, apps stopped working, crashes etc. This is kind of normal stuff, with each new release of an open source distribution, there’s a period in which you have to be patient to have the communities release some patches of what got broken. To me I think the worst was screen brightness, I am still quite new to Ubuntu, I’ve been using Lubuntu for a month or so, but I had no luck with finding some GUI or terminal tool to reduce brightness using the open source amd/ati driver, and believe me it was burning my eyes, literally.
Occasionally my function keys were working and I was able to control the brightness, but not for too long, as I said it was on occasion. So, I had 2 choices – to sell my soul to the devil and install the proprietary driver, which by the way SUX, or find myself a solution.
I started looking for a solution and I can’t say it was easy. That’s why I decided to share the solution here, and save some poor user from buying new glasses.
The solution for having your screen brightness reduced, so you don’t get sun burn was pretty simple to me, hope it works for anyone who needs it.
Here what you have to do: open terminal (Ctrl + Alt +T) and execute the following command:
nano /etc/rc.local
The important part here is: nano is a text editor, we use it to edit the file, and /etc/ rc.local is a file specific for all Debian based distributions which runs at the end of all multi-user boot levels, which makes it pretty easy to put stuff in it. By opening the file we have the following output:
#!/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
As it says at the end, by the way – it does nothing.
First we need to comment the “exit0” statement and add the magic line:
echo * > /sys/class/backlight/acpi_video0/brightness
Where * is a number from 0 to 10, standing for the level of brightness you desire, in my case 8. After the changes the file should look 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 8 > /sys/class/backlight/acpi_video0/brightness
Save it, reboot your system and voila!
Hope that will help anyone, good luck 😉