Bug 25922 - IdeaPad Y530 brightness keys not functioning
IdeaPad Y530 brightness keys not functioning
Status: CLOSED CODE_FIX
Product: Drivers
Classification: Unclassified
Component: Platform_x86
All Linux
: P1 normal
Assigned To: drivers_platform_x86@kernel-bugs.osdl.org
:
Depends on:
Blocks: 21782 56331
  Show dependency treegraph
 
Reported: 2010-12-30 12:48 UTC by Tomasz
Modified: 2013-04-09 06:23 UTC (History)
7 users (show)

See Also:
Kernel Version: 2.6.37-rc8
Tree: Mainline
Regression: Yes


Attachments
dmesg (60.11 KB, text/plain)
2010-12-30 12:49 UTC, Tomasz
Details
lsmod (4.30 KB, text/plain)
2010-12-30 12:50 UTC, Tomasz
Details
acpidump (291.77 KB, application/octet-stream)
2011-02-10 10:30 UTC, Tomasz
Details
ideapad-y530.patch (507 bytes, patch)
2011-02-21 10:41 UTC, Ike Panhc
Details | Diff
0001-ideapad-read-brightness-setting-when-have-brightness.patch (1.19 KB, patch)
2011-02-23 03:04 UTC, Ike Panhc
Details | Diff

Description Tomasz 2010-12-30 12:48:10 UTC
After increasing/decreasing brightness by "Fn+Up/Down" it changes by some value and after that keys are not responding (not making any change).
Modifying brighntness value by:
echo 0 > /sys/class/backlight/acpi_video0/brightness
works good.

Latest kernel that I tried where the issue no occurs was 2.6.36.2.
Comment 1 Tomasz 2010-12-30 12:49:13 UTC
Created attachment 41922 [details]
dmesg
Comment 2 Tomasz 2010-12-30 12:50:27 UTC
Created attachment 41932 [details]
lsmod
Comment 3 Zhang Rui 2010-12-31 01:15:56 UTC
please attach the acpidump output of this laptop.

(In reply to comment #0)
> After increasing/decreasing brightness by "Fn+Up/Down" it changes by some value
> and after that keys are not responding (not making any change).
>
I'm not quite clear about the problem.
do you mean the hotkey works well at the beginning, but then it doesn't work any more.
question: when the keys are not responding, do you see the value change in /sys/class/backlight/acpi_video0/actual_brightness?
and do you see the value change when the keys are still working?
Comment 4 Zhang Rui 2010-12-31 01:17:07 UTC
Oh, as this is a regression, could you please verify if reverting 39fe394d05be43481ceac8b3db19dfd5189097f6 helps?
Comment 5 Tomasz 2010-12-31 13:34:38 UTC
Yes, the hotkey works only once. For example the value changes from initial "4" to "5" and then isn't changing anymore. 
Reverting drivers/acpi/video.c didn't helped, but reverting the file drivers/platform/x86/ideapad-laptop.c to the state from commit 2016e4a0a1c49b68c9d820e28dadab7080c45d1b (it was ideapad_acpi.c then) makes it working again.
I didn't tried later patches, so I don't know which commit brakes it.
Comment 6 Zhang Rui 2011-01-04 00:39:42 UTC
seems this is a platform driver regression. :)
Comment 7 Florian Mickler 2011-02-09 05:41:02 UTC
What does that mean? How will it be resolved?
Comment 8 Ike Panhc 2011-02-10 09:44:38 UTC
Could you try it again after "rmmod ideapad_laptop"? In the mean time, I will see see if I miss anything when initial ideapad-laptop.

And the acpidump output will be helpful.
Comment 9 Tomasz 2011-02-10 10:29:45 UTC
Removing module doesn't help. I must blacklist it to prevent loading at start, then keys are working again. Maybe this is related to https://bugzilla.kernel.org/show_bug.cgi?id=23402 . It's the same machine.
Comment 10 Tomasz 2011-02-10 10:30:59 UTC
Created attachment 47112 [details]
acpidump
Comment 11 Ike Panhc 2011-02-21 10:41:20 UTC
Created attachment 48542 [details]
ideapad-y530.patch

Hi,

I go through the DSDT but can not find anything interested me.

If you have to blacklist it to prevent this bug happened, it shall be something when module initial. There are only two kind of ACPI methods when initial, the _CFG and those probe for rfkill status methods.

Please try the attached patch. It will not run _CFG when initial and assume wifi and BT are present. It shall help me telling which part cause regression.

Thanks a lot.
Comment 12 Tomasz 2011-02-21 16:40:56 UTC
This patch fixes it.
Comment 13 Florian Mickler 2011-02-21 22:07:46 UTC
Patch: https://bugzilla.kernel.org/attachment.cgi?id=48542
Comment 14 Matthew Garrett 2011-02-21 22:13:24 UTC
That doesn't seem like an ideal solution. Exposing rfkill devices that don't exist in hardware will confuse userspace, so we do ideally need to figure out why _CFG is breaking brightness control and continue to call it.
Comment 15 Ike Panhc 2011-02-22 02:06:09 UTC
Hi Matthew,

This is not a solution. Just help me figure out which DSDT method cause the problem.
Comment 16 Matthew Garrett 2011-02-22 02:28:16 UTC
Ok - in that case can you leave it as assigned rather than resolved? Thanks!
Comment 17 Florian Mickler 2011-02-22 08:32:16 UTC
Ignore-Patch: https://bugzilla.kernel.org/attachment.cgi?id=48542
Comment 18 Ike Panhc 2011-02-23 03:04:40 UTC
Created attachment 48702 [details]
0001-ideapad-read-brightness-setting-when-have-brightness.patch

Please take a try on this patch. This patch shall fix this issue and wont affect other ideapads. I have tried on ideapad B550 and S10-3, nothing different. Once the patch is confirmed working, I believe it is ok for upstream kernel.
Comment 19 Tomasz 2011-02-23 12:06:07 UTC
Yes it's working.
Thanks.
Comment 20 Ike Panhc 2011-02-23 13:43:03 UTC
https://patchwork.kernel.org/patch/584191/
Comment 21 Ike Panhc 2011-02-23 13:44:05 UTC
Patch is sent to mailing list for reviewing
Comment 22 Rafael J. Wysocki 2011-02-23 19:32:51 UTC
Patch : https://patchwork.kernel.org/patch/584191/
Handled-By : Ike Panhc <ikepanhc@gmail.com>
Comment 23 Rafael J. Wysocki 2011-03-06 12:32:14 UTC
Ignore-Patch : https://patchwork.kernel.org/patch/584191/
Patch : https://bugzilla.kernel.org/attachment.cgi?id=48702
Comment 24 Florian Mickler 2011-03-29 00:34:35 UTC
A patch referencing this bug report has been merged in v2.6.38-9043-gc585015:

commit 883ae7992c09435927dda642b61f1455fceb5b85
Author: Ike Panhc <ike.pan@canonical.com>
Date:   Wed Feb 23 21:39:59 2011 +0800

    ideapad: read brightness setting on brightness key notify
Comment 25 Florian Mickler 2011-03-29 00:35:48 UTC
A patch referencing this bug report has been merged in v2.6.38-9043-gc585015:

commit 2165136585b5c7d6f118f1d90fbde550bb7de212
Author: Ike Panhc <ike.pan@canonical.com>
Date:   Wed Feb 23 21:39:59 2011 +0800

    ideapad: read brightness setting on brightness key notify

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