Created attachment 304710 [details] dmidecode (cross-posting from https://lore.kernel.org/all/596b9c4a-fb83-a8ab-3a44-6052d83fa546@augustwikerfors.se/ with dmidecode) Since v6.5-rc1 the keyboard on this laptop no longer works. This problem also existed before v6.0-rc1 commit 9946e39fe8d0 ("ACPI: resource: skip IRQ override on AMD Zen platforms"), so I suspected the cause to be a9c4a912b7dc ("ACPI: resource: Remove "Zen" specific match and quirks") which reverted that commit. Reverting a9c4a912b7dc confirmed this theory. My specs are: Laptop model: Lenovo Yoga 7 14ARB7 BIOS: K5CN40WWT66 (latest beta from [1]) CPU: AMD Ryzen 5 6600U Kernel config: [2] Distribution: Arch Linux The issue has been confirmed by at least one other user with this laptop: [3] [1] https://forums.lenovo.com/t5/Lenovo-Yoga-Series-Laptops/Yoga-7-14ARB7-keyboard-lag-when-on-certain-websites-or-when-Vantage-is-opened/m-p/5174991?page=28#5974742 [2] https://gitlab.archlinux.org/archlinux/packaging/packages/linux/-/raw/d4a56a1e994201b6c607199922aa22e4337b56c9/config [3] https://github.com/tomsom/yoga-linux/issues/47
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.