Re: Internal keyboard dead on ADVAN 1405 (APN21S-140P3-CS): i8042 controller OK, keyboard device never ACKs

From: Lovekesh Solanki

Date: Wed Sep 16 2026 - 13:57:41 EST


Hi thanks for the report,

On Mon, Sep 14, 2026 at 08:14:24AM +0800, Pujito Adnyana wrote:
> i8042: [943273] f6 -> i8042 (kbd-data)
> i8042: [943474] fa <- i8042 (flush, kbd)
> i8042: [943474] Interrupt 1, without any data
>
> The fa arrived roughly 200 ms after the command was sent — just past
> the timeout, so the driver had already given up and the byte was
> discarded during the flush. The accompanying "Interrupt 1, without any
Yeah that seems like the cause.

> Is there a way to make atkbd tolerate an acknowledgement that arrives
> just past the command timeout, or to retry enabling scanning after the
> initial probe? If a DMI quirk is the right mechanism here, I am happy
> to test patches and provide any further data needed.
We could keep the current 200 ms attempt and if it fails retry a few times.

Could you apply the patch below against a mainline tree and test it?

Thanks,
Lovekesh

diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
index b9ad2381f885..81df4b7a5685 100644
--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -714,12 +714,28 @@ static inline void atkbd_disable(struct atkbd *atkbd)
static int atkbd_activate(struct atkbd *atkbd)
{
struct ps2dev *ps2dev = &atkbd->ps2dev;
+ int error;

/*
* Enable the keyboard to receive keystrokes.
*/
+
+ error = ps2_command(ps2dev, NULL, ATKBD_CMD_ENABLE);
+ if (!error)
+ return 0;
+
+ ps2_begin_command(ps2dev);
+
+ for(int i = 0; i < 3; i++) {
+ error = ps2_sendbyte(ps2dev, ATKBD_CMD_ENABLE & 0xff, 1000);
+ if (!error) {
+ break;
+ }
+ }
+ ps2_end_command(ps2dev);
+

- if (ps2_command(ps2dev, NULL, ATKBD_CMD_ENABLE)) {
+ if (error) {
dev_err(&ps2dev->serio->dev,
"Failed to enable keyboard on %s\n",
ps2dev->serio->phys);
--
2.55.0