All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lovekesh Solanki <lovekeshsolanki00@gmail.com>
To: Pujito Adnyana <zhee.tou@gmail.com>
Cc: linux-input@vger.kernel.org,
	 "dmitry.torokhov@gmail.com" <dmitry.torokhov@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: Re: Internal keyboard dead on ADVAN 1405 (APN21S-140P3-CS): i8042 controller OK, keyboard device never ACKs
Date: Wed, 16 Sep 2026 21:47:37 +0530	[thread overview]
Message-ID: <aqrA0eEt89mr_ijV@eggarch> (raw)
In-Reply-To: <CAEkMyrhPTh1Ws0Co6zHBq1aMhrhgam4yPBgbXAMPrffyAKpT4Q@mail.gmail.com>

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

      reply	other threads:[~2026-09-16 16:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-14  0:14 Internal keyboard dead on ADVAN 1405 (APN21S-140P3-CS): i8042 controller OK, keyboard device never ACKs Pujito Adnyana
2026-09-16 16:17 ` Lovekesh Solanki [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aqrA0eEt89mr_ijV@eggarch \
    --to=lovekeshsolanki00@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zhee.tou@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.