How to make the screen brightness keys work again in KDE
How to make button for screen brightness work on your laptop in KDE
When I started using a newer kernel in openSUSE 13.2, I noticed the buttons for screen brightness were no longer functioning on my laptop. This is verry annoying, so I decided to do something about it. I am using KDE. I will try to write the instructions as generic as possible, so that it will hopefully work in your situation too. This is a HP ELitebook 8570p.
First, we have to find the screen device, which is located somewhere in the /sys/devices/pci0000:00 directory.
Somewhere in this directory is a file located with the name 'brightness'. Let's find it.
#find /sys/devices/pci0000:00 -name "brightness" /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0/card0-LVDS-1/radeon_bl0/brightness /sys/devices/pci0000:00/0000:00:1c.2/0000:24:00.1/leds/mmc0::/brightness /sys/devices/pci0000:00/0000:00:1c.3/0000:25:00.0/leds/phy0-led/brightness
Remember, your output is probably different from what I got here.
I have a radeon card, so the first line contains the device we will be working with.
When you read the content of the 'file', you get the current brightness level:
#cat /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0/card0-LVDS-1/radeon_bl0/brightness 235
The value lies somewhere between 0 and 255, it's a one byte value.
You can test if this work for you by writing a different value to that file: (remeber to substitute the file for your graphics card)
#echo 200 > /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0/drm/card0/card0-LVDS-1/radeon_bl0/brightness
If this works, you should see the brightness change.