[PATCH] Input: atkbd - skip deactivate for Xiaomi Redmi Book Pro 16 2026

Alexei Turtanov posted 1 patch 4 weeks, 1 day ago
drivers/input/keyboard/atkbd.c | 8 ++++++++
1 file changed, 8 insertions(+)
[PATCH] Input: atkbd - skip deactivate for Xiaomi Redmi Book Pro 16 2026
Posted by Alexei Turtanov 4 weeks, 1 day ago
The internal keyboard of the Xiaomi Redmi Book Pro 16 2026 (board TM2425)
does not work: atkbd_probe() succeeds and every command is ACKed, but no
scancodes ever arrive afterwards.

Testing on the hardware through serio_raw shows that ATKBD_CMD_RESET_DIS
(0xF5) is the culprit. After 0xF5 the embedded controller keeps ACKing
commands but stops delivering scancodes, and neither ATKBD_CMD_ENABLE
(0xF4) nor ATKBD_CMD_RESET_BAT (0xFF) bring them back. Only re-enabling
the keyboard interface at the controller level (i8042 command 0xAE, or
rewriting the command byte as i8042_port_close() does) revives it.
Running the init sequence without 0xF5 (0xED 0x00, 0xF3 0x00, 0xF4)
keeps the keyboard working.

'i8042.dumbkbd=1' also works around this, but then the driver never
writes to the keyboard and the LEDs cannot be controlled. Use the
existing atkbd_deactivate_fixup quirk instead, as done for the sibling
TM2424 by commit 3a046db33bb9 ("Input: atkbd - skip deactivate for
Xiaomi Book Pro 14's internal keyboard"). Tested on v7.2: keyboard,
Caps Lock LED and s2idle suspend/resume all work.

DMI: XIAOMI REDMI Book Pro 16 2026/TM2425, BIOS RMAPT6B0P0909 05/22/2026

Fixes: 9cf6e24c9fbf ("Input: atkbd - do not skip atkbd_deactivate() when skipping ATKBD_CMD_GETID")
Cc: stable@vger.kernel.org
Signed-off-by: Alexei Turtanov <9alexei9@gmail.com>
---

Notes:
    The DMI match is deliberately limited to the model I could test. The 14"
    Redmi Book Pro 2026 most likely has the same EC and needs the same
    quirk, but I have no unit to confirm it on.

 drivers/input/keyboard/atkbd.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
index 4c82e98..5041443 100644
--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -1954,6 +1954,14 @@ static const struct dmi_system_id atkbd_dmi_quirk_table[] __initconst = {
 		},
 		.callback = atkbd_deactivate_fixup,
 	},
+	{
+		/* Xiaomi Redmi Book Pro 16 2026 (TM2425) */
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "XIAOMI"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "REDMI Book Pro 16 2026"),
+		},
+		.callback = atkbd_deactivate_fixup,
+	},
 	{ }
 };
 
-- 
2.55.0
Re: [PATCH] Input: atkbd - skip deactivate for Xiaomi Redmi Book Pro 16 2026
Posted by Dmitry Torokhov 4 weeks, 1 day ago
On Fri, Aug 28, 2026 at 02:22:39PM +0300, Alexei Turtanov wrote:
> The internal keyboard of the Xiaomi Redmi Book Pro 16 2026 (board TM2425)
> does not work: atkbd_probe() succeeds and every command is ACKed, but no
> scancodes ever arrive afterwards.
> 
> Testing on the hardware through serio_raw shows that ATKBD_CMD_RESET_DIS
> (0xF5) is the culprit. After 0xF5 the embedded controller keeps ACKing
> commands but stops delivering scancodes, and neither ATKBD_CMD_ENABLE
> (0xF4) nor ATKBD_CMD_RESET_BAT (0xFF) bring them back. Only re-enabling
> the keyboard interface at the controller level (i8042 command 0xAE, or
> rewriting the command byte as i8042_port_close() does) revives it.
> Running the init sequence without 0xF5 (0xED 0x00, 0xF3 0x00, 0xF4)
> keeps the keyboard working.
> 
> 'i8042.dumbkbd=1' also works around this, but then the driver never
> writes to the keyboard and the LEDs cannot be controlled. Use the
> existing atkbd_deactivate_fixup quirk instead, as done for the sibling
> TM2424 by commit 3a046db33bb9 ("Input: atkbd - skip deactivate for
> Xiaomi Book Pro 14's internal keyboard"). Tested on v7.2: keyboard,
> Caps Lock LED and s2idle suspend/resume all work.
> 
> DMI: XIAOMI REDMI Book Pro 16 2026/TM2425, BIOS RMAPT6B0P0909 05/22/2026
> 
> Fixes: 9cf6e24c9fbf ("Input: atkbd - do not skip atkbd_deactivate() when skipping ATKBD_CMD_GETID")
> Cc: stable@vger.kernel.org
> Signed-off-by: Alexei Turtanov <9alexei9@gmail.com>

Applied, thank you.

-- 
Dmitry