Bug 49481 - Backlight hotkeys do not trigger scancodes on Asus A8F laptop
Summary: Backlight hotkeys do not trigger scancodes on Asus A8F laptop
Status: CLOSED CODE_FIX
Alias: None
Product: ACPI
Classification: Unclassified
Component: Power-Video (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Aaron Lu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-24 19:39 UTC by Donatas G.
Modified: 2013-03-13 06:36 UTC (History)
3 users (show)

See Also:
Kernel Version: 3.2.0-32-generic-pae
Subsystem:
Regression: No
Bisected commit-id:


Attachments
lspci output (1.93 KB, text/plain)
2012-10-24 19:39 UTC, Donatas G.
Details
dmesg output (57.10 KB, text/plain)
2012-10-24 19:41 UTC, Donatas G.
Details
Output of udevadm info --export-db (110.65 KB, text/plain)
2012-10-24 19:43 UTC, Donatas G.
Details
acpidump output (148.27 KB, text/plain)
2012-11-13 08:09 UTC, Donatas G.
Details

Description Donatas G. 2012-10-24 19:39:46 UTC
Created attachment 84691 [details]
lspci output

I have an issue with the backlight controls on my Asus A8F laptop. I can
change the brightness with the Fn-keys (Fn+F5/F6 in particular). However, when changing the brightness with the Fn-keys, no event is triggered in KDE/X and hence the brightness slider doesn't get adjusted.

I tried monitoring events with xev, but nothing is triggered when I press the
Fn-brightness keys (F5 and F6). Other Fn-keys do trigger events in xev.

Same goes for udev monitoring using

sudo /lib/udev/keymap -i input/event6 - no scancodes from those two combinations. 

Nothing is logged in the dmesg when I do these manipulations. 

But I can monitor what happens when I press the keys with acpi_listen: 

$acpi_listen
[starting from total bright: press Fn+F5]
hotkey ATKD 0000002e 00000023
hotkey ATKD 0000002d 0000001f
hotkey ATKD 0000002c 0000001e
hotkey ATKD 0000002b 0000001d
hotkey ATKD 0000002a 0000001b
hotkey ATKD 00000029 00000018
hotkey ATKD 00000028 00000017
hotkey ATKD 00000027 00000017
hotkey ATKD 00000026 00000017
hotkey ATKD 00000025 00000015
hotkey ATKD 00000024 00000016
hotkey ATKD 00000023 00000010
hotkey ATKD 00000022 0000000f
hotkey ATKD 00000021 0000000e
hotkey ATKD 00000020 00000055
[nearly total dark now: press Fn+F6]
hotkey ATKD 00000011 0000000d
hotkey ATKD 00000012 0000000e
hotkey ATKD 00000013 0000000f
hotkey ATKD 00000014 00000010
hotkey ATKD 00000015 00000017
hotkey ATKD 00000016 00000015
hotkey ATKD 00000017 00000017
hotkey ATKD 00000018 00000017
hotkey ATKD 00000019 00000017
hotkey ATKD 0000001a 00000018
hotkey ATKD 0000001b 0000001b
hotkey ATKD 0000001c 0000001d
hotkey ATKD 0000001d 0000001e
hotkey ATKD 0000001e 0000001f
hotkey ATKD 0000001f 000001c0
[total bright again]

I have also tried this with a newever kernel (on live USB, Kubuntu 12.10), but there the problem exists as well.

Please let me know how I can help to fix this bug.
Comment 1 Donatas G. 2012-10-24 19:41:36 UTC
Created attachment 84701 [details]
dmesg output
Comment 2 Donatas G. 2012-10-24 19:43:10 UTC
Created attachment 84711 [details]
Output of udevadm info --export-db
Comment 3 Donatas G. 2012-10-24 19:44:25 UTC
This bug might be related to bug: https://bugzilla.kernel.org/show_bug.cgi?id=47841 , but some details do not match (like the kernel module loading).
Comment 4 Zhang Rui 2012-11-13 07:03:23 UTC
could you please attach the acpidump output of your laptop.

Corentin,
the asus-laptop driver will ignore the backlight events if there is ACPI video device in the acpi namespace, right?
does this mean that we are expecting there is a notification to the ACPI video device in AML when the hotkey is pressed?
Comment 5 Donatas G. 2012-11-13 08:09:18 UTC
Created attachment 86271 [details]
acpidump output
Comment 6 Corentin Chary 2012-11-13 12:02:42 UTC
Zhang Rui I was pretty sure I had a patch somewhere to always report them. I'll try to find it and send it this week.

If the DSDT send us a backlight key, asus-laptop should relay it, always.
Comment 7 Corentin Chary 2012-11-17 11:27:57 UTC
(In reply to comment #4)
> Corentin,
> the asus-laptop driver will ignore the backlight events if there is ACPI
> video
> device in the acpi namespace, right?
> does this mean that we are expecting there is a notification to the ACPI
> video
> device in AML when the hotkey is pressed?

So, I took another look, and the answer is yes. Most of the time it seems to work. I really don't know what to do here since I suspect that always reporting brightness change will break things on other models (=changing the brightness twice).

Is acpi_video=vendor an option here ?
Comment 8 Donatas G. 2012-11-18 07:34:25 UTC
(In reply to comment #7)

I assume you mean changing grub boot parameters. So I tried adding different strings to variable

GRUB_CMDLINE_LINUX_DEFAULT

in /etc/default/grub file (ran update-grub after each try and reboot):

acpi_backlight=vendor
acpi_osi=Linux acpi_backlight=vendor
acpi_osi=Linux acpi_video=vendor

and nothing changed, The backlight keys are not registered.

These (except for acpi_video) are the things I found on the forums. 

Anything else I could try?
Comment 9 Corentin Chary 2012-11-19 21:20:50 UTC
Could you try this patch ?
https://github.com/iksaif/platform-drivers-x86/commit/c17c33004fe7f9a62f0ce2be3867986e0d4e86bb
Comment 10 Donatas G. 2012-11-22 04:46:29 UTC
The keys work after applygint this patch and rebuilding the acpi4asus kernel modules!
Comment 11 Aaron Lu 2013-03-04 05:31:27 UTC
(In reply to comment #9)
> Could you try this patch ?
>
> https://github.com/iksaif/platform-drivers-x86/commit/c17c33004fe7f9a62f0ce2be3867986e0d4e86bb

What's the status of this commit? Is it upstreamed?
I can't check it as the link is now broken.
Thanks.
Comment 12 Corentin Chary 2013-03-05 07:46:06 UTC
I think the patch has been queued for 3.8.
Comment 13 Corentin Chary 2013-03-05 07:46:49 UTC
Arg no, it was sent for 3.8, and rejected (because the pull request was too late). I don't think Matthew sent them for 3.9 again...
Comment 14 Aaron Lu 2013-03-05 07:56:19 UTC
(In reply to comment #13)
> Arg no, it was sent for 3.8, and rejected (because the pull request was too
> late). I don't think Matthew sent them for 3.9 again...

Thanks for the update.
Can you please re-send the patch and cc me? Ideally, please mention this bugzilla page in the patch's changelog, thanks.

BTW, I can't add Matthew Garrett <matthew.garrett@nebula.com> to cc list, as he is not a registered user of bugzilla...
Comment 15 Aaron Lu 2013-03-08 02:05:41 UTC
Hi Corentin,

Thanks for the update, I saw your email and checked the git log, the following two commits seem to be related:

commit 2740e1bd528771dea9003a1c85f7f8d051c2808d
Author: Corentin Chary <corentin.chary@gmail.com>
Date:   Thu Nov 29 09:12:39 2012 +0100

    asus-laptop: always report brightness key events
    
    Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
    Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>

commit 3ba0302bdd57d225b52c4b4b36975196c1572b3f
Author: Corentin Chary <corentin.chary@gmail.com>
Date:   Thu Nov 29 09:12:38 2012 +0100

    asus-wmi: always report brightness key events
    
    Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
    Signed-off-by: Matthew Garrett <matthew.garrett@nebula.com>

Please go ahead to close this bug, thanks.
Comment 16 Aaron Lu 2013-03-13 06:36:30 UTC
Assign to me to close it.

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