1

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
  • 70,465
Kolyo
  • 11
  • The best say to do this is probably via /sys and ACPI scripts to manage the values, however in order to design a solution tailored to you, we will need more information. Please provide the output of ls -l /sys/class/backlight for starters. – Chuck R May 04 '14 at 05:32
  • kolyo@kolyo-ThinkPad-Edge-E540:~$ 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 kolyo@kolyo-ThinkPad-Edge-E540:~$ – Kolyo May 04 '14 at 06:11
  • ls -l /sys/devices/pci0000:00/0000:00:02.0/backlight/acpi_video0 (please edit your question with this information) – Chuck R May 04 '14 at 10:39

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
  • 70,465
Sudheer
  • 5,113
  • 4
  • 24
  • 27