Linux: (pre)setting the display brightness

Step-by-Step descriptions of how to do things.
Post Reply
User avatar
^rooker
Site Admin
Posts: 1469
Joined: Fri Aug 29, 2003 8:39 pm

Linux: (pre)setting the display brightness

Post by ^rooker »

UNFINISHED. Work in progress...

Every time the computer reboots, the brightness settings are reset. I wanted to have different default brightness when I turn on the computer, because I was a bit tired of the same few keypresses every time I boot it up.

Depending on your system, the path where to find the brightness value (from the shell) is:
SYS_BRIGHT/sys/class/backlight/intel_backlight/brightness
(That's it on a Lenovo Thinkpad S21e)

If your path is different (different vendor), try to "tab-find" the right subfolder in /sys/class/backlight.

Here's a list of brightness-steps when using Xubuntu 14.04's default settings (step size = 781):

Code: Select all

7812 brightest
7031 
6250
5469
4688
3907 medium
3126
...
1564
783
2 off / darkest
[code]

Due to the "unix philosophy" that everything's a file, you can use it to set the brightness by writing the desired value to it.
[code]echo 4700 > $SYS_BRIGHT
If you want to set the default when you boot your system, write the above line into your /etc/rc.local.
8)


Remember screen brightness settings in Ubuntu and Linux Mint
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
Post Reply