You are not logged in.

#26 2022-07-10 03:56:30

nirui
Member
Registered: 2022-07-10
Posts: 1

Re: [Solved] Keyboard problem - Thinkbook 14+ ARA

UPDATE: I removed my old post, because after some adjustments, the patch worked on my ThinkPad neo 14 Ryzen 6800H machine. Old information thus became expired.

Here is the diff against kernel 5.18.10:

diff --git a/drivers/acpi/resource.c b/drivers/acpi/resource.c
index c2d494784..d1bd13007 100644
--- a/drivers/acpi/resource.c
+++ b/drivers/acpi/resource.c
@@ -381,6 +381,18 @@ unsigned int acpi_dev_get_irq_type(int triggering, int polarity)
 }
 EXPORT_SYMBOL_GPL(acpi_dev_get_irq_type);
 
+
+static const struct dmi_system_id thinkpad_neo_14_2022_ryzen_laptop[] = {
+	{
+		.ident = "Lenovo ThinkPad neo 14 (2022 Ryzen)",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+			DMI_MATCH(DMI_BOARD_NAME, "Mayan"),
+		},
+	},
+	{ }
+};
+
 static const struct dmi_system_id medion_laptop[] = {
 	{
 		.ident = "MEDION P15651",
@@ -408,6 +420,8 @@ struct irq_override_cmp {
 };
 
 static const struct irq_override_cmp skip_override_table[] = {
+	{ thinkpad_neo_14_2022_ryzen_laptop, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 0 },
+	{ thinkpad_neo_14_2022_ryzen_laptop, 12, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 0 },
 	{ medion_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0 },
 };
 
@@ -426,7 +440,6 @@ static bool acpi_dev_irq_override(u32 gsi, u8 triggering, u8 polarity,
 		    entry->shareable == shareable)
 			return false;
 	}
-
 	return true;
 }

Both the keyboard and the trackpoint worked after the modification. I'm so happy big_smile

The difference between my diff above and the patch that @981213 mentioned earlier is that, in my case, the last parameter (namely, `shareable`) in `skip_override_table` has to be `0` oppose to `1`.

Also, I don't think this is a great solution since it might greatly complicates `skip_override_table` (and related logic) consider how many machines will have to be add to the list in the future. But that's up to the Kernel developers.

I'm all happy, at least for now. Thank you for the patch!

Last edited by nirui (2022-07-13 01:17:46)

Offline

#27 2022-07-12 09:31:38

zerosign
Member
Registered: 2022-07-12
Posts: 4

Re: [Solved] Keyboard problem - Thinkbook 14+ ARA

Hi, it seems doesn't also work for Lenovo Yoga Slim 7 Pro X, is there any way without recompiling the kernel ? or could its being opted as kernel parameter for the irq signal, just like module parameter  ?

Offline

#28 2022-07-12 11:48:33

zerosign
Member
Registered: 2022-07-12
Posts: 4

Re: [Solved] Keyboard problem - Thinkbook 14+ ARA

TIL, I found https://aur.archlinux.org/packages/linu … low-shared, will try later on with additional patch for Yoga Slim 7 Pro X

Offline

#29 2022-07-12 15:58:00

zerosign
Member
Registered: 2022-07-12
Posts: 4

Re: [Solved] Keyboard problem - Thinkbook 14+ ARA

It seems the IRQ issues are being upstreamed in here https://lore.kernel.org/all/20220712020 … gmail.com/ by just checking whether it's ZEN CPU or not ?

Last edited by zerosign (2022-07-12 15:58:48)

Offline

#30 2022-07-21 11:27:30

rodude123
Member
Registered: 2022-07-14
Posts: 10
Website

Re: [Solved] Keyboard problem - Thinkbook 14+ ARA

The kernel patch works for me on my Lenovo Yoga running Ryzen 6000. The only question is when will it be fixed in a proper kernel update where someone wouldn't need to patch the kernel to use it. Also, a side question, is anyone else facing other issues to do with their laptops because I am. My speakers are not working as they should (https://bbs.archlinux.org/viewtopic.php?id=278058), and my laptop lid does not work as expected (https://bbs.archlinux.org/viewtopic.php?id=278202).

Offline

#31 2022-08-29 01:38:28

travisghansen
Member
Registered: 2022-06-28
Posts: 19

Re: [Solved] Keyboard problem - Thinkbook 14+ ARA

I can confirm this patch works to get the keyboard working generally on a yoga slim 7 pro x: https://lore.kernel.org/all/20220712020 … gmail.com/ (I've tested this by installing `linux-next-git` from aur and confirming the patch is in the source tree)

However (I'm not sure if this is connected, if not I can open a new thread), after suspend/resume I have 2 other similar/related issues:

- none of the top row of keys work as 'media' keys. They *always* operate as if the 'fn' key is being held down (regardless if it actually is or not). I'm using `sudo showkey` to test this out and the keycodes after resume do not match fresh boot functionality
- sometimes the keyboard just flat out fails (it seems when this is the case the kernel logs: atkbd serio0: Failed to enable keyboard on isa0060/serio0)...to get around this I can use the mouse to trigger another suspend and then eventually it will work on resume (with the exception of the above error, that *always* happens after resume)

I've tried various combinations of the i8042.foo params to no avail.

Anyone else experience this same behavior and/or have any thoughts about how to correct it?

Offline

#32 2022-08-29 06:34:53

seth
Member
Registered: 2012-09-03
Posts: 58,683

Re: [Solved] Keyboard problem - Thinkbook 14+ ARA

- none of the top row of keys work as 'media' keys. They *always* operate as if the 'fn' key is being held down

Does Fn+Esc (fn-lock) reverse that behavior?

sometimes the keyboard just flat out fails (it seems when this is the case the kernel logs: atkbd serio0: Failed to enable keyboard on isa0060/serio0)...to get around this I can use the mouse

Since a "yoga slim 7 pro x" has no "mouse", that's probably an external one? Wireless? USB dongle?
Has this ever happened when that external mouse wasn't there?

Offline

#33 2022-08-29 14:00:09

travisghansen
Member
Registered: 2022-06-28
Posts: 19

Re: [Solved] Keyboard problem - Thinkbook 14+ ARA

Does Fn+Esc (fn-lock) reverse that behavior?

No change no. Fn+Esc registers no keycode in showkey either (not sure if it would/should)

Since a "yoga slim 7 pro x" has no "mouse", that's probably an external one? Wireless? USB dongle?
Has this ever happened when that external mouse wasn't there?

I have no external mouse or keyboard attached so it's impacting the built-in keyboard (or seemingly is). My mention of the mouse is mostly irrelevant, just to say I can use some input device to put the machine back to sleep (the mouse at the gnome lock screen) to simply re-resume to try to get the keyboard recognized by another resume cycle.

EDIT: by 'mouse' in all cases I have meant the trackpad on the device

Last edited by travisghansen (2022-08-29 15:13:33)

Offline

#34 2022-08-31 03:24:01

travisghansen
Member
Registered: 2022-06-28
Posts: 19

Re: [Solved] Keyboard problem - Thinkbook 14+ ARA

I should also note the lid close event seems to go bad as well after the first suspend/resume cycle. ie: after fresh boot I can just close the lid of the laptop to trigger a sleep, but never again until a fresh reboot.

Offline

#35 2022-09-11 16:44:01

travisghansen
Member
Registered: 2022-06-28
Posts: 19

Re: [Solved] Keyboard problem - Thinkbook 14+ ARA

Perhaps the keyboard issues after suspend are resolved by this?: https://lore.kernel.org/lkml/2022090918 … o@amd.com/

I've tried the patch locally and doesn't seem to make any difference but I may be missing a step I needed to do.

Offline

#36 2022-09-12 15:21:41

travisghansen
Member
Registered: 2022-06-28
Posts: 19

Re: [Solved] Keyboard problem - Thinkbook 14+ ARA

Correction, the phoronix article gave the wrong kernel param (s2idle.prefer_microsoft_guid=1), the actual param is acpi.prefer_microsoft_guid=1

After building the kernel with the mentioned patch and setting the kernel param properly the media keys etc all work without issue after resume. I haven't had enough time pass to determine if the keyboard outright failing to work is also fixed (I assume not) but time will tell.

Offline

#37 2022-12-10 21:00:37

BusConscious
Member
Registered: 2022-12-10
Posts: 1

Re: [Solved] Keyboard problem - Thinkbook 14+ ARA

zerosign wrote:

It seems the IRQ issues are being upstreamed in here https://lore.kernel.org/all/20220712020 … gmail.com/ by just checking whether it's ZEN CPU or not ?

The issue with that approach is, that there is also a Intel version of that laptop, which is what I'm using and that Intel version has a completely dead keyboard to this day ... It's now christmas time and the laptop has been out for over 6 months.

Last edited by BusConscious (2022-12-10 21:19:55)

Offline

Board footer

Powered by FluxBB