Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is it possible to set the default display brightness so you don't have to re-adjust it everytime you reboot? My laptop display is killing my eyes at the login screen already because it starts at 100% brightness every time.

share|improve this question
possible duplicate of How to make GNOME remember brightness setting –  Jorge Castro Oct 15 '11 at 11:32
add comment

4 Answers

Review of solutions and offering a (hopefully) better one

Previous solutions

/sys/-based : good for console


This works echo 5 > /sys/class/backlight/acpi_video0/brightness but does not play well with X. More specifically, X is not aware about your preferred settings and you may end up needing to set the brightness manually again at least once, similar to bug #1042359 .

setpci-based : system-dependent, dangerous


Solutions based on things like setpci -s 01:00.0 F4.B=50 are dangerous. There, 01:00.0 is actually an ID targeting a particular board on the PCI bus. And it is system-dependent. That means blindly following this may write configuration registers on some other boards where it may mean anything, from just nothing to crashing the system at some point in the future. Anyway it does not play well with X either.

Proposed solution


The solution below has these advantages:

  • plays nice with X which is fully aware of the settings chosen
  • is more readable, thus maintainable
  • does not contain system-specific address, etc, and as a result may work on a wider range of hardware (e.g. where kernel does not know about backlight, or that don't even use PCI-based video board, think Ubuntu for ARM )

It assumes: Ubuntu using lightdm (that is 11.10 and beyond)

It only sets backlight when lightdm starts. But it can be combined with the /sys-based solution above if you really need to set backlight earlier.

The solution

Copy-paste of this should do what you need (sudo will probably ask your password).

# Install xbacklight in case it is not already installed (small).
sudo apt-get install xbacklight

# This creates a small script running xbacklight.
# You can change the =30 into another value if you wish.
sudo bash -c '{
echo "#!/bin/bash"
echo "xbacklight =30"
} > /etc/lightdm/display-setup-script.sh '

# This makes that script executable
sudo chmod a+rx /etc/lightdm/display-setup-script.sh

# This instructs lightdm to run the script when starting X.
# Specifically, it adds a line display-setup-script in lightdm.conf, but only if there is not one already
  grep ^display-setup-script /etc/lightdm/lightdm.conf ; 
  echo "Already a display-setup-script. It may already do what you need. Else please adjust manually" ; 
  sudo bash -c "echo display-setup-script=/etc/lightdm/display-setup-script.sh >>/etc/lightdm/lightdm.conf" ; 

May be tested by restarting lightdm from a root session on the console. Or, more simply, by rebooting.

Tested on Ubuntu 12.04, works like a charm.

Please provide feedback about your experience.

share|improve this answer
On a freshly installed Ubuntu 12.10, copy-paste of the lines above just works. –  Stéphane Gourichon Jan 2 '13 at 15:38
Works for me too. –  Pawelmhm Sep 21 '13 at 11:01
On a freshly installed Xubuntu 13.10, copy-paste of the lines above just works. –  Stéphane Gourichon Nov 7 '13 at 5:41
add comment

It isn't default. Whenever I reboot my brightness is set to 100%. Luckily I saw

$ echo 5 > /sys/class/backlight/acpi_video0/brightness

and before that,

$ chmod o+w /sys/class/backlight/acpi_video0/brightness
share|improve this answer
add comment

this works in my 12.04 How set brightness on startup – Ubuntu 12.04

every time i boot up, it is set already. hope it will help you.

share|improve this answer
add comment

This should do the trick:

System settings -> Screen -> Brightness

Use the slider to adjust default setting.

enter image description here

share|improve this answer
Doesn't "stick" for reboots, at least for me on Precise (12.04) for an HP Envy Ultrabook –  hobs Aug 11 '12 at 18:14
add comment

protected by Community Feb 13 '12 at 12:24

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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