You are not logged in.

#1 2022-06-14 03:59:50

knthmn
Member
Registered: 2021-12-03
Posts: 13

[Solved] Keyboard problem - Thinkbook 14+ ARA

SOLUTION EDIT: The fix is included since Linux 6.0. If your distro has a older kernel and doesn't contain the patch, use this temporary patch.

--- Original Post ---

Hi, I am trying to install Arch (202206, kernel 5.18.1) on a new Thinkbook 14+ ARA (Ryzen 6800H). I understand it is a very new platform.

The internal keyboard does not work properly. The CapsLock light is stuck on (despite being functional). Key presses are delayed by exactly two presses. If I type "pacman" slowly
p - a - c (p shows up) - m (a shows up) - ......
If I type too fast then some inputs end up missing.
An external USB keyboard works normally. The internal keyboard also works in BIOS, Windows, SysLinux, GRUB (when editing kernel parameters) etc.


There is sometimes an error appearing on screen which I don't know if it is related

[ 313.727301] [Hardware Error]: Corrected error, no action required. 
[ 313.727398] [Hardware Error]: CPU:0 (19:44:1) MC15_STATUSCOverICEIMiscVlAddrVI-1-1SundVICECCI-1 1-]: exdc204000000c0llb 
[ 313.7714983] [Hardware Error]: Error Rddr: Ox000000001fc67940 
[ 313.7275493 [Hardware Error]: IPID: Ox0000009500050f00, Syndrome: 6x000001ffea240701 
[ 313.7271619] [Hardware Error]: Unified Memory Controller Ext. Error Code: 12 
[ 313.727623] [Hardware Error]: cache level: L3/GEN, tx: GEN, mem-tx: RD 

I have tried several `i8042` kernel parameters but so far nothing works (I am not sure if the keyboard uses PS/2, how do I check that?)

I am new at troubleshooting hardware, so please tell me any commands that I need to run to diagnose the issue. Thanks in advance.

P.S.: Also the current kernel doesn't support the Wi-Fi card Realtek RTL8852BE, but the driver is being developed.

Last edited by knthmn (2022-11-12 11:23:59)

Offline

#2 2022-06-14 05:55:04

seth
Member
Registered: 2012-09-03
Posts: 59,042

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

I have tried several `i8042` kernel parameters but so far nothing works (I am not sure if the keyboard uses PS/2, how do I check that?)

Including "i8042.dumbkbd=1"?
Are any i8042 messages in dmesg?

Online

#3 2022-06-14 08:14:15

knthmn
Member
Registered: 2021-12-03
Posts: 13

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

seth wrote:

Are any i8042 messages in dmesg?

Thanks for your help.

Here are the i8042 parameters

no parameters

[    3.944861] i8042: PNP: PS/2 Controller [PNP0303:KBC0] at 0x60,0x64 irq 1
[    3.944866] i8042: PNP: PS/2 appears to have AUX port disabled, if this is incorrect please boot with i8042.nopnp
[    3.946476] serio: i8042 KBD port at 0x60,0x64 irq 1
[    4.485628] Modules linked in: uas usb_storage serio_raw crc32_pclmul crc32c_intel atkbd libps2 sdhci_pci r8169 aesni_intel cqhci realtek crypto_simd sdhci mdio_devres cryptd thunderbolt(+) mmc_core libphy xhci_pci i8042 wmi serio video dm_snapshot dm_bufio dm_mod loop
[    4.593209] Modules linked in: fjes(-) usbhid(+) uas usb_storage serio_raw crc32_pclmul crc32c_intel atkbd libps2 sdhci_pci r8169 aesni_intel cqhci realtek crypto_simd sdhci mdio_devres cryptd thunderbolt(+) mmc_core libphy xhci_pci i8042 wmi serio video dm_snapshot dm_bufio dm_mod loop

i8042.nopnp=1 (same issue)

[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-x86_64 lang=en_US keytable=us tz=UTC misobasedir=manjaro misolabel=MANJARO_KDE_2126 quiet systemd.show_status=1 apparmor=1 security=apparmor driver=free nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 i8042.nopnp=1
[    0.031560] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-x86_64 lang=en_US keytable=us tz=UTC misobasedir=manjaro misolabel=MANJARO_KDE_2126 quiet systemd.show_status=1 apparmor=1 security=apparmor driver=free nouveau.modeset=1 i915.modeset=1 radeon.modeset=1 i8042.nopnp=1
[    3.935179] i8042: PNP detection disabled
[    4.213429] serio: i8042 KBD port at 0x60,0x64 irq 1

i8042.dumbkbd=1 (same issue)

i8042: PNP: PS/2 Controller [PNP0303:KBC0] at 0x60,0x64 irq 1
i8042: PNP: PS/2 appears to have AUX port disabled, if this is incorrect please boot with i8042.nopnp
serio: i8042 KBD port at 0x60,0x64 irq 1
input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input3

Last edited by knthmn (2022-06-14 12:24:51)

Offline

#4 2022-06-14 08:16:12

knthmn
Member
Registered: 2021-12-03
Posts: 13

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

Interestingly, I also tried Manjaro (Linux 5.15), POP OS, and Ubuntu. The keys are also delayed by two presses and they are hold down, so if I type "pac"
p - a - c (now p is held down).

I also tried

i8042.reset i8042.nomux i8042.nopnp i8042.noloop

and

i8042.direct i8042.dumbkbd

There is also this error on Arch

atkbd serio0: Failed to deactivate keyboard on isa0060/serio0
atkbd serio0: Failed to enable keyboard on isa0060/serio0

Last edited by knthmn (2022-06-15 02:03:24)

Offline

#5 2022-06-15 13:34:45

seth
Member
Registered: 2012-09-03
Posts: 59,042

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

How's the behavior in "sudo evtest" and "sudo libinput debug-events"? (just to make sure which layer has the lagginess)

Online

#6 2022-06-15 13:58:38

fward
Member
Registered: 2022-06-15
Posts: 2

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

I have a Redmi Book Pro 14 2022 Ryzen Edition(R7 6800H), its internal PS/2 keyboard is not working under linux.

So I think driving the internal PS/2 keyboard with i8042 has a lot of issues when you have a very new platform.

An example: https://bbs.archlinux.org/viewtopic.php?id=274130

Offline

#7 2022-06-15 16:10:07

knthmn
Member
Registered: 2021-12-03
Posts: 13

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

fward wrote:

I have a Redmi Book Pro 14 2022 Ryzen Edition(R7 6800H)

There is also a RedmiBook Pro 15 (also Ryzen 6000) having a similar problem.
https://www.reddit.com/r/linuxhardware/ … ard_issue/
I have a friend with a Zenbook S 13 OLED which I will test tmr.

I don't believe the person is running Ryzen 6000.


Edit: ZenBook S 13 OLED (Ryzen 6800U) has the same problem. Keys are delayed even more. I need to find a USB-C hub before I can run any commands on it.

Last edited by knthmn (2022-06-16 02:58:38)

Offline

#8 2022-06-15 16:19:03

knthmn
Member
Registered: 2021-12-03
Posts: 13

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

seth wrote:

How's the behavior in "sudo evtest" and "sudo libinput debug-events"? (just to make sure which layer has the lagginess)

Both tests have the same lagginess.

In evtest (here is the beginning https://pastebin.com/3U0ahJN1),

# Now I press something
Event: time 1655309244.701786, type 1 (EV_KEY), code 36 (KEY_J), value 0     # 3rd last key
Event: time 1655309244.701786, -------------- SYN_REPORT ------------
Event: time 1655309248.850433, type 4 (EV_MSC), code 4 (MSC_SCAN), value 18
Event: time 1655309248.850433, type 1 (EV_KEY), code 24 (KEY_O), value 1    # 2nd last key

Also, once I pressed the keyboard several times, the touchpad doesn't work.

Last edited by knthmn (2022-06-15 16:25:05)

Offline

#9 2022-06-16 06:36:11

benzjf
Member
Registered: 2022-06-16
Posts: 1

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

fward wrote:

I have a Redmi Book Pro 14 2022 Ryzen Edition(R7 6800H), its internal PS/2 keyboard is not working under linux.

So I think driving the internal PS/2 keyboard with i8042 has a lot of issues when you have a very new platform.

An example: https://bbs.archlinux.org/viewtopic.php?id=274130

Yes, I have a Redmi Book Pro 15 2022 Ryzen 6800H. I have the same keyboard problem as yours.
I heard ASUS has the same problem with the new computer. This may be a common problem.

Offline

#10 2022-06-16 14:54:03

981213
Member
Registered: 2022-06-16
Posts: 7

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

I just got mine and have the same problem. The keyboard isn't recognized until I press several keys, and after kernel finally identifies it, the keys are stuck.
After enabling i8042.debug the kernel log shows the following before I press anything:

[    2.125461] i8042: PNP: PS/2 Controller [PNP0303:KBC0] at 0x60,0x64 irq 1
[    2.125463] i8042: PNP: PS/2 appears to have AUX port disabled, if this is incorrect please boot with i8042.nopnp
[    2.125500] i8042: [0] 20 -> i8042 (command)
[    2.125775] i8042: [0] 67 <- i8042 (return)
[    2.125838] i8042: [0] 20 -> i8042 (command)
[    2.126378] i8042: [0] 67 <- i8042 (return)
[    2.126452] i8042: [1] 60 -> i8042 (command)
[    2.126970] i8042: [1] 76 -> i8042 (parameter)
[    2.127198] i8042: [1] 60 -> i8042 (command)
[    2.127339] i8042: [1] 67 -> i8042 (parameter)
[    2.127347] serio: i8042 KBD port at 0x60,0x64 irq 1
[    2.127386] mousedev: PS/2 mouse device common for all mice
[    2.127555] i8042: [2] f2 -> i8042 (kbd-data)
...
[    2.329416] i8042: [204] ed -> i8042 (kbd-data)
...
[    2.537520] i8042: [412] 60 -> i8042 (command)
[    2.537735] i8042: [412] 66 -> i8042 (parameter)
[    2.537936] i8042: [412] 60 -> i8042 (command)
[    2.538081] i8042: [412] 67 -> i8042 (parameter)
[    2.538106] i8042: [412] fa <- i8042 (interrupt, 0, 0)
[    2.538162] i8042: [412] Interrupt 1, without any data

It seems that their fake 8042 controller is stuck after i8042 driver disables and enables the keyboard port.
This is a firmware bug and ideally it needs to be fixed by Lenovo. (Or Insyde, the UEFI vendor for this ThinkBook and the Redmi one?)

Last edited by 981213 (2022-06-16 14:54:28)

Offline

#11 2022-06-17 09:19:19

knthmn
Member
Registered: 2021-12-03
Posts: 13

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

981213 wrote:

This is a firmware bug and ideally it needs to be fixed by Lenovo. (Or Insyde, the UEFI vendor for this ThinkBook and the Redmi one?)

If Lenovo does not release a new firmware, can it be fixed or mitigated from the Linux side?

Last edited by knthmn (2022-06-17 09:26:39)

Offline

#12 2022-06-17 13:19:42

seth
Member
Registered: 2012-09-03
Posts: 59,042

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

Does reloading i8042 after the boot free the controller?

Online

#13 2022-06-17 14:10:45

981213
Member
Registered: 2022-06-16
Posts: 7

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

knthmn wrote:
981213 wrote:

This is a firmware bug and ideally it needs to be fixed by Lenovo. (Or Insyde, the UEFI vendor for this ThinkBook and the Redmi one?)

If Lenovo does not release a new firmware, can it be fixed or mitigated from the Linux side?

I haven't found one yet sad

seth wrote:

Does reloading i8042 after the boot free the controller?

Nope. It doesn't.

Offline

#14 2022-06-17 15:49:43

981213
Member
Registered: 2022-06-16
Posts: 7

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

I wrote a 4-line program to read status and data port of i8042 in userspace and I found something weird:
After pressing any key, the bit0 in status register is set, but no interrupt is firing. Then I read the data port, and kernel log shows that an interrupt fired after this data port reading.
This controller implementation is really buggy. Who needs an interrupt after the triggering event is already dealt with?

Offline

#15 2022-06-17 16:42:13

981213
Member
Registered: 2022-06-16
Posts: 7

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

Edit 3:
I reached to the conclusion too quickly.
It's a weird design choice instead of a bug:
They made the keyboard IRQ active-low instead of the conventional active-high found in almost all other computers.
The kernel decided to override this, which made the keyboard controller non-functional.

Content below this line are outdated. See the next post for a fix.
------------
Here's a dirty hack:

--- i8042-orig.c	2022-06-18 00:34:28.000000000 +0800
+++ i8042.c	2022-06-18 08:35:41.260526912 +0800
@@ -22,6 +22,7 @@
 #include <linux/slab.h>
 #include <linux/suspend.h>
 #include <linux/property.h>
+#include <linux/kthread.h>
 
 #include <asm/io.h>
 
@@ -1613,6 +1614,47 @@
 	.notifier_call = i8042_kbd_bind_notifier,
 };
 
+/*
+ * For the buggy i8042 emulation on ThinkBook 14 G4+ ARA (Ryzen 7 6800H):
+ * When any data is available, the bit 0 in status register is set, however there
+ * is no interrupt firing. The interrupt only fires after the data register
+ * is read, which is useless.
+ *
+ * So here's a kthread polling the status register every 100ms.
+ *
+ * !!!!!!FIX YOUR DAMN UEFI LENOVO!!!!!!
+ */
+static struct task_struct *poll_thread;
+int i8042_poll_thread(void*)
+{
+	unsigned char str, data;
+	struct i8042_port *port;
+	struct serio *serio;
+	unsigned long flags;
+	bool filtered;
+	while(!kthread_should_stop()) {
+		spin_lock_irqsave(&i8042_lock, flags);
+		str = i8042_read_status();
+		if(str & I8042_STR_OBF) {
+			data = i8042_read_data();
+			dbg("polled kbd data: %02x\n", data);
+
+			port = &i8042_ports[I8042_KBD_PORT_NO];
+			serio = port->exists ? port->serio : NULL;
+			filtered = i8042_filter(data, str, serio);
+			spin_unlock_irqrestore(&i8042_lock, flags);
+
+			if (likely(serio && !filtered))
+				serio_interrupt(serio, data, 0);
+			msleep(10);
+		} else {
+			spin_unlock_irqrestore(&i8042_lock, flags);
+			msleep(100);
+		}
+	}
+	return 0;
+}
+
 static int __init i8042_init(void)
 {
 	int err;
@@ -1630,6 +1672,7 @@
 	/* Set this before creating the dev to allow i8042_command to work right away */
 	i8042_present = true;
 
+	poll_thread = kthread_run(i8042_poll_thread, NULL, "i8042_poll");
 	err = platform_driver_register(&i8042_driver);
 	if (err)
 		goto err_platform_exit;
@@ -1655,6 +1698,7 @@
 	platform_driver_unregister(&i8042_driver);
  err_platform_exit:
 	i8042_platform_exit();
+	kthread_stop(poll_thread);
 	return err;
 }
 
@@ -1667,6 +1711,7 @@
 	platform_driver_unregister(&i8042_driver);
 	i8042_platform_exit();
 
+	kthread_stop(poll_thread);
 	bus_unregister_notifier(&serio_bus, &i8042_kbd_bind_notifier_block);
 	panic_blink = NULL;
 }

Before anyone asking:
No. This should NOT be submitted upstream. Lenovo should fix their UEFI instead.

Edit:
I tried to contact their customer support and their reply was that linux lacks the keyboard driver.
Clearly the complaint didn't reach the right people and got ignored.
I have no idea how to get this bug reported to the proper team, unfotrunately.
This bug is really stupid and the hack in this post introduces input lag due to how polling works.

Edit2:
The weird IRQ behavior situation may be an issue similar to this:
https://www.spinics.net/lists/linux-acpi/msg103032.html
I'll try applying a similar patch later.

Last edited by 981213 (2022-06-18 14:41:32)

Offline

#16 2022-06-18 13:39:39

981213
Member
Registered: 2022-06-16
Posts: 7

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

Fix sent: https://patchwork.kernel.org/project/li … gmail.com/

Edit:
This patch works, but the matching string choice is terrible. The same board name is used by lenovo on several other machines.
If anyone with this ThinkBook wants your keyboard to work immediately, you can just apply the patch and build your own kernel.
I'll send a v2 upstream later with a different matching string.

Last edited by 981213 (2022-06-19 05:19:28)

Offline

#17 2022-06-18 14:08:33

shortgame11
Member
Registered: 2022-06-18
Posts: 3

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

I have a Redmi with Ryzen 6800H and a Keyboard that doesn't work in Linux. I'm getting the same output as above when enabling i8042.debug. The UEFI vendor is Insyde, the same as the Lenovo notebook. I have emailed Xiaomi but recieved a lackluster response at this point. I'm going to keep pressing them to push this information up the line and hopefully onto Insyde. I might email Lenovo and Insyde directly as well, the more pressure the merrier I 'spose.

Last edited by shortgame11 (2022-06-18 14:23:47)

Offline

#18 2022-06-18 14:50:35

vliro
Member
Registered: 2022-06-16
Posts: 1

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

Did that fix the issue?

Offline

#19 2022-06-18 14:50:44

981213
Member
Registered: 2022-06-16
Posts: 7

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

shortgame11 wrote:

I have a Redmi with Ryzen 6800H and a Keyboard that doesn't work in Linux. I'm getting the same output as above when enabling i8042.debug. The UEFI vendor is Insyde, the same as the Lenovo notebook. I have emailed Xiaomi but recieved a lackluster response at this point. I'm going to keep pressing them to push this information up the line and hopefully onto Insyde. I might email Lenovo and Insyde directly as well, the more pressure the merrier I 'spose.

You can try disabling the IRQ override like the patch in my post and rebuild the kernel:
1. Dump the ACPI DSDT and check the IRQ entry in Device (KBC0)
2. Add a new skip_override entry to drivers/acpi/resource.c according to the IRQ definition (see my patch above.)
3. Rebuild the kernel and try if the problem is fixed

Offline

#20 2022-06-19 07:06:14

shortgame11
Member
Registered: 2022-06-18
Posts: 3

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

981213 wrote:

You can try disabling the IRQ override like the patch in my post and rebuild the kernel:
1. Dump the ACPI DSDT and check the IRQ entry in Device (KBC0)
2. Add a new skip_override entry to drivers/acpi/resource.c according to the IRQ definition (see my patch above.)
3. Rebuild the kernel and try if the problem is fixed

Never compiled the kernel before. Good fun.

--- /linux-5.18.5/drivers/acpi/resource.c	2022-06-16 21:32:05.000000000 +1000
+++ /linux-5.18.5PATCHED/drivers/acpi/resource.c	2022-06-19 16:22:45.951456355 +1000
@@ -399,6 +399,24 @@
 	{ }
 };
 
+static const struct dmi_system_id irq1_edge_low_shared[] = {
+	{
+		.ident = "Lenovo ThinkBook 14 G4+ ARA",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+			DMI_MATCH(DMI_BOARD_NAME, "LNVNB161216"),
+		},
+	},
+	{
+	        .ident = "Redmi Book Pro 15 2022",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "TIMI"),
+			DMI_MATCH(DMI_BOARD_NAME, "TM2113"),
+	        },
+	 },       
+	{ }
+};
+
 struct irq_override_cmp {
 	const struct dmi_system_id *system;
 	unsigned char irq;
@@ -409,6 +427,7 @@
 
 static const struct irq_override_cmp skip_override_table[] = {
 	{ medion_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0 },
+	{ irq1_edge_low_shared, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1 },
 };
 
 static bool acpi_dev_irq_override(u32 gsi, u8 triggering, u8 polarity,

I added my bit and the keyboard works. I don't know how to add that to your patch on patchwork.

Last edited by shortgame11 (2022-06-19 07:07:29)

Offline

#21 2022-06-19 07:35:53

981213
Member
Registered: 2022-06-16
Posts: 7

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

shortgame11 wrote:
981213 wrote:

You can try disabling the IRQ override like the patch in my post and rebuild the kernel:
1. Dump the ACPI DSDT and check the IRQ entry in Device (KBC0)
2. Add a new skip_override entry to drivers/acpi/resource.c according to the IRQ definition (see my patch above.)
3. Rebuild the kernel and try if the problem is fixed

Never compiled the kernel before. Good fun.

--- /linux-5.18.5/drivers/acpi/resource.c	2022-06-16 21:32:05.000000000 +1000
+++ /linux-5.18.5PATCHED/drivers/acpi/resource.c	2022-06-19 16:22:45.951456355 +1000
@@ -399,6 +399,24 @@
 	{ }
 };
 
+static const struct dmi_system_id irq1_edge_low_shared[] = {
+	{
+		.ident = "Lenovo ThinkBook 14 G4+ ARA",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+			DMI_MATCH(DMI_BOARD_NAME, "LNVNB161216"),
+		},
+	},
+	{
+	        .ident = "Redmi Book Pro 15 2022",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "TIMI"),
+			DMI_MATCH(DMI_BOARD_NAME, "TM2113"),
+	        },
+	 },       
+	{ }
+};
+
 struct irq_override_cmp {
 	const struct dmi_system_id *system;
 	unsigned char irq;
@@ -409,6 +427,7 @@
 
 static const struct irq_override_cmp skip_override_table[] = {
 	{ medion_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0 },
+	{ irq1_edge_low_shared, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1 },
 };
 
 static bool acpi_dev_irq_override(u32 gsi, u8 triggering, u8 polarity,

I added my bit and the keyboard works. I don't know how to add that to your patch on patchwork.

I can add your changes when I send a v2 of my patch later.
If you are ok with that, could you provide me a Sign-off-by line as described in Sign your work - the Developer’s Certificate of Origin ?

Offline

#22 2022-06-19 07:58:49

shortgame11
Member
Registered: 2022-06-18
Posts: 3

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

981213 wrote:
shortgame11 wrote:
981213 wrote:

You can try disabling the IRQ override like the patch in my post and rebuild the kernel:
1. Dump the ACPI DSDT and check the IRQ entry in Device (KBC0)
2. Add a new skip_override entry to drivers/acpi/resource.c according to the IRQ definition (see my patch above.)
3. Rebuild the kernel and try if the problem is fixed

Never compiled the kernel before. Good fun.

--- /linux-5.18.5/drivers/acpi/resource.c	2022-06-16 21:32:05.000000000 +1000
+++ /linux-5.18.5PATCHED/drivers/acpi/resource.c	2022-06-19 16:22:45.951456355 +1000
@@ -399,6 +399,24 @@
 	{ }
 };
 
+static const struct dmi_system_id irq1_edge_low_shared[] = {
+	{
+		.ident = "Lenovo ThinkBook 14 G4+ ARA",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+			DMI_MATCH(DMI_BOARD_NAME, "LNVNB161216"),
+		},
+	},
+	{
+	        .ident = "Redmi Book Pro 15 2022",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "TIMI"),
+			DMI_MATCH(DMI_BOARD_NAME, "TM2113"),
+	        },
+	 },       
+	{ }
+};
+
 struct irq_override_cmp {
 	const struct dmi_system_id *system;
 	unsigned char irq;
@@ -409,6 +427,7 @@
 
 static const struct irq_override_cmp skip_override_table[] = {
 	{ medion_laptop, 1, ACPI_LEVEL_SENSITIVE, ACPI_ACTIVE_LOW, 0 },
+	{ irq1_edge_low_shared, 1, ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_LOW, 1 },
 };
 
 static bool acpi_dev_irq_override(u32 gsi, u8 triggering, u8 polarity,

I added my bit and the keyboard works. I don't know how to add that to your patch on patchwork.

I can add your changes when I send a v2 of my patch later.
If you are ok with that, could you provide me a Sign-off-by line as described in Sign your work - the Developer’s Certificate of Origin ?

That's fine.

Edit: I'll message it to you privately

Last edited by shortgame11 (2022-06-19 09:15:11)

Offline

#23 2022-06-20 02:49:59

knthmn
Member
Registered: 2021-12-03
Posts: 13

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

I borrowed my friend's Zenbook S 13 OLED (running 6800U) can personally confirm that it also works there. I will pm you my signature.

+	{ 
+ 		.ident = "Asus Zenbook S 13 OLED UM5302",
+ 		.matches = {
+ 			DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
+ 			DMI_MATCH(DMI_BOARD_NAME, "UM5302TA"),
+ 		},
+ 	},

Interestingly there is someone who solved this with a DSDT
https://zhuanlan.zhihu.com/p/530643928

Also my screen flashes like crazy after a suspend, is there a fix?

Last edited by knthmn (2022-06-20 08:03:32)

Offline

#24 2022-06-20 07:25:29

fward
Member
Registered: 2022-06-15
Posts: 2

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

knthmn wrote:

Also my screen flashes like crazy after a suspend, is there a fix?

https://zhuanlan.zhihu.com/p/530643928 said:

GPU driver

After testing, Debian 11/Linux 5.10 does not have a gpu driver for the Ryzen 7 6800H processor, so you need to replace to the new kernel in the backport and update the linux-firmware to the latest version. The solution is to install the linux-image-oem-22.04 kernel, the OEM kernel fixes a bug in amdgpu that causes the screen to flicker after waking up.

It seems there's a bug in `amdgpu`.

Last edited by fward (2022-06-20 07:26:33)

Offline

#25 2022-07-05 14:32:39

jjhsieh1111
Member
Registered: 2022-07-05
Posts: 1

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

981213 wrote:

Fix sent: https://patchwork.kernel.org/project/li … gmail.com/

Edit:
This patch works, but the matching string choice is terrible. The same board name is used by lenovo on several other machines.
If anyone with this ThinkBook wants your keyboard to work immediately, you can just apply the patch and build your own kernel.
I'll send a v2 upstream later with a different matching string.

This patch also saved my keyboard on "ThinkBook 16 G4+ ARA", Ubuntu 22.04 with kernel 5.15.0-40-generic

System Information
    Manufacturer: LENOVO
    Product Name: 21D1
    Version: ThinkBook 16 G4+ ARA
    SKU Number: LENOVO_MT_21D1_BU_idea_FM_ThinkBook 16 G4+ ARA
    Family: ThinkBook 16 G4+ ARA

Base Board Information
    Manufacturer: LENOVO
    Product Name: LNVNB161216

Thank you!

Last edited by jjhsieh1111 (2022-07-11 03:35:40)

Offline

Board footer

Powered by FluxBB