Modern Thinkpad Brightness controls under Linux

If you experience problems setting the brightness of modern Lenovo Thinkpad Laptops under Linux this might be the solution for you.

This example uses the Thinkpad E555 coming with a Radeon R5 GPU (AMD A8-7100).

First of all make sure how the brightness control stuff is called for you.
Open up a terminal and type in

ls /sys/class/backlight/
If you only see one folder in here. Thats great. If you have more then one you need to figure out which one is capable of controlling your brightness.
They usually have a max_brightness value in their folder and provide a brightness file to adjust the current brightness.
So first figure out what the max_brightness value is

cat /sys/class/backlight/*/max_brightness

then adjust it with a lower value as root with

echo 5 > cat /sys/class/backlight/*/brightness

If it works then you know which folder name to use.
In the case of the Thinkpad e555 its radeon_bl0.

Now create a new file called after your graphics driver in /usr/share/X11/xorg.conf.d/
So for example if your driver is radeon then create a file in that directory with the name 20-radeon.conf .

If you are unsure what driver you have running you can use
inxi -v2
 to see which Graphics driver you are currently running.
Alternatively you can also use
lspci -vnn | grep -A12 -i vga 
to see the Kernel driver in use

Write the following in that conf file

Section "Device"
        Identifier  "card0"
        Driver      "radeon"
        Option      "Backlight"  "radeon_bl0"
        BusID       "PCI:0:1:0"

Replace the radeon with the one you are using and the radeon_bl0 with the folder name determined earlier.

Last step is to tell the system to use that Backlight option in the video driver instead of relying on other methods.
This is easily done by adding a grub command line option.
Open the default grub config as root with

vi /etc/default/grub
(you can replace vi with your favorite text editor)
And add as option to the line GRUB_CMDLINE_LINUX_DEFAULT


The whole line should similar to this then

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash init=/lib/systemd/systemd acpi_backlight=video"

After that update grub with update-grub2 as root and reboot.

If everything went fine. Brightness controls should work for you.