Page 1 of 1

Linux: (pre)setting the display brightness

Posted: Mon Oct 29, 2018 3:16 am
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