Ubuntu: Brightness setting not remembered after boot — rc.local “fix” not working



Question:

Using Lenovo X220 laptop. I installed 12.04 on it.

Every time I boot the display's brightness sets to the highest setting: maximum_brightness 15. This is way too bright and want to set it to 4.

I have spent a long time trying to fix this. Tried editing rc.local file by adding the "echo 0 >" line before exit 0. But it never works. laptop always resets to level 15 after boot. I tried everything here: Desktop doesn't remember brightness settings after a reboot

Why isn't rc.local working for me?

Does anyone know how I can edit the maximum_brightness down? Can I set a lower maximum_brightness?


Solution:1

I also am affected by this. It is a bug that the rc.local file does not execute at startup.

Here's a link to the bug report: Launchpad Bug Report


Solution:2

You need to set the script rc.local to start automatically at start up. If that doesn't work go to /sys/class/backlight/ and run the "echo 0" to the "brightness scripts" in the folders there and if your brightness changes instantly then you know where the brightness config is and just note its location so that you can modify your rc.local again.


Solution:3

Temporary fix that should work:

  1. Add this line just before exit 0 line in /etc/default/rc.local file:
    cp -f /etc/default/brightness-customized /sys/class/backlight/acpi_video0/brightness
  2. Create a file named /etc/default/brightness-customized with the content of file being just a number on a scale of 1 to 12. I am not sure about scale, but lets say you want low brightness. Then, put a number say, 2 in the file. So on running command:
    cat /etc/default/brightness-customized
    it should output:
    2

i.e. #brightness level you want to have
Now things should work atleast everytime you boot (start/restart) the machine.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »