Backlight: Difference between revisions

imported>Graham33
Add info on OLED screens (which don't technically have a backlight)
imported>Con-f-use
sys/class brightness
Line 42: Line 42:


You can use it by simply installing the package. Since <code>brightnessctl</code> supports the systemd-logind API it should work out of the box (i.e. without installing any udev rules or using a setuid wrapper).
You can use it by simply installing the package. Since <code>brightnessctl</code> supports the systemd-logind API it should work out of the box (i.e. without installing any udev rules or using a setuid wrapper).
== <code>/sys/class/backlight/...</code> ==
The <code>/sys/class/backlight/*/brightness</code> files are a built-in way to set brightness. Use them e.g. with:
<syntaxhighlight lang=bash>
  sudo tee /sys/class/backlight/intel_backlight/brightness <<< 300
</syntaxhighlight>
to set the brightness to <code>300</code>, where the maximum is stored in <code>brightness_max</code>. You can set file permissions e.g. with a udev rule, if you don't want to use sudo.


== Tips ==
== Tips ==