Bug 830292 - KDE Brightness Control Problem
KDE Brightness Control Problem
Status: CLOSED DUPLICATE of bug 834910
Product: Fedora
Classification: Fedora
Component: kde-workspace (Show other bugs)
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Lukáš Tinkl
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-06-08 14:38 EDT by William Cunningham
Modified: 2015-07-13 13:35 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-07-09 04:49:59 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Sample xorg.conf from working system (2.60 KB, text/plain)
2012-06-25 16:27 EDT, Adrian Warman
no flags Details

  None (edit)
Description William Cunningham 2012-06-08 14:38:57 EDT
Brief Description:
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

How reproducible:
Hardware specific, unsure. Exists instantly on installed system.

Steps to Reproduce:
1. Get a Thinkpad T61 with NVidia card
2. Install Fedora KDE
Actual results:
Brightness does not toggle at all.

Expected results:
Brightness toggles from fn + home, fn + end.
Comment 1 Rex Dieter 2012-06-08 15:18:58 EDT
What's the output from:  

ls -al /sys/class/backlight/

bonus points for installing 'xbacklight' pkg, and mention if that works too (or not)
Comment 2 William Cunningham 2012-06-08 15:35:20 EDT
I'm not immediately figuring out xbacklight, so no idea whether or not it works.

[wcunning@ozymandius backlight]$ ls -al
total 0
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
Comment 3 Kevin Kofler 2012-06-08 17:06:40 EDT
The kernel backlight interface is there, in any case.
Comment 4 William Cunningham 2012-06-08 17:08:48 EDT
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.
Comment 5 Lukáš Tinkl 2012-06-11 09:22:24 EDT
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
Comment 6 William Cunningham 2012-06-11 09:26:19 EDT
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.
Comment 7 William Cunningham 2012-06-13 12:44:56 EDT
[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
Comment 8 Lukáš Tinkl 2012-06-18 04:53:01 EDT
Hmm, in theory this should work, I'm running out of ideas actually what could cause this...
Comment 9 William Cunningham 2012-06-18 13:34:50 EDT
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?
Comment 10 Adrian Warman 2012-06-24 17:38:29 EDT
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.
Comment 11 Lukáš Tinkl 2012-06-25 05:03:31 EDT
Again, please post the output of:

$ ls -al /sys/class/backlight/
Comment 12 Adrian Warman 2012-06-25 05:24:35 EDT
No problem:

[root@gort ~]# ls -al /sys/class/backlight/
total 0
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
Comment 13 Adrian Warman 2012-06-25 15:51:57 EDT
Interesting update.

Previously, I was running with a minimal xorg.conf file, containing the bare minimum:
Section "Device"
        Identifier  "Videocard0"
        Driver      "nvidia"
        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.
Comment 14 William Cunningham 2012-06-25 16:15:11 EDT
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.
Comment 15 William Cunningham 2012-06-25 16:18:40 EDT
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.
Comment 16 Adrian Warman 2012-06-25 16:27:07 EDT
Created attachment 594275 [details]
Sample xorg.conf from working system
Comment 17 Adrian Warman 2012-06-25 16:30:07 EDT
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.
Comment 18 Lukáš Tinkl 2012-07-09 04:49:59 EDT

*** This bug has been marked as a duplicate of bug 834910 ***

Note You need to log in before you can comment on or make changes to this bug.