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

The brightness of my laptop is reset to Max on every restart. I tried the solution provided at this website but had no luck.

This command

cat /sys/class/backlight/acpi_video0/max_brightness


cat: /sys/class/backlight/acpi_video0/max_brightness: No such file or directory

Then I go on to find that I don't have any folder named


but a folder called


enter image description here

Every time I increase or decrease the brightness using the Brightness Control Keys the "brightness" and the "actual_brightness" values get updated.

Is there any method I could follow to set the brightness to a fixed value on everyboot and vary it as and when I need it using the Brightness Control Keys.

share|improve this question
I just tried this ... It doesn't work. – Bhargav Jun 16 '12 at 10:14
possible duplicate of: How do I set default display brightness? – Akronix May 10 '14 at 10:38
This is happening to me still in version 14. It would be great if this were fixed. – Joe Oct 5 '14 at 1:56

20 Answers 20

up vote 87 down vote accepted

You could try adding a line to /etc/rc.local that will set the desired brightness level. To edit the file, run

sudo -H gedit /etc/rc.local

and add the following

echo X > /sys/class/backlight/intel_backlight/brightness

so that the end result looks 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.

echo X > /sys/class/backlight/intel_backlight/brightness

exit 0

Substitute X by the desired brightness level.

share|improve this answer
That worked like a charm.. Your Awesome :D – Bhargav Jun 16 '12 at 10:41
Probably. Different computers will have different entries in /sys/class/backlight/, and figuring out the right location, basically, solved the problem. – mikewhatever Jun 16 '12 at 13:28
X is the desired brightness level on a scale of 0-10 or 0-100? – syedrakib Oct 14 '12 at 15:37
Depends. Different models have different scales. I only had to deal with 0-7. Check the current level by running cat /sys/class/backlight/intel_backlight/brightness. It's a good idea to experiment with several values, if you aren't sure which one is right. – mikewhatever Oct 14 '12 at 23:33
Doesn't work for me in 12.04? – user24668 Jul 1 '13 at 18:11

I converted my small script for saving and restoring backlight (brightness) level to Ubuntu package. It is located in my PPA and named sysvinit-backlight. It contain syvinit init-script, placed in /etc/init.d/sysvinit-backlight. It is compatible with Ubuntu 12.04 LTS and 14.04 LTS. Ubuntu 14.10 users should upgrade to 15.04 and use builtin systemd-backlight service.

You can install my script with the following commands:

sudo add-apt-repository ppa:nrbrtx/sysvinit-backlight
sudo apt-get update
sudo apt-get install sysvinit-backlight

You can remove it by

sudo apt-get purge sysvinit-backlight

Please note: if you have installed the previous version of my script, please remove it by

sudo rm /etc/rc?.d/?25backlight /etc/init.d/brightness /etc/rc?.d/?25brightness

The script functionality is:

  • save backlight (brightness) levels of all video adapters and keyboard on reboot and shutdown (runlevel 0 and 6)
  • load backlight (brightness) levels for all video adapters and keyboard on boot (runlevels S, 1, 2, 3, 4 and 5)

The script options are:

  • sudo service sysvinit-backlight status (show current brightness levels and saved in files values)
  • sudo service sysvinit-backlight start (set saved levels from files)
  • sudo service sysvinit-backlight stop (save current levels to files)

You can contact me here or on launchpad.

share|improve this answer
I reported a bug about including such initscript to default Ubuntu installation - – N0rbert Jan 19 '14 at 13:41
Works perfectly for my Dell laptop on Ubuntu 14.04. As the laptop has a on-chip graphics adapter plus another adapter (that is used by default), I just had to change /acpi_video0/ to /acpi_video1/. – BurninLeo Sep 19 '14 at 16:03
This script is practical. Worked for me too on my lenovo flex 2. I think it should also be included in default Ubuntu or Linux mint installs. – Tatakai Wasumi Oct 25 '15 at 3:16

Easiest way:

  1. Open a terminal window.

  2. Type in the following commands then hit Enter after each.

sudo apt-get install xbacklight

  1. Open the Startup Applications Preferences menu.

  2. Click the Add button and add the following information:

Name: Brightness Command: xbacklight -set 60

  1. Replace 60 with whatever brightness level you prefer.

Source: Set Startup Display Brightness

share|improve this answer
thank you, it works perfectly for me. Ubuntu 14.04 on Acer 5732Z – Sushiant Feb 2 '15 at 2:52

Before try workarounds in rc.local, it is worth to try the following:

  • adding simple: quiet splash acpi_backlight=vendor to grub looks to be enough on my configuration.

    1. sudo gedit /etc/default/grub
    2. replace
      GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
      GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset acpi_backlight=vendor"

    3. sudo update-grub and reboot.

worked on:

  • Ubuntu 12.04 LTS (Asus U31SD-XH51 )
  • Ubuntu 14.04 LTS (Dell 14z)
  • Ubuntu 14.04 LTS (Lenovo g500, remove nomodeset and it will work fine)
share|improve this answer
more details sudo gedit /etc/default/grub and replace GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" to GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset acpi_backlight=vendor" – tbicr Jun 7 '14 at 5:40
Unfortunately it breaks the brightness adjustment from the fn keys on 14.04. – NoBugs Jun 29 '14 at 2:20
works for me as well on 14.04 ... fn keys for brightess were not working also previously so ... – Postadelmaga Jul 3 '14 at 9:08
This seemed to work fine - for one reboot (even the Fn keys on my Dell laptop worked). But after another reboot the Fn keys brightness did not affect the screen any more. And worse: The wakeup after standby (suspend to RAM) stopped working with a dark screen. – BurninLeo Sep 19 '14 at 15:37

When I use this:

$ cat /sys/class/backlight/intel_backlight/max_brightness

then I modified the code in /etc/rc.local

$ gksudo gedit /etc/rc.local

------- BEGIN FILE -----------------------------

#!/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.

echo 4882 > /sys/class/backlight/intel_backlight/brightness
exit 0

------- END FILE -----------------------------

That worked for me.

share|improve this answer
I don't get it, what would that do? It's already maximum by default. – JMCF125 Aug 29 '13 at 22:49
You should use cat /sys/class/backlight/intel_backlight/brightness 168 instead. I use 168 because my eyes don't hurt at that brightness level – Tatakai Wasumi Sep 18 '15 at 16:15

Install xbacklight (sudo apt-get install xbacklight) and add

xbacklight -set x

(where 'x' = 0 to 100 desired brightness) to the startup applications via dashboard. For example:

xbacklight -set 50
share|improve this answer
And how does this fix the 'reset on reboot' issue in the question? – gertvdijk Oct 16 '13 at 0:55
this adjust the brightness just for current session. if you restart then the brightness is reset. – Sudeep Acharya Feb 3 '14 at 18:47
Not if you add it to startup applications. And yes this is a work-around, not a full resolution. – Brandex Feb 5 '14 at 19:23

I use a Sony Vaio S model and hybrid graphics. I disabled my ATI G card and so my intel HD 3000 serves as my only g card.

I found that setting the brightness value to this file "actual_brightness" in the intel_backlight folder will help. and the other wont.

for me my minimum brightness value is 236 and maximum value is 4648, so u may set a value anywhere between this.

so try this >>>

echo 236 > /sys/class/backlight/intel_backlight/actual_brightness

share|improve this answer

The solutions offered here are somehow system-dependent.

A good design is to have one place that takes care of system-dependent details and provide a unified interface. It seems that currently the kernel does not offer such an easy interface through /sys. At X level, though, there is one : xbacklight.

A solution based on xbacklight is offered on How do I set default display brightness?, for 11.10 and up.

Plus, it should not have the problems reported on some areas (e.g. ) that wrong brightness comes back in some situations.

share|improve this answer

How to debug backlighting:

Unfortunately just adding acpi_backlight=vendor doesn't seem to save the default value for my 12.04 Lenovo G575.

share|improve this answer

My laptop is Compaq Presario CQ62 111TU, installed Ubuntu 12.04. The Following steps worked for me well.

  1. Adjust the screen brightness to your preferred level.
  2. Open Terminal and enter cat /sys/class/backlight/intel_backlight/actual_brightness and take down the value.
  3. Enter cat /sys/class/backlight/acpi_video0/actual_brightness and take down the value.
  4. Enter sudo gedit /etc/rc.local and add these before the last line exit 0 in gedit:

    echo ValueFromStep2 > /sys/class/backlight/intel_backlight/brightness
    echo ValueFromStep3 > /sys/class/backlight/acpi_video0/brightness

save and enjoy.

My settings are shown below

#!/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.

echo 478 > /sys/class/backlight/intel_backlight/brightness
echo 0 > /sys/class/backlight/acpi_video0/brightness

exit 0
share|improve this answer
This worked great for me. All I needed was the /sys/class/backlight/acpi_video0/brightness line. – bmaupin Nov 15 '13 at 16:44

I find N0rbert's solution to be the best one, as the script that he's provided allows to restore your previous brightness level on startup.

Although, there was a small modification that I had to introduce to his solution to make it work. Instead of creating symbolic links that he's mentioned, I've provided the following:

ln -s /etc/init.d/brightness /etc/rc0.d/S25backlight
ln -s /etc/init.d/brightness /etc/rc2.d/S25backlight
ln -s /etc/init.d/brightness /etc/rc6.d/S25backlight

Notice, that instead of rcS.d, I've added a symbolic link to rc2.d, which is a runlevel for "Graphical multi-user with networking" (see more). I believe that the reason why the former one doesn't work for me is Ubuntu overriding brightness level after it has been set up by the /etc/init.d/brightness script during S runlevel.

With that subtle change, restoring brightness level works like a charm, especially for Ubuntu 14.04 LTS on Lenovo ThinkPad L540.

share|improve this answer

I added the following into /etc/rc.local, to manage the display brightness and keyboard backlit and it works perfectly

echo 30 | sudo tee /sys/class/backlight/acpi_video0/brightness
echo 3 | sudo tee /sys/devices/platform/applesmc.768/leds/smc::kbd_backlight/brightness

exit 0
share|improve this answer

Use this command to discover your current brightness level:

cat /sys/class/backlight/intel_backlight/brightness

Then, edit rc.local file using this command:

gksudo gedit /etc/rc.local

Add this line before exit 0 line:

echo X > /sys/class/backlight/intel_backlight/brightness

If this don't solve the problem, can be that something in your system is overwriting the brightness level. Then, you can try add a sleep command to delay the execution of the previous command:

(sleep 10 && echo X > /sys/class/backlight/intel_backlight/brightness)


share|improve this answer

No need to fall into scripting and coding.

Just follow these simple steps:

If screen brightness is stuck at maximum every startup, install xbacklight (sudo apt-get install xbacklight) and add "xbacklight -set x" (where 'x' = 0 to 100 desired brightness) to the startup applications via dashboard. For example, "xbacklight -set 50".

I have set brightness for my laptop to 30.

Source: [Search for word "brightness" and read related paragraphs on this source page.]


share|improve this answer

It is well worth checking the max_brightness files for the absolute maximum values in /sys/class/backlight/intel_backlight and /sys/class/backlight/acpi_video0 directories to avoid setting unusable values.

My Dell Inspiron 5720 uses maximum values of 4882 and 100 respectively. I have set these to 2508 and 52 to prolong battery life. ACPI value in this case is equivalent to the percentage of the maximum brightness.

Editing rc.local works for me. I added comments to clarify how the values were determined. set required brightness with function keys and read values in brightness or actual_brightness files in each of the above Intel / ACPI directories.

share|improve this answer

For mint mate 17, you can set the default brightness by following steps:

  • sudo apt-get install dconf-tools
  • Applications -> System Tools -> dconf tools,
  • search for backlight, find and change following options:

    • brightness-ac
      brightness when use AC powser (charged),
    • brightness-dim-battery
      brightness when use battery (not charged),
share|improve this answer

all replies are helpful but didnt help me what i was trying to achieve. i wanted pre-defined levels of brightness for battery and ac power.

  1. use laptop mode tools from here laptop mode tools
  2. edit the conf file for brightness and replace [values] with the values you want. like "echo 1" for

works for me :)

share|improve this answer

This solution from Webupd8 works best for me.

share|improve this answer

This is yet another workaround

$ sudo dd if=/dev/tty of=/sys/class/backlight/intel_backlight/brightness


control d

0+1 in 0+1 out 5 bytes...


less typing for fumble fingers...

share|improve this answer

Change default brightness level in Ubuntu 14. 04 LTS / Brightness is reset to Maximum on every Restart on Ubuntu 14.04 LTS

Here is what i found out.

In my case I had both the folders.

And when I changed the default brightness level, it took the change from the file in the folder acpi_video0. i.e. from the second line of code.

Here is the code that will be helpful for setting the default brightness level for Ubuntu 14.04 LTS.

#!/bin/sh -e
#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
#By default this script does nothing.
#if you are changing the default brightness in Ubuntu 14.4 LTS
#the brightness under the folder acpi_video0 is important.
#Because brightness is set from that folder and not from intel_backlight
#(in case of my PC. It may very in others)
#That means you can omit the first echo line.
#However the command lines are given if any one has some problem and doesnot
#have the acpi_video0 folder
echo 1020 > /sys/class/backlight/intel_backlight/brightness
#Under the above given address the range of brightness is from 0 to 4648.
echo 3 > /sys/class/backlight/acpi_video0/brightness
#Under the above given address the range of brightness is from 0 to 7.
exit 0
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.