Bug 217718
Summary: | IRQ override revert breaks keyboard on Lenovo Yoga 7 14ARB7 | ||
---|---|---|---|
Product: | ACPI | Reporter: | August Wikerfors (git) |
Component: | Config-Interrupts | Assignee: | Mario Limonciello (AMD) (mario.limonciello) |
Status: | ASSIGNED --- | ||
Severity: | normal | CC: | dmimatth, ef.em.carbonell, fabien, fiat.vendo, fry86297, git, limblendokin, lxy.lixiaoyan, mario.limonciello, paul.spedding, r1nlx0, vishalrao, xihu0208 |
Priority: | P3 | ||
Hardware: | AMD | ||
OS: | Linux | ||
Kernel Version: | Subsystem: | ||
Regression: | Yes | Bisected commit-id: | a9c4a912b7dc7ff922d4b9261160c001558f9755 |
Attachments: |
dmidecode
acpidump (DSDT and SSDT tables) potential patch (v1) /sys/firmware/acpi/tables/APIC dmesg possible patch dmesg with v0.2 irq whitelist for lenovo laptops patches for some Lenovo laptops |
Description
August Wikerfors
2023-07-27 16:36:30 UTC
Created attachment 304712 [details]
acpidump (DSDT and SSDT tables)
Created attachment 304713 [details]
potential patch (v1)
Here is a patch that I think should help, can you please confirm?
(In reply to Mario Limonciello (AMD) from comment #2) > Created attachment 304713 [details] > potential patch (v1) > > Here is a patch that I think should help, can you please confirm? Unfortunately it doesn't fix the problem. Can you please attach your MADT (/sys/firmware/acpi/tables/APIC) and a dmesg with the current patch applied? Created attachment 304716 [details]
/sys/firmware/acpi/tables/APIC
Here is the APIC, will get a dmesg soon
No interrupt source overrides in your MADT for IRQ 1. Need to see your dmesg.
> [0C4h 0196 1] Subtable Type : 02 [Interrupt Source Override]
> [0C5h 0197 1] Length : 0A
> [0C6h 0198 1] Bus : 00
> [0C7h 0199 1] Source : 00
> [0C8h 0200 4] Interrupt : 00000002
> [0CCh 0204 2] Flags (decoded below) : 0000
> Polarity : 0
> Trigger Mode : 0
>
> [0CEh 0206 1] Subtable Type : 02 [Interrupt Source Override]
> [0CFh 0207 1] Length : 0A
> [0D0h 0208 1] Bus : 00
> [0D1h 0209 1] Source : 09
> [0D2h 0210 4] Interrupt : 00000009
> [0D6h 0214 2] Flags (decoded below) : 000F
> Polarity : 3
> Trigger Mode : 3
>
Created attachment 304717 [details]
dmesg
Here is the dmesg
Created attachment 304719 [details] possible patch > [ 0.332929] ACPI: IRQ 1 override to edge, high(!) OK I believe it's because it wasn't matching because I had level but your DSDT had edge. I've modified it, can you try again? Created attachment 304723 [details]
dmesg with v0.2
Unfortunately that doesn't work either. I've attached the new dmesg.
I added this in acpi_dev_get_irqresource > pr_warn("triggering = %hhd, polarity = %hhd, shareable = %hhd", triggering, > polarity, shareable); and it printed > triggering = 1, polarity = 1, shareable = 1 so I think the shareable field should be 1 instead of 0. I'll compile that and check This works:
> { lenovo_laptop, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1, false}
Thanks! Submitted https://lore.kernel.org/linux-acpi/20230728183921.17230-1-mario.limonciello@amd.com/T/#u This revert also affects ASUS laptops, namely the Zenbook S 13 OLED UM5302TA. I can no longer use the built-in keyboard after upgrading the kernel. (In reply to XiaoYan Li from comment #13) > This revert also affects ASUS laptops, namely the Zenbook S 13 OLED UM5302TA. > I can no longer use the built-in keyboard after upgrading the kernel. See https://bugzilla.kernel.org/show_bug.cgi?id=217726 Hi it seems this also affects another Lenovo notebook for me it's `Yoga Slim 7 proX 14ARH7`. For the dmidecode
> Manufacturer: LENOVO
> Product Name: 82TL
> Version: Yoga Slim 7 proX 14ARH7
Thank you
Ok, it seems the patches from this thread doesn't apply to all Lenovo Notebook, since after I try to apply it in my current notebook, it doesn't work (the keyboard still doesn't work). I'll try to add this line & retry to rebuild it again.
> pr_warn("triggering = %hhd, polarity = %hhd, shareable = %hhd", triggering,
> polarity, shareable);
While you guys at it, please add my laptop too, see: https://bbs.archlinux.org/viewtopic.php?pid=2045467#p2045467. Or should I open a new bug report specifically for my model? Also, now that I mentioned the post, there are many other laptops (and people) out there also effected by this problem. Not really sure a whitelist is a good solution. Also also, Mario Limonciello is here too? AMD should really give you a raise or something, you guys are the only reason that I'm keeping myself from bad mouthing AMD at every possible chances. (In reply to r1nlx0 from comment #15) > Hi it seems this also affects another Lenovo notebook for me it's `Yoga Slim > 7 proX 14ARH7`. For the dmidecode > > > Manufacturer: LENOVO > > Product Name: 82TL > > Version: Yoga Slim 7 proX 14ARH7 > > Thank you Hmm, it seems I should use `dmidecode -s baseboard-product-name` rather than `dmidecode -s system-product-name` for identifying `DMI_BOARD_NAME`, thus I'll try to build the patches with > + { > + .ident = "Yoga Slim 7 proX 14ARH7", > + .matches = { > + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), > + DMI_MATCH(DMI_BOARD_NAME, "LNVNB161216"), > + }, > + }, can confirm the same issue affects my Lenovo IdeaPad 5 Pro:
> Manufacturer: LENOVO
> Product Name: 82SN
> Version: IdeaPad 5 Pro 16ARH7
the keyboard worked fine up to and including Archlinux's `linux-6.4.6`, stopped working after upgrading to `6.4.7`, and now `6.4.8` is available and the issue is still present.
also, this thread focuses a lot on Lenovo Yoga, and aforementioned #217726 focuses on some ASUS laptops, but it seems that the issue is the same and more laptop models are affected.
Created attachment 304782 [details]
irq whitelist for lenovo laptops
Hi Mario, would you mind to add this patches to the upstream ? This patches adds the whitelist for `Yoga Slim 7 proX 14ARH7`. It's tested in my notebook and it works. Thank you.
(In reply to r1nlx0 from comment #20) > Created attachment 304782 [details] > irq whitelist for lenovo laptops > > Hi Mario, would you mind to add this patches to the upstream ? This patches > adds the whitelist for `Yoga Slim 7 proX 14ARH7`. It's tested in my notebook > and it works. Thank you. Lenovo has used the board name "LNVNB161216" on lots of models, even Intel ones, going back to at least 2017: https://lore.kernel.org/all/?q=LNVNB161216 So it seems risky to match on that. Can you try the product name instead: > DMI_MATCH(DMI_PRODUCT_NAME, "82TL"), Thank you August, I'll try to rebuild it again based on your recommendation. Created attachment 304787 [details]
patches for some Lenovo laptops
Hi August, Mario & mitchie,
Here, I attach new patches that includes :
- Lenovo Yoga 7 14ARB7
- Yoga Slim 7 proX 14ARH7
- IdeaPad 5 Pro 16ARH7
NOTE: I only tests the patches for `Yoga Slim 7 proX 14ARH7` and it works too. Thank you for the helps & guidances in here.
Can you guys please see if this works? diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c index 1dd8d5aebf678..b74d7d8cc8630 100644 --- a/drivers/acpi/resource.c +++ b/drivers/acpi/resource.c @@ -19,7 +19,7 @@ #include <linux/dmi.h> #ifdef CONFIG_X86 -#define valid_IRQ(i) (((i) != 0) && ((i) != 2)) +#define valid_IRQ(i) ((i) > 2) static inline bool acpi_iospace_resource_valid(struct resource *res) { /* On X86 IO space is limited to the [0 - 64K] IO port range */ Hi Mario, I'm sorry since I don't have knowledge in kernel development, did the patches that you propose has other non-local side-effects ? (if i skims, it will calls `irqresource_disabled`, in impacted Lenovo, I assume irq 1 probably always pointing to i8042, thus > 2 condition). Thank you Hi, guys,
Not sure if its right place, but it seems, that this issue affects Redmi Book Pro 15 2022 as well
Here is dmidecode
> System Information
> Manufacturer: TIMI
> Product Name: Redmi Book Pro 15 2022
> Version:
> SKU Number: TM2113-39463
> Family: Mi Laptop
>
> Base Board Information
> Manufacturer: TIMI
> Product Name: TM2113
> Version: V24H2
The patch in comment 24 worked for some of my stuff, but not everything. It will not be the way we solve it. Also affects Lenovo Ideapad Slim 3, with AMD 7520U CPU, model 82XQ No touchpad, no keyboard except FN keys. Not sure weather to create a new thread. A bunch of our new laptops for our new starting staff are paperweights at the moment. They work with a USB keyboard and mouse but doing so removes the point of a laptop being portable. I've tried Kernel 6.1.46 and upgraded to 6.4.11 and neither worked. Can you still reproduce it on 6.5-rc7? If so, open up a new issue and gather all the details. If you can't, then we probably need to backport more patches to the stable trees for this issue. Can confirm it is fixed in 6.5.0-rc7 for the Yoga Slim 7 proX 14ARH7. Can confirm it is fixed in 6.5.0-rc7 for the Redmi Book Pro 15 2022 as well. Thanks to everyone involved! I am using Asus Zenbook S13 OLED. I could see the keyboard problem on 6.4.8 kernels but I don't see the keyboard problem on 6.1.38 and 6.5.0-rc7. Thanks for fixing the problem. Hello, everyone. The keyboard on the following laptop is also affected: > System Information > Manufacturer: Eluktronics Inc. > Product Name: RP-15 > Version: Standard > SKU Number: RP-15 G2 > Family: RP Family > Base Board Information > Manufacturer: Eluktronics > Product Name: RP-15 > Version: Standard Currently running Kernel 6.5.6-300.fc39.x86_64 |