Linux Input/HID development
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Hans de Goede <hdegoede@redhat.com>
Cc: linux-input@vger.kernel.org, Shang Ye <yesh25@mail2.sysu.edu.cn>,
	gurevitch <mail@gurevit.ch>, Egor Ignatov <egori@altlinux.org>,
	Anton Zhilyaev <anton@cpp.in>
Subject: Re: [PATCH] Input: atkbd - Skip ATKBD_CMD_GETID in translated mode
Date: Tue, 14 Nov 2023 15:59:13 +0000	[thread overview]
Message-ID: <ZVOZUa1i9dQfm76M@google.com> (raw)
In-Reply-To: <20231106155429.5377-1-hdegoede@redhat.com>

Hi Hans,

On Mon, Nov 06, 2023 at 04:54:29PM +0100, Hans de Goede wrote:
> There have been multiple reports of keyboard issues on recent laptop models
> which can be worked around by setting i8042.dumbkbd, with the downside
> being this breaks the capslock LED.
> 
> It seems that these issues are caused by recent laptops getting confused by
> ATKBD_CMD_GETID. Rather then adding and endless growing list of quirks for
> this, lets just skip ATKBD_CMD_GETID alltogether when in translated mode.
> 
> The main goal of sending ATKBD_CMD_GETID is to skip binding to ps/2
> mice/touchpads and those are never used in translated mode.
> 
> Examples of laptop models which benefit from skipping ATKBD_CMD_GETID:
> 
> * "HP Laptop 15s-fq2xxx", "HP laptop 15s-fq4xxx" and "HP Laptop 15-dy2xxx"
>   models the kbd stops working for the first 2 - 5 minutes after boot
>   (waiting for EC watchdog reset?)
> 
> * On "HP Spectre x360 13-aw2xxx" atkbd fails to probe the keyboard
> 
> * At least 9 different Lenovo models have issues with ATKBD_CMD_GETID, see:
>   https://github.com/yaescallop/atkbd-nogetid
> 
> Note this also removes the "NCD terminal keyboards are only supported on
> non-translating controllers." warning since that code is now unreachable.
> 
> This has been tested on:
> 
> 1. A MSI B550M PRO-VDH WIFI desktop, where the i8042 controller is not
>    in translated mode when no keyboard is plugged in and with a ps/2 kbd
>    a "AT Translated Set 2 keyboard" /dev/input/event# node shows up
> 
> 2. A Dell Latitude 9420 (always has a "AT Translated Set 2 keyboard")
> 
> 3. A Lenovo ThinkPad X1 Yoga gen 8 (idem)

I agree that the mice/touchpads are not going to work if the controller
is in translated mode, however I wonder if on a device with external
PS/2 ports we could not end up with a port in translated mode with
"wrong" device plugged in.

Can we consider not skipping the check completely, but rather use DMI to
check the chassis type (we already have a similar check in 8042)
and skip ATKBD_CMD_GETID on mobile devices, but still try
ATKBD_CMD_SETLEDS on them?

Thanks.

-- 
Dmitry

  reply	other threads:[~2023-11-14 15:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-06 15:54 [PATCH] Input: atkbd - Skip ATKBD_CMD_GETID in translated mode Hans de Goede
2023-11-14 15:59 ` Dmitry Torokhov [this message]
2023-11-15 17:45   ` Hans de Goede

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=ZVOZUa1i9dQfm76M@google.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=anton@cpp.in \
    --cc=egori@altlinux.org \
    --cc=hdegoede@redhat.com \
    --cc=linux-input@vger.kernel.org \
    --cc=mail@gurevit.ch \
    --cc=yesh25@mail2.sysu.edu.cn \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox