Bug 296403 - PowerDevil does not choose the correct brightness interface
Summary: PowerDevil does not choose the correct brightness interface
Status: RESOLVED UPSTREAM
Alias: None
Product: solid
Classification: Frameworks and Libraries
Component: powermanagement (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: 4.11
Assignee: Dario Freddi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-20 01:53 UTC by contacto
Modified: 2015-02-16 12:35 UTC (History)
16 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description contacto 2012-03-20 01:53:31 UTC
The brightness controller that works on my laptop is /sys/class/backlight/acpi_video0 but PowerDevil uses /sys/class/backlight/toshiba. So PowerDevil can't control the brightness. I need to select the correct interface.

My laptop is a Toshiba L735. Thanks.
Comment 1 Gustavo Alvarez 2012-03-21 22:16:14 UTC
*** This bug has been confirmed by popular vote. ***
Comment 2 Dimitris Damigos 2012-09-30 18:04:53 UTC
I have the same problem with different interfaces. My actual backlight is controlled by /sys/class/backlight/nv_backlight provided by nouveau, but powerdevil controls /sys/class/backlight/sony provided by sony-laptop module. nv_backlight is type raw and sony is type platform, which powerdevil prefers. I changed the order in backlighthelper.cpp and rebuilt and now everything works as expected. I can also blacklist sony-laptop,  but then the Fn+F5, Fn+F6 don't work.
I see these problems arise all the time and I think that there should be a hidden option (f.e. a conf file) that would force powerdevil to control a specific interface.
Comment 3 Michael Braxner 2012-10-10 17:29:08 UTC
I have a similar problem with an NVidia GT 650M on a MacBook Pro Retina 10,1, using the NVidia proprietary driver (304.51). 

The backlight control is handled via gmux, i.e. /sys/class/backlight/gmux_backlight, and the driver (apple-gmux.c) un-registers all other backlight controls on starting up. 

powerdevil ought to detect this change, and utilise the fully functioning gmux_backlight, but it instead appears to be stuck on the no longer registered, and thus no longer present, acpi_video1.

Preventing apple-gmux from un-registering all other controls opens the possibility to synchronize changes in acpi_video1/brightness to gmux_backlight/brightness via a simple enough script ... but this just should not be necessary.
Comment 4 Donatas Glodenis 2012-10-17 19:04:56 UTC
How do I find out which backlight interface Powerdevil uses in my case? 

In my case, in Asus A8F laptop (Intel GMA, the brightness is controlled via /sys/class/backlight/asus_laptop/brightness (you can cat different values into it), and Fn+ brightness keys work as expected. But Powerdevil does not detect screen brightness and cannot control it. The full lshw output for my laptop is here: https://dl.dropbox.com/u/4047484/Asus_A8F-HWspecs.html , and I am using Kubuntu 12.04 with KDE 4.9.2, Kubuntu PPA packages. Although this problem is present for some time now, perhaps more than a year.
Comment 5 Lev Lybin 2012-11-12 19:29:06 UTC
I have the same problem.
It's work:
echo 0-7 > /sys/class/backlight/acpi_video0/brightness
# ls /sys/class/backlight/acpi_video0/
actual_brightness  bl_power  brightness  device  max_brightness  power  subsystem  type  uevent

My notebook samsung R730. In Gnome all works, for example.
Kernel: 3.6.6
Archlinux
Nvidia: 304.64
KDE: 4.9.3

https://bugs.kde.org/show_bug.cgi?id=308757#c7
Comment 6 Piotr Porada 2012-11-29 08:08:00 UTC
I have the same issue, as Comment #5

System: Archlinux
Kernel 3.6.7
Nvidia: 310.19
KDE:4.9.3

Hardware is Samsung R580 with GF330M

Backlight setting in KDE works with nouveau driver.
Comment 7 Yamashita Ren 2013-01-21 11:48:00 UTC
The very same as Comment #5 and #6 too

System : Fedora 18
Kernel : 3.7.2
Nvidia : 304.64
KDE : 4.9.5

My Laptop is a Sony VPCF23 with GF108
Comment 8 Lev Lybin 2013-01-26 08:32:18 UTC
Archlinux, kernel 3.7.4, nvidia 313.18, xorg 1.13.2 - earned!
Comment 9 Yamashita Ren 2013-01-28 13:02:58 UTC
Comment #8 confirmed !
PowerDevil works with F18, KDE 4.9.5, kernel 3.7.4 and nvidia 313.18 !
Comment 10 Selo 2013-01-29 20:35:08 UTC
Nothing changed here. Still fn keys and echo 4 > /sys/class/backlight/acpi_video0/brightness work but PowerDevil does not. Archlinux, KDE 4.9.5, kernel 3.7.4 and nvidia 313.18
Comment 11 Lev Lybin 2013-01-29 20:39:59 UTC
(In reply to comment #10)
> Nothing changed here. Still fn keys and echo 4 >
> /sys/class/backlight/acpi_video0/brightness work but PowerDevil does not.
> Archlinux, KDE 4.9.5, kernel 3.7.4 and nvidia 313.18

In xorg exists section with option? I have the same configuration of the system.
Section "Screen"
...
    Option         "RegistryDwords" "EnableBrightnessControl=1"
...
EndSection
Comment 12 Selo 2013-01-29 20:53:17 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > Nothing changed here. Still fn keys and echo 4 >
> > /sys/class/backlight/acpi_video0/brightness work but PowerDevil does not.
> > Archlinux, KDE 4.9.5, kernel 3.7.4 and nvidia 313.18
> 
> In xorg exists section with option? I have the same configuration of the
> system.
> Section "Screen"
> ...
>     Option         "RegistryDwords" "EnableBrightnessControl=1"
> ...
> EndSection

I did not have it there,  just added & rebooted and still no change. This is what "Screen" section looks like in xorg.conf

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
    Option "RegistryDwords" "EnableBrightnessControl=1"
EndSection
Comment 13 Dmitry Pisklov 2013-01-29 22:18:12 UTC
Selo, this is wrong config.

Here's how it should be:
Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    Option         "NoLogo" "true"
    Option         "RegistryDwords" "EnableBrightnessControl=1"

EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection
Comment 14 Dmitry Pisklov 2013-01-29 22:20:05 UTC
Brightness control is working fine, both via Fn and PowerDevil. 
kernel 3.6.11-gentoo , KDE 4.9.5, nvidia 313.18
Comment 15 Selo 2013-01-29 22:35:12 UTC
I've removed that line from "Screen" section and added to "Device" section yet the issue still exists for me. I cannot set brightness via PowerDevil.
Comment 16 Piotr Porada 2013-01-30 17:40:52 UTC
I can confirm, that with Archlinux kernel 3.7.4, nvidia 313.18, xorg 1.13.2 and kde 4.9.5 brightness control seems to be working fine
Comment 17 Szentandrasi Istvan 2013-02-01 09:52:07 UTC
Did you guys changed anything else? I have kernel 3.7.5, nvidia 313.18, xorg 1.13.2, kde 4.9.5 and the function keys do not work, neither the brightness settings through powerdevil. I added the line to enable brightness into /etc/xorg.conf.d/20-nvidia.conf into the device section. No luck.
I have HP EliteBook 8560w.
Comment 18 pru 2013-02-22 11:03:33 UTC
I use KDE with Fedora 18 on asus n76vz.
What I observe is that brightness slider in power settings is very random in a way that whenever it is moved it changes brightness displaying 90%-93%. The same behaviour with Fn+ keys, pressing them gives the same random effect (although visible).
Manual echo to /sys/class/backlight/asus_laptop/brightness gives proper results (it ranges from min 0 to max about 4k, I don't remember exact value).
Since I set brightness via /sys, after few seconds it gets back to the value about 90%.
This behaviour suggests that the /sys part is working well, but whatever uses it (a powerdevil?) is doing some wrong calculations.
Comment 19 Alex Fiestas 2013-03-12 13:00:58 UTC
A change that has make this work for a few people went into 4.10 and will be released as part of 4.10.2

Can anybody test it (using 4.10 from repository) ? if not I will comment again once 4.10.2 is out.
Comment 20 Dimitris Damigos 2013-03-13 14:50:53 UTC
I have just tested it and it doesn't work. See comment 2 for my case
Comment 21 Szentandrasi Istvan 2013-04-06 09:36:46 UTC
I have tested for 4.10.2, nvidia 313.30 and kernel 3.8.5 on Archlinux. Finally it works. Thanks
Comment 22 Selo 2013-04-06 09:58:21 UTC
This issue is fixed for me, too. Plasma 4.10.2 and nividia drivers 313.30
Comment 23 Donatas Glodenis 2013-04-07 05:20:46 UTC
In my case upgrade to KDE 4.10.2 did not fix the problem, my hw specs are above.
Comment 24 Branimir Amidzic 2013-04-08 20:47:35 UTC
For me, KDE 4.10.1, nvidia 313.30 and kernel-3.8.6 doesn't fix this issue.
Comment 25 Alex Fiestas 2013-04-10 09:56:27 UTC
@Branimir you need 4.10.2
Comment 26 pru 2013-04-29 15:42:07 UTC
(In reply to comment #18)
No change with the latest update to 4.10.2.
Comment 27 Branimir Amidzic 2013-05-04 09:32:49 UTC
Fixed for me with 4.10.2.
Thanks!
Comment 28 sparhawk 2013-05-19 01:04:56 UTC
For me, upgrading to Kubuntu 13.04 has *broken* this. Previously (Kubuntu 12.10) PowerDevil worked perfectly, if I put "acpi_backlight=vendor" in the grub options.

Now, when /etc/default/grub contains
    GRUB_CMDLINE_LINUX_DEFAULT="acpi_backlight=vendor"
/sys/class/backlight/ contains dell_backlight and intel_backlight. Pressing the brightness keys does nothing to the display, but modifies the value in dell_backlight/brightness . However, if I manually modify the values in intel_backlight/brightness , the backlight changes as expected.

If I modify /etc/default/grub to contain
    GRUB_CMDLINE_LINUX_DEFAULT=""
/sys/class/backlight/ now contains acpi_video0 , acpi_video1 and intel_backlight . Now, the brightness keys do work (somewhat), and the value of acpi_video1/brightness is modified.

However, "acpi_backlight=vendor" gives me more control over the backlight. For example, I can reduce the backlight down to 0% and have the screen turn off. Without this grub option, when I reduce acpi_video1/brightness to 0 with the brightness keys, the backlight is still on. Hence, it seems that in theory, the brightness keys should modify intel_backlight instead of acpi_video1.
Comment 29 pru 2013-09-05 11:33:21 UTC
Fedora 19 update to kde 4.10.5 solved problem for me.
Comment 30 Kai Uwe Broulik 2015-02-16 12:35:38 UTC
Driver/Kernel issue