Ubuntu 12.04 resetting your display’s brightness levels? (Fix)

I have a Dell Vostro V131 notebook that comes with a Samsung display and Intel HD 3000 GPU. I think it started with Ubuntu 12.04, that whenever I reduce the brightness levels, in the next system reboot that setting is lost, and for some reason Ubuntu resets the display brightness levels to its maximum.

So I looked for a solution and thanks to a suggestion by a user in ‘Launchpad’ concerning this bug, I’ve found the solution. It seems that this method has worked for many users, so if you’re having the same issue (with 12.04 or older versions) then you can try it out as well.

What we’re going to do is simple. We’re going to add a command that’ll run automatically when your Ubuntu OS boots and it changes the brightness value of the system’s default configuration file. For that, please follow the below steps.

Step 1: First, change your brightness into the desired level and then open your Terminal and issue the below command.

cat /sys/class/backlight/acpi_video0/brightness


This will print a number which represents the current brightness level. Take a note of this number as we’ll be needing it later.

Step 2: Then enter the below command and it will open a file in your text editor.

gksudo gedit /etc/rc.local

Step 3: Now simply copy and paste the below code into this configuration file but make sure it’s above the existing ‘exit 0’ line as shown below, otherwise it won’t work.

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


Make sure to replace the number ’12’ with the one that you got in the ‘Step 1’. Then click on the ‘Save’ button and close the editor.

That’s it, now reboot your PC and you should see the brightness isn’t reset anymore! (hopefully).

If you get an error at ‘Step 1:’ …

If when you enter the first command in the ‘Step 1’ you get an error saying …

bash: /sys/class/backlight/acpi_video0/brightness: No such file or directory

That’s obviously because the ‘acpi_video0’ folder is not preset. The ‘acpi_video0’ folder holds the universal ‘acpi’ standard for accessing the GPU (VGA card) and the display for adjusting their basic settings. However, depending on your GPU model, this folder might simply not be there, instead, there should be another folder that goes by the manufacturer’s name of your GPU.

For example, as mentioned, I have an Intel HD 3000 graphics card and I actually have two folders called ‘acpi_video0’ and ‘intel_backlight’ and I can use the configuration file in any of these folders to change the brightness levels. But I use the file inside ‘intel_backlight’ folder for tweaking rather than the standard ‘acpi_video0’ folder and its content.

Anyhow, assuming that you don’t have the default folder then the easiest way to figure out what folder that you should be using is to enter the below command in your Terminal.

ls /sys/class/backlight

Then have a look at the output, and you should see a folder that starts with the name of the manufacture of your GPU. If you have a Nvidia card, then you might have something like ‘nvidia_backlight’, if you have an ATI/AMD Raedon card then it might have something like ‘raedon_bl’ etc.

I have a folder called ‘intel_backlight’ because I haven an Intel HD 3000 GPU …

Let’s assume that I don’t have the ‘acpi_video’ folder and the above one output the name ‘intel_backlight’, then all I gotta do is simply copy the name of that folder and replace it with ‘acpi_video0’ part in the commands in  ‘Step 1’ and ‘Step 3’. That should do the trick.

What if that directory is empty?

Well, then you have a problem. There could be many reasons for that, one is, some of the proprietary drivers for GNU/Linux (some from Nvidia for example) don’t yet support changing brightness and when you install their proprietary driver manually, the existing folder will be deleted by it and, well you’re kinda stuck.

In that situation, the only fix would be to remove the proprietary driver and rollback to the open-source one (aka ‘nouveau’) :/. Good luck.

An RHCE, 'Linux' user with 14+ years of experience. Extreme lover of Linux and FOSS. He is passionate to test every Linux distribution & compare with the previous release to write in-depth articles to help the FOSS community.

30 thoughts on “Ubuntu 12.04 resetting your display’s brightness levels? (Fix)”

  1. Thank you SO SO much, I’ve been looking for a solution for this for months, and nothing else has worked, I’m so happy right now 😀

  2. Thanks, Gayn. Let’s hope this setting will stick because I have tried similar steps shown in other instructables but none worked. I have an Intel HD 3000 and nVidia discrete GT520M graphic card so it showed both option. I opted for the acpi_video0 in rc.local and so far, it’s going.

    On a highlight note, why is the value after “echo” increased to 12 instead of 11 as reported by the “cat /sys/class/backlight/acpi_video0/brightness” command?

    Also, if you ever tried powertop, it offers a few featured commands for better battery life by pressing certain keys in terminal but the only problem lies in rebooting. By then, you have to re-input all commands to achieve better battery life. In this case, is there a way to get these commands to load automatically on reboot?



    P.S. I’ll be doing some extensive testing on display reset as instructed on this page for a couple days.

    • Hi ‘Cason’,

      Concerning the first question: Mate I’m not exactly sure why it happened to you (has never happened to me). But since you have two GPUs, I assume that it perhaps has something to do with an ACPI incompatibility issue (just a guess though).

      Secondly: I don’t actually use ‘PowerTop’, but according to few articles that I found, it seems possible. Out of these those articles I choose the one created by ‘Andrei’ at ‘WebUpd8’ as it includes screenshots etc so its easy to understand.

      Below is the link to the article, the ‘solution’ is listed at the bottom. Good luck.


      P.S I prefer to use either ‘laptop mode tools’ or ‘TLP’ for enhancing battery life, though ‘PowerTop’ is also a pretty good one.

      TLP: http://refugeeks.com/use-tlp-to-optimize-the-power-consumption-in-ubuntu/

      Laptop Mode Tools: http://www.hecticgeek.com/2012/02/lmt-battery-life-enhancer-ubuntu-linux/ , http://www.hecticgeek.com/2012/06/fix-usb-mouse-not-working-laptop-mode-tools-ubuntu/

      • Love your quick reply, mate.

        Anyhow, your little work-around for brightness setting didn’t work on Asus U31SD-XH51 model. Worked on first reboot, then back to what was before. Additionally, laptop appears to adjust the brightness itself while running on battery. Even if I adjusted the brightness, it just won’t stick. Any input on this?

        • Hi Cason,

          I can’t be certain of this as there is no way I can test it out.

          However, since you’ve said that you can see both ‘intel_backlight’ & ‘nvidia_backlight’, why not add two configurations for both ‘Intel HD3000’ and ‘Nvidia GT520M’.

          The reason I said that is because, again as mentioned earlier, perhaps the ‘acpi_video0 …’ is struggling with the dual GPU configuration.

          So remove the ‘acpi_video0…’ configuration from ‘rc.local’, and then add two commands for both Intel and Nvidia cards, and please remember the number that represents the brightness level in ‘Intel’ does not have to be the same in ‘Nvidia’.

          So make sure to manually check the proper number that represents the desired brightness level as well.

          Just in case 😉 …

          *. Once the desired brightness level is set, you should able to get the number for the ‘Intel HD’ GPU by using the below command.

          cat /sys/class/backlight/intel_backlight/brightness

          *. Below one ‘may’ give you the brightness level for the ‘Nvidia …’ GPU.

          cat /sys/class/backlight/nvidia_backlight/brightness

  3. I really appreciate you taking time to respond to my inquires, especially to a Linux noob like me.

    Regarding my last comment, what I meant was that it has both ‘apci_video0’ and ‘intel_backlight’ folders and I opted for the first because the CPU is a Sandy Bridge iCore5, which matches yours.

    My utmost appreciation for pimping me with Laptop Mode Tools which, given in my case, a 6.3W in idle (using Powertop to monitor by the way). One thing that I am confused is the HDD spin-down guide because I am actually using a Samsung SSD; does this mean LMT will ignore that option?

    Current problems:
    1. Backlight is fickle.
    2. Sleep mode is fickle, requiring hard reset when it does not.

    There is a fix on Ubuntu Wiki page that apply a small script written by a person with Asus U31SD. I am not sure if I should follow this since I don’t know how to undo if it does not work as intended. Your input would be appreciated. Here’s the link:

    With these two fixes, I should be Linux much more often.

    I hope you will help me tackle these issues listed above. I am starting to like Linux.

    • Hi Cason,

      The HDD spin-down won’t affect your SSD.

      You can try that script to see whether if it fixes the issues or not. And once installed, you can remove it by using the below command (if it gives you more problems).

      sudo rm /etc/pm/sleep.d/20_suspend-ehci-hcd

      Once installed, you should be able to get rid of ‘Bumblebee’ by using the below command as well.

      sudo apt-get autoremove bumblebee

      By the way, you are welcome too :).

  4. Thanks, ‘sudo rm /etc/pm/sleep.d/20_suspend-ehci-hcd’ was just what I needed to remove the script. Basically, it simply disabled suspend mode, replacing with locked mode. I guess I am screwed as far as suspend mode is concerned. Any input?

    By the way, I notice that, even with laptop mode tools, running programs such as Ubuntu Software Center, launch a web page, etc..,causing the fan to rev up then stop. From my perspective, it has something to do with “min/max processor state”. On my main Windows 7, I typically keep min-value at 0% and max-value at 75%, adjust them through Windows Mobility Center and that takes care of the problem. Is it possible to do this on Ubuntu 12.04 LTS?

    See this page if you don’t know what I am talking about.
    Scroll down until you see “Modify your computer power options.”

    • Hi Cason,

      I’m sorry I can’t help you with the ‘Suspend’ issue, GNU/Linux is known for those (its not really GNU/Linux’s fault usually, it’s the lack of support from hardware manufactures etc).

      However, have you tried the ‘fixes’ described in the below link. In it, the author says the ‘Suspend’ issue is due to some sort of a USB communication problem (‘USB BUS’). So perhaps that might help you. Here’s the link …


      As for the CPU heating/fan problem, there are few tools that you can use. One is called ‘indicator-cpufreq’ which lets you set a CPU speed manually (if your CPU supports different speed levels) and won’t let it go beyond that, unless you choose otherwise.

      I have already written about that, so for installing and using it, read the below article.


  5. My goodman Gayan,

    ‘indicator-cpufreq’ was the culprit behind my re-installation of Ubuntu 12.04 LTS. An extensive research showed that its PPA is not for Precise. On performance wise, ‘indicator-cpufreq’ disabled the highest clock, resulting steps of 2.00Ghz, 1.00Ghz, 800 Mhz as opposed to 2.40Ghz, 2.00GHz, 1.50GHz, 1.00Ghz, 800Mhz You might want to update this page for 12.04 LTS – http://www.hecticgeek.com/2012/10/use-indicator-cpufreq-to-reduce-the-power-usage-under-certain-tasks-ubuntu/.

    Source: https://launchpad.net/indicator-cpufreq

    For my current issues with backlight and sleep mode, both are ‘magically” fixed after Canonical’s system update just yesterday. I don’t know who to blame here because I always did the update after completing installation.

    I’ll be monitoring for performance, enhancement and tweaks.

  6. I am bothering you again, Gayan. I am able to control the backlight on startup using:

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

    The only problem I’m getting right now is that on resuming after screen turned off (not suspend, okay?), it switches right back to full brightness. *sigh*

    Secondly, opening “Brightness and Lock” will also reset the brightness to max. The ‘auto dim the screen to saver power” is another story so unticked it.

    Lastly, I heard Intel is releasing Linux driver, but it has its own bug which messed up my entire OS, forcing me to make a fresh install. Source: https://01.org/linuxgraphics/downloads/2013/intel-linux-graphics-installer

  7. 3 words: Oh My Goodness!

    After all the stupid stupidest stupidier workarounds in rc.local and LMT, all it took was adding simple: quiet splash acpi_backlight=vendor to grub! From now on, any increase/decrease in brightness through user interaction is kept…NO MORE RE-ADJUSTING! Woohoo!

    GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash acpi_backlight=vendor”

    Gayan, try this and see for youself if you are still using your current laptop with Intel HD3000.

    Let me know how it goes.

    • Hey ‘Cason’,

      Thanks for the suggestion mate. This however, does not work for me, but I’ve heard that it usually helps users with dual GPU configuration (you lucky, and smart!, geek :P).

        • Thanks (again) for the suggestion ‘Cason’.

          1, Unfortunately, I have a recent Intel GPU driver (2:20:18), though I also had installed the latest one using Intel’s new GPU installer, as I put in the article, that didn’t go well, as I lost the ability to take screenshots after that :/. So I’ll be sticking with this one for a while.

          Anyhow, the ‘Backlight’ issue is still there and ‘rc.local’ is what has helped me so far.

          2. As far as ‘SNA’ is concerned, it is working decently, though it used to give me few glitches here and there in the past, it’s pretty stable right now.

          To be honest, it ain’t really a burden to me, as once I add my usual brightness level to ‘rc.local’, well, it keeps me happy.

          P.S – I wouldn’t mind you spamming here ;-), in fact, this is the best way to learn GNU/Linux ain’t it?, helping each other with our experiences :D.

  8. Hi Gayan,

    I noticed this thread and thought you might like to know that lately I’ve been using gtk-redshift.. You enter your longitude and it automatically adjusts your brightness according to the position of the sun in your local sky. Am I explaining that OK? LOL

  9. Hi. When i type “ls /sys/class/backlight” in the terminal it shows “acpi_video0” only. What does that mean?

    I’m having brightness problems with my laptop. I can’t adjust it. I hope you can help me.

    • Hi Irene,

      Sorry about the late response.

      Anyway, forget about ‘ls /sys/class/backlight’ for now. As mentioned in the article, put the below command and see if it displays any value.

      cat /sys/class/backlight/acpi_video0/brightness

      If it does & your display brightness is set at maximum, then follow ‘Step 2’ & ‘Step 3’ for setting it up. At ‘Step 3’, make sure to replace the number that the above command printed with a lower number (one that closely resembles your desired brightness level).

      P.S: What is the brand of your VGA card (Nvidia, AMD/ATI, Intel…)?

  10. I’ve been googling for days, been following instructions from forums. None of the suggestions posted there seem to work. The brightness level of my laptop is set too high, it’s hurting my eyes. I hope you can help me, Sir.

    P.S I’m not very knowledgeable when it comes to computers. Hehe.

  11. Hi! Thanks for your response.

    The value it displays is “1”. That’s supposed to be the lowest value I guess? But the monitor’s really way too bright. And regarding the VGA, it’s AMD/ATI.

    • I’m not sure if this will work (it’s difficult to troubleshoot these matters without having access to the actual machine 🙂 )… but try the below command:

      sudo echo 0 > /sys/class/backlight/acpi_video0/brightness

      When asked, simply enter the administrator’s password (which is the password of the user that you created when installing Ubuntu).

      Then enter the below one afterwards:

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

      If this reduces the current brightness, then you can follow the instructions laid out in the article (editing the ‘rc.local’ file & make sure to exclude the ‘sudo’ part when saving the command) for fixing things up. If none of this works, then it’s probably better to install the proprietary driver for your GPU which hopefully would fix it.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.