0

I am using Ubuntu 14.04 and I want to save my brightness level, because every time I start the computer the brightness level is at maximum.

$ ls -l /sys/class/backlight
total 0
lrwxrwxrwx 1 root root 0 Mai 4 06:50 acpi_video0 -> ../../devices/pci0000:00/0000:00:02.0/backlight/acpi_video0
lrwxrwxrwx 1 root root 0 Mai 4 06:50 intel_backlight -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-eDP-1/intel_backlight
Zanna
  • 72,312
Kolyo
  • 9

1 Answers1

1

To find out current brightness

cat /sys/class/backlight/acpi_video0/brightness

To change brightness

echo [brightness value] > /sys/class/backlight/acpi_video0/brightness

To change brightness permanently

sudo -H gedit /etc/rc.local

add the following line above 'exit 0' at the bottom of document

echo [brightness value] > /sys/class/backlight/acpi_video0/brightness

replace [brightness value] with the correct value determined by experiment - more than 0 and less than whatever is in /sys/class/backlight/acpi_video0/max_brightness or the corresponding file.

If echo foo > /sys/class/bar... etc throws a permission error in the shell, try

echo foo | sudo tee /sys/class/bar...

If that doesn't work, you can't change that access point. There's no need for sudo tee in /etc/rc.local though.

Zanna
  • 72,312
Sudheer
  • 5,213