Red Hat Bugzilla – Bug 830292
KDE Brightness Control Problem
Last modified: 2015-07-13 13:35:47 EDT
KDE will not change the brightness on T61 Thinkpad with NVidia graphics.
Description of problem:
KDE will not change the screen brightness. I've tried using the slider in the power management widget and the function keys (fn + home, fn + end). In Gnome 3.4, everything works. I'm currently running nouveau, but this problem existed on F16 and wasn't solved with a switch to the proprietary drivers, even after using kernel boot flags and xorg.conf tricks. Echoing to the files located at /sys/class/backlight/acpi_video0/* works. Of note, no brightness display pops up when using the keys, possibly they're not getting recognized?
Version-Release number of selected component (if applicable):
KDE 4.8.3, kernel-3.4.0-1.fc17.x86_64, xorg-x11-drv-nouveau.x86_64 -- 1:0.0.16-35.20120306gitf5d1cd2.fc17
Hardware specific, unsure. Exists instantly on installed system.
Steps to Reproduce:
1. Get a Thinkpad T61 with NVidia card
2. Install Fedora KDE
Brightness does not toggle at all.
Brightness toggles from fn + home, fn + end.
What's the output from:
ls -al /sys/class/backlight/
bonus points for installing 'xbacklight' pkg, and mention if that works too (or not)
I'm not immediately figuring out xbacklight, so no idea whether or not it works.
[wcunning@ozymandius backlight]$ ls -al
drwxr-xr-x. 2 root root 0 Jun 8 14:27 .
drwxr-xr-x. 45 root root 0 Jun 8 14:27 ..
lrwxrwxrwx. 1 root root 0 Jun 8 14:27 acpi_video0 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/backlight/acpi_video0
The kernel backlight interface is there, in any case.
After finding some examples and playing with it a little, I'm pretty sure that xbacklight doesn't work. It doesn't return anything with -get and doesn't accept any sane input for -display, nor does it do anything without options.
So the kernel interface is there and that should be working. Let's see if it's any useful:
$ ls -al /sys/class/backlight/acpi_video0
$ cat /sys/class/backlight/acpi_video0/type
$ cat /sys/class/backlight/acpi_video0/brightness
$ cat /sys/class/backlight/acpi_video0/max_brightness
I won't have time to get back to that laptop until after lunch, but I can tell you that max_brightness is a sane value (I forget what, something under 10 and above 7). If I run echo 3 > /sys/class/backlight/acpi_video0/brightness as root, the screen dims, and I can also turn it back up afterwards or all the way down to zero.
[wcunning@ozymandius ~]$ cd /sys/class/backlight/acpi_video0/
[wcunning@ozymandius acpi_video0]$ ls
actual_brightness bl_power brightness device max_brightness power subsystem type uevent
[wcunning@ozymandius acpi_video0]$ cat actual_brightness
[wcunning@ozymandius acpi_video0]$ cat bl_power
[wcunning@ozymandius acpi_video0]$ cat brightness
[wcunning@ozymandius acpi_video0]$ cat max_brightness
[wcunning@ozymandius acpi_video0]$ cat type
Hmm, in theory this should work, I'm running out of ideas actually what could cause this...
It does work, but only under gnome. I feel like KDE must be getting into a state where it's looking for brightness elsewhere. How might that happen? Also, for some reason, KDE does not associate the brightness up and brightness down keys with brightness (fn + home, fn + end). If I attempt to change the hotkeys for brightness, that app recognizes the fn + home combo, but brightness hotkeys still don't work. Might the two problems be related?
I see the same effect on a Lenovo W520, also running a vanilla F17 installation, with KDE Software Compilation added. The brightness keys work fine in Gnome, but have no effect in KDE.
Again, please post the output of:
$ ls -al /sys/class/backlight/
[root@gort ~]# ls -al /sys/class/backlight/
drwxr-xr-x 2 root root 0 Jun 25 08:42 .
drwxr-xr-x 48 root root 0 Jun 25 08:42 ..
lrwxrwxrwx 1 root root 0 Jun 25 08:42 acpi_video0 -> ../../devices/pci0000:00/0000:00:01.0/0000:01:00.0/backlight/acpi_video0
[root@gort ~]# cat /sys/class/backlight/acpi_video0/type
[root@gort ~]# cat /sys/class/backlight/acpi_video0/brightness
[root@gort ~]# cat /sys/class/backlight/acpi_video0/max_brightness
Previously, I was running with a minimal xorg.conf file, containing the bare minimum:
Option "RegistryDwords" "EnableBrightnessControl=1"
Today, I had the chance to connect a second monitor, and so had to run the nvidia-settings tool to produce an appropriate xorg.conf file.
After running the tool, and remembering to add the EnableBrightnessControl=1 option back in to the resulting xorg.conf file, I found that the Brightness keys on the laptop now work in KDE as well as in Gnome. The first key press does not seem to register at all, but the second and subsequent key presses have the desired effect, increasing or decreasing the brightness as required; additionally, an on-screen 'fuel-gauge' appears indicating what is happening.
So, for me, I think this bug is 'fixed'. I hope this information is of use.
I don't have an xorg.conf at the moment, since I'm using the nouveau driver. Are you using Nvidia or nouveau (sounds like Nvidia)? When I ran into this in F16, I tried both and used the EnableBrightnessControl=1 option with the Nvidia driver, and that didn't help then.
Also, one would think that the kernel interface (echo $val > /sys/class/backlight/acpi_video0/brightness, etc.) wouldn't work if that option wasn't set. Though, that doesn't necessarily make it true.
Created attachment 594275 [details]
Sample xorg.conf from working system
Yes, I am using Nvidia. I switched to this driver using the instructions here:
I've attached my working xorg.conf, FYI.
I'm not saying that the full xorg.conf is a definite solution - but it is the only thing I'm aware of that has changed between the brightness keys not working, then working.
*** This bug has been marked as a duplicate of bug 834910 ***