Bug 246521 - brightness control keys: OSD appears but brightness does not change
Summary: brightness control keys: OSD appears but brightness does not change
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Plasma
Component: widget-battery (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 258179 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-08-02 16:23 UTC by Andreas Kuhl
Modified: 2011-01-13 04:20 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
proposed patch (509 bytes, patch)
2011-01-12 23:39 UTC, Sergey
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kuhl 2010-08-02 16:23:19 UTC
Version:           unspecified (using KDE 4.4.95) 
OS:                Linux

If I use my notebooks (HP Envy 14) screen brightness FN keys, the screen brightness OSD appears (showing the correct level of brightness) but the brightness does not change.

"solid-powermanagement brightness set [value]" works on bash and both "xbacklight -set [value]" work, too. Writing values directly to /sys/class/backlight/i915/brightness also works.

It seems that the battery plasmoid fails to instruct solid to change the brightness level.

If I create custom hotkeys that listen on the keys and assign "xrandr --inc/dec [value]" as action, this is a workaround but naturally the OSD does not appear then.



Reproducible: Always
Comment 1 Rolf 2010-11-26 00:41:04 UTC
I see this bug in KDE 4.5.3. The OSD is shown, but brighness level doesn't change. Changing it with the slider in the battery widget works.
Comment 2 Rolf 2010-11-26 00:44:04 UTC
Forgot to add: seeing this on Kubuntu 10.04 with KDE 4.5.3 from the Backports PPA.
Comment 3 Marco Martin 2010-11-29 17:24:48 UTC
*** Bug 258179 has been marked as a duplicate of this bug. ***
Comment 4 Giorgos Tsiapaliokas 2010-12-24 17:32:09 UTC
my box's specifications are:
Qt: 4.7.1
KDE Development Platform: 4.5.4 (KDE 4.5.4)
os:gentoo ~amd64(testing)
machine:toshiba qosmio f60

in my box with generic kernel i cannot reproduce the bug.
also i tried that bug in openSUSE 11.3 and i can't reproduce it there.
Comment 5 Kai Uwe Broulik 2010-12-31 17:13:03 UTC
This is more likely a bug in your Linux distribution/kernel/whatever than in KDE.
Try starting your system with the kernel parameters “acpi_osi=Linux”. This solves the issue that your brightness cannot be adjustet in most cases.
Comment 6 Giorgos Tsiapaliokas 2011-01-10 10:29:45 UTC
what will happen with the current stauts of the bug?
Comment 7 Sergey 2011-01-12 23:39:03 UTC
Created attachment 55950 [details]
proposed patch

I can confirm that the bug is still there in kde 4.5.5.

Origin
======
Everything worked in KDE 4.4. Regression appeared after fixing the bug #182400.

Reason
======
In http://websvn.kde.org/tags/KDE/4.5.5/kdebase/workspace/solid/hal/halpower.cpp the m_brightnessInHardware variable is set to true by default. That is wrong, because there's no "brightness_in_hardware" property sometimes, in that case it remains true while actually it should be false. And for my laptop there's no such property:

$ qdbus --system \
    org.freedesktop.Hal \
    /org/freedesktop/Hal/Manager \
    org.freedesktop.Hal.Manager.FindDeviceByCapability \
    laptop_panel
/org/freedesktop/Hal/devices/computer_backlight

$ qdbus --system \
    org.freedesktop.Hal \
    /org/freedesktop/Hal/devices/computer_backlight \
    org.freedesktop.Hal.Device.GetPropertyBoolean \
    laptop_panel.brightness_in_hardware
Error: org.freedesktop.Hal.NoSuchProperty
No property laptop_panel.brightness_in_hardware on device with id /org/freedesktop/Hal/devices/computer_backlight

Solution
========
Set it to false by default. Attached "patch" fixed the problem for me, and brightness keys work again.

PS: I guess similar patch should be applied to trunk http://websvn.kde.org/trunk/KDE/kdebase/workspace/powerdevil/daemon/backends/hal/powerdevilhalbackend.cpp as well.
Comment 8 Aaron J. Seigo 2011-01-13 04:19:33 UTC
SVN commit 1214118 by aseigo:

default to false, so if the dbus call fails it will be set to something appropriately pessimistic.
patch by Sergey.
BUG:246521


 M  +1 -1      powerdevilhalbackend.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1214118
Comment 9 Aaron J. Seigo 2011-01-13 04:20:50 UTC
SVN commit 1214119 by aseigo:

default to false, so if the dbus call fails it will be set to something appropriately pessimistic.
patch by Sergey.
BUG:246521


 M  +1 -1      powerdevilhalbackend.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1214119