I’ve had some difficulties when it came to the backlight on my arch linux installation.
Of course the first place to look for a solution was the arch wiki but I couldn’t find the right combination of kernel params to brighten the screen. It was kind of dark and the other possible mode was completely off.
After searching for a while I found a bug report having the same problem as I had so I had a look at it and checked to see if this works. My expectation was low given the fact that I thought that I’ve already tried everything but fortunately this helped.
1. Getting the correct backlight files:
- Edit /etc/default/grub with your favorite text editor
- Go to the line starting with GRUB_CMDLINE_LINUX_DEFAULT
- Append acpi_osi=linux acpi_backlight=video
- execute sudo update-grub
2. a) Controlling the backlight with the keys
While this didn’t work for me I still list it in case it works for anyone else. Found the snippet below here. It offers additional explanation but even though I checked the values and they seemed to be correct for me aswell it didn’t work and I gave up after two hours of trial and error.
Identifier "Intel Graphics"
Option "AccelMethod" "sna"
Option "Backlight" "acpi_video0"
2. b) Controlling the backlight with a script
Now that we can simply write the brightness into a file we can create a quick script for setting the brightness so we don’t have to remember the path.
sudo tee /sys/class/backlight/acpi_video0/brightness <<< $1
Execute the file with the desired brightness value. You can get the max brightness by executing the following command
sudo cat /sys/class/backlight/acpi_video0/max_brightness
If you managed to build a nice script that allows the user to change the brightness and map it to the keys then I would be more than happy if you could share it!