Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I set the screen brightness using either the function keys or the brightness & lock app. After a reboot or plugging in A/C the brightness goes back to max. When I take A/C off brightness is again reset to maximum. I'd just like Ubuntu to remember what brightness setting I like! Any ideas?

Laptop is an Asus X54H

share|improve this question

1) Edit etc/rc.local and add the below line

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

Where 4 is the 50 % of brightness. 8 is the maximum

2) reboot

If brightness still goes back to max go to step 3

3) In terminal run the following:

sudo -i
mv /etc/init.d/rc.local /root/
update-rc.d rc.local remove
mv /root/rc.local /etc/init.d/
update-rc.d rc.local defaults

If above 3 steps failed to resolve

Then add sleep 10 to rc.local


sleep 10 
echo 5 > /sys/class/backlight/acpi_video0/brightness
exit 0
share|improve this answer
First 2 steps work, but it reverts to max brightness on reboot. Step 3 didn't resolve this... – Marogian May 3 '12 at 16:50

Same problem here on clean installation.

First set your desired brightness value with your function keys.

Now you're going to identify it on a number scale by typing in a terminal :

cat /sys/class/backlight/acpi_video0/brightness

keep your value in mind and then go edit config file:

sudo gedit /etc/rc.local

and add the following line right before the "exit 0" line

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

where x stand for your desired value.

This way:

Valid XHTML.

where 4 is an example of value.

Save the document and exit, now after reboot and ac power plug it will be all fine.

share|improve this answer

1) Add the ikonoba ppa: sudo apt-add-repository ppa:ikoinoba/ppa

2) Install xbrightness-rgbgamma: sudo apt-get install xbrightness-rgbgamma

3) Add xbrightness-rgbgamma 50000 at startup applications (substitute 50000 for a value between 0 and 65535.

share|improve this answer
This doesn't seem to affect the backlight at all- just the gamma of the video output...the idea is me saving battery power, ie backlight intensity :( – Marogian May 3 '12 at 16:44
It has decreased the backlight in my laptop, although independently of the brightness settings. For me it works for all display not only for the video. It is sad it doen't worked for you. I hope you find a solution ;-) – desgua May 3 '12 at 17:37

I have the same problem but my laptop does remember the brightness during the connecting and removing the power cord. I faced the problem during the reboots.

Here is the workaround I have done to set the brightness to a value during each reboot.

  1. Install xbacklight ( sudo apt-get install xbacklight )
  2. Adjust the brightness of display.
  3. Open a terminal and run xbacklight -> It will give you the percentage of brightness. In my case it is 53.33
  4. Create a file .xbacklight in your home folder and set the execution permission to the file by "chmod +x .xbacklight"

Add following lines in the file

xbacklight -set <brightnes value you got from step 3>
  1. Add this file you startup applications.

This fixed my issue but you need to figure out how to do the same for A/C adapter.

I do not know why such pervasive issue is still there in Ubuntu.

share|improve this answer
Can't find an xbrightness package anywhere- and the xbrightness-rgbgamma doesn't seem to actually touch the backlight... – Marogian May 3 '12 at 16:44
Sorry, I made a mistake in the package name. I have corrected my post. Its xbacklight. Instead of creating the file you can directly add the command to Startup applications. – Abhijeet May 3 '12 at 18:29

There are some bug reports on launchpad about this issue, but I don't think there will be a solution anytime soon. Here is one of them:

It does not look like there is a solution besides manually setting the brightness appropriately (or using some automatic script to do so).

share|improve this answer

The tip from leandro on his own question works great for me:

Problem solved by adding acpi_osi=Linux acpi_backlight=vendor to the line that begins with GRUB_CMDLINE_LINUX_DEFAULT= inside /etc/default/grub

My Ubuntu now always remembers its last brightness settings. No need to set my brightness to an arbitrary value through any scripts :)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.