Bug 199463

Summary: Internal keyboard broken on Acer CB3-431 Chromebook (Edgar)
Product: Drivers Reporter: Sultan Alsawaf (sultan)
Component: Input DevicesAssignee: Mika Westerberg (mika.westerberg)
Status: RESOLVED PATCH_ALREADY_AVAILABLE    
Severity: normal CC: andy.shevchenko, mika.westerberg, william
Priority: P1    
Hardware: Intel   
OS: Linux   
URL: https://marc.info/?l=linux-gpio&m=152416908323651
Kernel Version: 4.16+ Subsystem:
Regression: Yes Bisected commit-id:
Bug Depends on: 194945    
Bug Blocks:    
Attachments: dmidecode
proc-interrupts-before-revert
proc-interrupts-after-revert
dmesg-before-revert
dmesg-after-revert
acpidump
Patch to manually associate IRQ numbers
dmesg-with-patch
proc-interrupts-with-patch

Description Sultan Alsawaf 2018-04-22 16:34:46 UTC
Commit 03c4749dd6c7ff948a0ce59a44a1b97c015353c2 ("gpio / ACPI: Drop unnecessary ACPI GPIO to Linux GPIO translation"), introduced in 4.16, broke the internal keyboard on the Acer CB3-431 Chromebook. Reverting this commit fixes the internal keyboard.

/proc/interrupts before revert (broken keyboard): https://hastebin.com/okobutalek.sql
/proc/interrupts after revert (working keyboard): https://hastebin.com/ixuciyigat.sql
acpidump: https://hastebin.com/usowawiduk.pl
Comment 1 Sultan Alsawaf 2018-04-22 16:57:07 UTC
dmesg before revert: https://hastebin.com/wojetoxeni.vbs
dmesg after revert: https://hastebin.com/sanabeduda.vbs
Comment 2 Mika Westerberg 2018-04-23 10:38:34 UTC
This is another system that hardcodes Linux IRQ number:

                   Device (PS2K)
                    {
                        Name (_CRS, ResourceTemplate ()
                        {   
                            ...
                            Interrupt (ResourceConsumer, Edge, ActiveLow, Exclusive, ,, )
                            {   
                                0x000000B6,
                            }
                        })

Can you attach output of dmidecoce as well?
Comment 3 Sultan Alsawaf 2018-04-23 19:14:42 UTC
Created attachment 275533 [details]
dmidecode
Comment 4 Sultan Alsawaf 2018-04-23 19:15:33 UTC
Created attachment 275535 [details]
proc-interrupts-before-revert
Comment 5 Sultan Alsawaf 2018-04-23 19:15:54 UTC
Created attachment 275537 [details]
proc-interrupts-after-revert
Comment 6 Sultan Alsawaf 2018-04-23 19:16:41 UTC
Created attachment 275539 [details]
dmesg-before-revert
Comment 7 Sultan Alsawaf 2018-04-23 19:17:11 UTC
Created attachment 275541 [details]
dmesg-after-revert
Comment 8 Sultan Alsawaf 2018-04-23 19:17:41 UTC
Created attachment 275543 [details]
acpidump
Comment 9 Sultan Alsawaf 2018-04-23 19:18:17 UTC
(In reply to Mika Westerberg from comment #2)
> This is another system that hardcodes Linux IRQ number:
> 
>                    Device (PS2K)
>                     {
>                         Name (_CRS, ResourceTemplate ()
>                         {   
>                             ...
>                             Interrupt (ResourceConsumer, Edge, ActiveLow,
> Exclusive, ,, )
>                             {   
>                                 0x000000B6,
>                             }
>                         })
> 
> Can you attach output of dmidecoce as well?

Attached the output of dmidecode, along with the other files for historical reasons.
Comment 10 Mika Westerberg 2018-04-24 13:45:19 UTC
Created attachment 275551 [details]
Patch to manually associate IRQ numbers

Can you try the attached patch if it makes any difference?
Comment 11 Sultan Alsawaf 2018-04-24 14:52:59 UTC
(In reply to Mika Westerberg from comment #10)
> Created attachment 275551 [details]
> Patch to manually associate IRQ numbers
> 
> Can you try the attached patch if it makes any difference?

The attached patch works.
Comment 12 Mika Westerberg 2018-04-24 15:06:38 UTC
Great. Can you attach output of /proc/interrupts and dmesg after you have applied the patch?
Comment 13 Mika Westerberg 2018-04-24 15:08:56 UTC
Also please check that the touchpad and audio codec still work.
Comment 14 Sultan Alsawaf 2018-04-24 15:18:09 UTC
Created attachment 275553 [details]
dmesg-with-patch
Comment 15 Sultan Alsawaf 2018-04-24 15:18:36 UTC
Created attachment 275555 [details]
proc-interrupts-with-patch
Comment 16 Sultan Alsawaf 2018-04-24 15:19:55 UTC
(In reply to Mika Westerberg from comment #12)
> Great. Can you attach output of /proc/interrupts and dmesg after you have
> applied the patch?

Done.

(In reply to Mika Westerberg from comment #13)
> Also please check that the touchpad and audio codec still work.

Touchpad and audio codec are functional.
Comment 17 Mika Westerberg 2018-04-25 10:32:59 UTC
Thanks for testing. I just sent the patch upstream.
Comment 18 Sultan Alsawaf 2018-04-25 15:04:22 UTC
Awesome. Will this make its way into linux-stable as well?
Comment 19 Mika Westerberg 2018-04-25 15:09:53 UTC
There is "Fixes:" tag so it should go if Linus W. decides so.