Laptop users still have the backlight issue in Ubuntu 14.04. Every time Ubuntu boots up you get the maximum level of screen brightness.
Here’s a workaround by adding a startup script which will automatically adjust screen brightness when Ubuntu boots up.
To get started:
Preparation: Open your file browser and navigate to “Computer-> sys -> class -> backlight” directory. You’ll see two or three folders there:
In each folder there’s a file called actual_brightness, you can see its content (brightness value) through the thumbnail icon.
Remember them and do:
- Change your screen brightness through Fn + Arrow key.
- Check out the actual_brightness files in each folder (Re-open each folder to refresh the value).
- Does the value change?
- Remember the folder name in which the value of actual_brightness changes.
- Replace acpi_video0 in below commands with that folder name
1. Press Ctrl+Alt+T on keyboard to open the terminal. When it opens, run the command below will give you the maximum level of your laptop backlight:
Mine is 9, so I can set backlight level from 0 to 9.
2. Run the command below one by one. You’ll get the super user privilege and open the /etc/rc.local file, a script executed at the end of each multiuser runlevel, with gedit editor.
sudo -i gedit /etc/rc.local
Add the line below before the last. Change the number 0 to the brightness level you want.
echo 0 > /sys/class/backlight/acpi_video0/brightness
That’s it. Enjoy!
Thank you for this solution! Working perfectly on my laptops.
This is so useful. Each time ,I switch on my laptop ,I manually decrease the brightness. I won’t have to do that aymore. I could now extend this to automate all the tasks that I perform everytime I turn on my laptop. Thanks a lot.
different computers has different settings, on my laptop, it is not
so your solution does not apply on all computers
I use the same method explain here to change the defect value of backlight keyboard,
I fails to configure it to initiate off, but I can it set at minimum. with the following text
echo 1 > /sys/class/leds/asus::kbd_backlight/brightness
I hope you explain how to configure this in the future
hola queria comentar que utilice la misma logica de lo explicado aca para cambiar el valor del brillo del teclado por defecto, con resultados regulares, no inicia apagado, pero inicia al minimo. quizas puedas preparar una entrada con el tema ya que se repite la pregunta en los foros.
It should be
echo 0 > /sys/class/leds/asus::kbd_backlight/brightness
It worked perfectly for me. Thanks a lot!
Hi Ji m,
I read your article concerning “Save Screen Brightness Settings In Ubuntu 14.04”
I tried your solution but discovered that I didn’t have files or directory under …..
“/acpi_video0/max_brightness” does not exist on my new installation of Ubuntu 14.04.1 on my Sony Vaio VGN-AW11Z laptop.
Can you advise what I can do to resolve this?
Thanks in advance, any help would be appreciated.
I managed to fix the brightness problem on my Sony Vaio laptop by modifying the directory path from described above.
cat /sys/class/backlight/acpi_video0/max_brightness # directory “acpi_video0” doesn’t exist on Sony Vaio laptop so I changed this to….
cat /sys/class/backlight/nv_backlight/max_brightness # value is 100 for Sony Vaio
then I tried to edit the brightness file….
gedit /etc/rc.local # to edit the file
echo 30 > /sys/class/backlight/nv_backlight/brightness # used 30%
and it works for my Sony Vaio.
Thanks for your very good solution
Thank you for proposed solution, but don’t you think that it is rather ridiculous that all this steps are needed to be performed for such a common sense settings, why is it even in the UI then?
before i performed upgrade my ubuntu 14.04 it’s work, but i after upgrade it’s doesn’t work anymore, the first i check value of max_brighness on /sys/class/backlight/acpi_video/max_brighness but there’s no value anymore, even though i change my brighness level on my computer still there’s no value on /sys/class/backlight/acpi_video/max_brighness
i still remember, i performed upgrade color managed profile on my computer, my computer’s Asus A45VD 4GB RAM, my ubuntu version’s 14.04.1 LTS
do you know what happening?
In 14.10 I had to use cat /sys/class/backlight/intel_backlight/max_brightness
Thanks for the help! My actual path was “…/intel_backlight/…”.
Thank you so much. Worked liked a charm.
The fastest solution, thanks!
There are no files in the backlight folder.
When I run “cat /sys/class/backlight/acpi_video0/max_brightness” in the terminal it just comes up with “No such file or directory”
It works like a charm on Asus S301LP ;)
Hello! Thanks for your tip. It works fine with my Toshiba Satellite laptop.
PS: Where I decrease the brightness of the screen, the value in the “actual_brightness” changes in both folders. I just applied your tip on the /sys/class/backlight/acpi_video0/brightness and it works.
But for now we have sysvinit script for saving and restoring brightness level between reboots.
You can install it with the following:
sudo add-apt-repository ppa:nrbrtx/sysvinit-backlight
sudo apt-get update
sudo apt-get install sysvinit-backlight
(see https://bugs.launchpad.net/bugs/1270579 and http://askubuntu.com/a/227553).
Worked fine on my Asus laptop running 14.04LTS.
I had values in BOTH folders. acpi_video0 brightness values from 0 to 100 and intel_backlight brightness values to 4882 but I set your startup script to set the level to 82 and on reboot, that’s where the value remianed.
Hi Ji m,
I can’t really say that this works on my system. After setting the value like you said, when I reboot, the screen brightness is at its maximum level until I press the brightness_increase key, then the brightness returns to the value set in the script.
Even when I run the “cat” brightness command, it says the brightness value is what I set, until I tap the increase key then it returns to the value set.
Thanks for your help.
First, you have to find where are these files: brightness
Open a terminal (Control Alt T) and type:
find /sys -name brightness
or you can navigate to /sys/class/backlight and see every directory, searching for the brightness file.
In my system, I had to alter the file /init.d/rc.local adding the line at the bottom:
echo 350 > full/destination/to/brightness/file
In my case:
sergio@acer:/sys$ find /sys -name brightness
(There is also a link to this location in /sys/class/backlight/intel_backlight/brightness)
Edit the /etc/init.d/rc.local file:
At the bottom, I added this line:
echo 350 > /sys/class/backlight/intel_backlight/brightness
Save and reboot.
Hope it helps.
echo 7 > /sys/class/backlight/acpi_video0/brightness works fine whit my hp laptop
Awesome work Ji M :-) This worked perfectly on my ASUS laptop! Thanks very much and keep up the good work :-)
thanks a lot , it worked
Thanks a lot. It worked.
There is some problem. I set brightness and It works fine. But now brightness controller buttons(on the keyboard) do not work and brightness indicator do not shows up. I want to be able to increase the brightness when I need. Is there any way to fix this?
Worked for me too, after trying other “solutions”, thanks.
I noticed my `sys/class/backlight` folder is empty. Somewhere I read that this means that Ubuntu thinks I do have knobs to manually adjust the brightness and all that was left was to file a bug report.
I was stubborn, and following one of the comments’ tips I did find `max_brightness` and `brightness` files buried in `/sys/devices/pci0000:00/0000:00:1c.5/0000:02:00.0/leds/phy0-led`
Now, here’s the funny thing: when I do
`cat /sys/…/max_brightness` and
`cat /sys/…/brightness` I do get a 1 in both cases. Seems I was right by claiming the brightness is at it’s peak. Most of the comments around mention they get 10, 200, 30000 or any other big integer. The only non-negative integer lesser than 1 is 0, and I’m afraid setting the brightness file to 0 will black out the screen.
I tried to set the brightness file to 0.5 just to see what happens, but couldn’t do it. Even under the `sudo -i` prompt, Ubuntu won’t let me change its value.
I feel sort of lost. What to do now?
Hi Ji m, thank you most helpful.
However I used the following for Acer 5750G laptop running Ubuntu 16.04 LTS.
In my sys/class/backlight folder there is only one link folder: intel_backlight
echo 448 > /sys/class/backlight/intel_backlight/brightness
Thanks for everyone’s contribution.
This no longer works for me after updating my 14.04 using all the official sources. What could be the issue?
Comments are closed.