linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Werner Sembach <wse@tuxedocomputers.com>
To: dmitry.torokhov@gmail.com, wse@tuxedocomputers.com,
	swboyd@chromium.org, gregkh@linuxfoundation.org,
	hdegoede@redhat.com, mkorpershoek@baylibre.com,
	chenhuacai@kernel.org, wsa+renesas@sang-engineering.com,
	tiwai@suse.de, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 2/2] Input: i8042 - add 2 more TUXEDO devices to i8042 and atkbd quirk tables
Date: Mon, 27 Feb 2023 19:59:07 +0100	[thread overview]
Message-ID: <20230227185907.569154-3-wse@tuxedocomputers.com> (raw)
In-Reply-To: <20230227185907.569154-1-wse@tuxedocomputers.com>

A lot of modern Clevo barebones have touchpad and/or keyboard issues after
suspend fixable with nomux + reset + noloop + nopnp. Luckily, none of them
have an external PS/2 port so this can safely be set for all of them.

I'm not entirely sure if every device listed really needs all four quirks,
but after testing and production use. No negative effects could be
observed when setting all four.

Setting SERIO_QUIRK_NOMUX or SERIO_QUIRK_RESET_ALWAYS makes the keyboard
very laggy for ~5 seconds after boot and sometimes also after resume. To
fix this atkbd_reset_fixup is also applied for this device via a quirk,
which fixes it again.

Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Cc: stable@vger.kernel.org
---
 drivers/input/keyboard/atkbd.c        | 24 ++++++++++++++++++++++++
 drivers/input/serio/i8042-acpipnpio.h | 26 ++++++++++++++++++++++++++
 2 files changed, 50 insertions(+)

diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
index ef65c46c4efe..e89918347357 100644
--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -1886,6 +1886,30 @@ static const struct dmi_system_id atkbd_dmi_quirk_table[] __initconst = {
 		},
 		.callback = atkbd_deactivate_fixup,
 	},
+	/*
+	 * Some Clevo devices need this reset, otherwise they keyboard may
+	 * be laggy after boot and/or resume for ~5 seconds.
+	 */
+	{
+		/*
+		 * Clevo device, DMI_BOARD_VENDOR and DMI_SYSTEM_VENDOR
+		 * differ between resellers.
+		 */
+		.matches = {
+			DMI_MATCH(DMI_BOARD_NAME, "N150CU"),
+		},
+		.callback = atkbd_reset_fixup,
+	},
+	{
+		/*
+		 * Clevo device, DMI_BOARD_VENDOR and DMI_SYSTEM_VENDOR
+		 * differ between resellers.
+		 */
+		.matches = {
+			DMI_MATCH(DMI_BOARD_NAME, "NHxxRZQ"),
+		},
+		.callback = atkbd_reset_fixup,
+	},
 	{ }
 };
 
diff --git a/drivers/input/serio/i8042-acpipnpio.h b/drivers/input/serio/i8042-acpipnpio.h
index efc61736099b..6ed1044b4ba5 100644
--- a/drivers/input/serio/i8042-acpipnpio.h
+++ b/drivers/input/serio/i8042-acpipnpio.h
@@ -1116,6 +1116,19 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
 		.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
 					SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
 	},
+	{
+		/*
+		 * Setting SERIO_QUIRK_NOMUX or SERIO_QUIRK_RESET_ALWAYS makes the
+		 * keyboard very laggy for ~5 seconds after boot and sometimes also
+		 * after resume. To fix this atkbd_reset_fixup is also applied for
+		 * this device via a quirk, which fixes it again.
+		 */
+		.matches = {
+			DMI_MATCH(DMI_BOARD_NAME, "N150CU"),
+		},
+		.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
+					SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
+	},
 	{
 		.matches = {
 			DMI_MATCH(DMI_BOARD_NAME, "NH5xAx"),
@@ -1123,6 +1136,19 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
 		.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
 					SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
 	},
+	{
+		/*
+		 * Setting SERIO_QUIRK_NOMUX or SERIO_QUIRK_RESET_ALWAYS makes the
+		 * keyboard very laggy for ~5 seconds after boot and sometimes also
+		 * after resume. To fix this atkbd_reset_fixup is also applied for
+		 * this device via a quirk, which fixes it again.
+		 */
+		.matches = {
+			DMI_MATCH(DMI_BOARD_NAME, "NHxxRZQ"),
+		},
+		.driver_data = (void *)(SERIO_QUIRK_NOMUX | SERIO_QUIRK_RESET_ALWAYS |
+					SERIO_QUIRK_NOLOOP | SERIO_QUIRK_NOPNP)
+	},
 	{
 		.matches = {
 			DMI_MATCH(DMI_BOARD_NAME, "NL5xRU"),
-- 
2.34.1


  parent reply	other threads:[~2023-02-27 18:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-27 18:59 [PATCH v2 0/2] Fix "Input: i8042 - add TUXEDO devices to i8042 quirk tables for partial fix" Werner Sembach
2023-02-27 18:59 ` [PATCH v2 1/2] Input: atkbd - Make it possible to apply atkbd.reset via kernel quirk Werner Sembach
2023-02-28  7:34   ` Greg KH
2023-02-28 10:58     ` Werner Sembach
2023-02-27 18:59 ` Werner Sembach [this message]
2023-02-28  8:41 ` [PATCH v2 0/2] Fix "Input: i8042 - add TUXEDO devices to i8042 quirk tables for partial fix" Hans de Goede
2023-02-28 11:07   ` Werner Sembach
2023-03-01 16:57 ` Werner Sembach
2023-03-01 17:52   ` 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=20230227185907.569154-3-wse@tuxedocomputers.com \
    --to=wse@tuxedocomputers.com \
    --cc=chenhuacai@kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkorpershoek@baylibre.com \
    --cc=swboyd@chromium.org \
    --cc=tiwai@suse.de \
    --cc=wsa+renesas@sang-engineering.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).