I've been using a loop that contains xrandr --output VGA1 --brightness 0.3 in a bash script which will automatically execute right after logging in by gnome-session-properties (a.k.a. Startup Applications).

Is there any configuration file that can control the monitor brightness while a display connects to the X server? In short, how to set the monitor brightness at boot time?

  • An up is appreciated :)
    – Maythux
    Mar 27, 2015 at 10:00

1 Answer 1


Copied from Ji m's Ubuntu handbook:

Open your file browser and navigate to “Computer-> sys -> class -> backlight” directory. You’ll see two or three folders there:

enter image description here

In each folder there’s a file called actual_brightness, you can see its content (brightness value) through the thumbnail icon.

enter image description here

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:

    cat /sys/class/backlight/acpi_video0/max_brightness

    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
  • When you copy text from someone, it isn't enough to add a discreet link to someone else who cited it (and did it right by reframing the content in his own words). You must indicate the source and you must clearly mark copied content as such. Mar 27, 2015 at 22:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .