NetBSD Problem Report #60981
From www@netbsd.org Sat Nov 7 19:57:49 2026
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
client-signature RSA-PSS (2048 bits) client-digest SHA256)
(Client CN "mail.netbsd.org", Issuer "YR1" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id A7EC81A923C
for <gnats-bugs@gnats.NetBSD.org>; Sat, 7 Nov 2026 19:57:49 +0000 (UTC)
Message-Id: <20261107195747.969871A923F@mollari.NetBSD.org>
Date: Sat, 7 Nov 2026 19:57:47 +0000 (UTC)
From: rc279jx4j@mozmail.com
Reply-To: rc279jx4j@mozmail.com
To: gnats-bugs@NetBSD.org
Subject: Laptop internal keyboard and touchpad not working
X-Send-Pr-Version: www-1.0
X-From4GNATS: "rc279jx4j@mozmail.com via gnats" <gnats-admin@NetBSD.org>
>Number: 60981
>Category: port-evbarm
>Synopsis: Laptop internal keyboard and touchpad not working
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-evbarm-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Nov 07 20:00:00 +0000 2026
>Originator: ssc
>Release: NetBSD 11.0
>Organization:
>Environment:
NetBSD arm64 11.0 NetBSD 11.0 (GENERIC64) #0: Thu Jul 30 15:23:12 UTC 2026 mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/evbarm/compile/GENERIC64 evbarm
>Description:
I2C HIDs (internal keyboard and touchpad) are not working on my Lenovo IdeaPad Slim 5 (arm64) laptop with a Qualcomm Snapdragon X Plus X1P42100 SoC (not to be confused with the more common Snapdragon X Elite series).
This is a "Windows-on-ARM" platform that seems to be relatively poorly supported even by mainstream OSes apart from the Windows that it ships with. NetBSD itself boots successfully with the stock GENERIC64 kernel (via UEFI + ACPI), even if many of the onboard features (sound, wifi, etc.) do not work. With a working keyboard, however, the system is overall decently useable.
So, after some debugging, I found out that the issue seems to be with the order in which the devices get initialized. With the stock kernel, the I2C node (qcomiic0) gets initialized before the GPIO node (qcomgpio0). This leads to the following logs:
[ 1.000004] qcomiic0 at acpi0 (I2C1, QCOM0C10-1): mem 0xb80000-0xb83fff irq 405
[ 1.000004] qcomiic0: claiming ECKB
[ 1.000004] qcomiic0: claiming TCPB
[ 1.000004] iic0 at qcomiic0: I2C bus
[ 1.000004] ihidev0 at iic0 addr 0x3a: vendor 0x6243 product 0x1, ECKB
[ 1.000004] ihidev0: 13 report ids
[ 1.000004] ihidev0: no IRQ resource
[ 1.000004] acpi_gpio_get_int: translate failed: AE_NO_HANDLER
XX [ 1.000004] ihidev0: autoconfiguration error: can't find gpioint resource
[ 1.000004] ihidev0: WARNING: power management not supported
[ 1.000004] ihidev1 at iic0 addr 0x38: vendor 0x2808 product 0x106, TCPB
[ 1.000004] ihidev1: 13 report ids
[ 1.000004] ihidev1: no IRQ resource
[ 1.000004] acpi_gpio_get_int: translate failed: AE_NO_HANDLER
XX [ 1.000004] ihidev1: autoconfiguration error: can't find gpioint resource
[ 1.000004] ihidev1: WARNING: power management not supported
[ 1.000004] qcomiic0: WARNING: power management not supported
(...snip...)
[ 1.000004] qcomgpio0 at acpi0 (GIO0, QCOM0C0C-0): mem 0xf100000-0xfffffff irq 240,240,240,240,598,760,595,659,602,604,645,642,649,756,578,594
[ 1.000004] qcomgpio0: IRQ resource 0 -> 0xf0
[ 1.000004] qcomgpio0: IRQ resource 1 -> 0xf0
[ 1.000004] qcomgpio0: IRQ resource 2 -> 0xf0
[ 1.000004] qcomgpio0: IRQ resource 3 -> 0xf0
(...snip...)
[ 1.000004] qcomgpio0: GPIO pin count: 238
[ 1.000004] qcomgpio0: translate 0x340 -> 92
[ 1.000004] qcomgpio0: translate 0x140 -> 4294967295
[ 1.000004] qcomgpio0: autoconfiguration error: ignoring event for pin 0x140 (out of range)
[ 1.000004] qcomgpio0: translate 0x7e -> 126
[ 1.000004] gpio0 at qcomgpio0: 238 pins
[ 1.000004] qcomgpio0: WARNING: power management not supported
(no more mention of qcomgpio0 in the log)
Now, if I delay the autoconfiguration until after the interrupts are enabled, the order is swapped, the HIDs are initialized correctly, and the keyboard and touchpad work (both in wscons and in X):
[ 1.000004] qcomiic0 at acpi0 (I2C1, QCOM0C10-1): mem 0xb80000-0xb83fff irq 405
[ 1.000004] qcomiic0: claiming ECKB
[ 1.000004] qcomiic0: claiming TCPB
[ 1.000004] iic0 at qcomiic0: I2C bus
[ 1.000004] ihidev0 at iic0 addr 0x3a: vendor 0x6243 product 0x1, ECKB
[ 1.000004] ihidev0: 13 report ids
[ 1.000004] ihidev1 at iic0 addr 0x38: vendor 0x2808 product 0x106, TCPB
[ 1.000004] ihidev1: 13 report ids
[ 1.000004] qcomiic0: WARNING: power management not supported
(...snip...)
[ 1.000004] qcomgpio0 at acpi0 (GIO0, QCOM0C0C-0): mem 0xf100000-0xfffffff irq 240,240,240,240,598,760,595,659,602,604,645,642,649,756,578,594
[ 1.000004] qcomgpio0: IRQ resource 0 -> 0xf0
[ 1.000004] qcomgpio0: IRQ resource 1 -> 0xf0
[ 1.000004] qcomgpio0: IRQ resource 2 -> 0xf0
[ 1.000004] qcomgpio0: IRQ resource 3 -> 0xf0
(...snip...)
[ 1.000004] qcomgpio0: GPIO pin count: 238
[ 1.000004] qcomgpio0: translate 0x340 -> 92
[ 1.000004] qcomgpio0: translate 0x140 -> 4294967295
[ 1.000004] qcomgpio0: autoconfiguration error: ignoring event for pin 0x140 (out of range)
[ 1.000004] qcomgpio0: translate 0x7e -> 126
[ 1.000004] gpio0 at qcomgpio0: 238 pins
[ 1.000004] qcomgpio0: WARNING: power management not supported
(...snip...)
[ 1.453582] ihidev0: no IRQ resource
[ 1.453582] qcomgpio0: translate 0x180 -> 67
[ 1.453582] ihidev0: interrupting at qcomgpio0 pin 67 (low level)
[ 1.453582] ikbd0 at ihidev0 reportid 7
:) [ 1.453582] wskbd0 at ikbd0 mux 1
[ 1.453582] wskbd0: connecting to wsdisplay0
[ 1.453582] ikbd0: WARNING: power management not supported
[ 1.453582] hid at ihidev0 reportid 9 not configured
[ 1.453582] hid at ihidev0 reportid 11 not configured
[ 1.453582] hid at ihidev0 reportid 13 not configured
[ 1.453582] ihidev1: no IRQ resource
[ 1.453582] qcomgpio0: translate 0x380 -> 3
[ 1.453582] ihidev1: interrupting at qcomgpio0 pin 3 (low level)
[ 1.453582] ims0 at ihidev1 reportid 1: 2 buttons and Z dir
:) [ 1.453582] wsmouse0 at ims0 mux 0
(Interestingly, the keyboard LEDs (e.g. caps lock) stay unresponsive, but the actual functionality works correctly.)
I am completely new to NetBSD, both as a user and as a developer, so I don't know if this is the "correct" fix. It's just what I came up with after a few hours of tinkering, going through the docs, and looking at the other source files. Also, my apologies if I got any of the terminology wrong - corrections are appreciated!
>How-To-Repeat:
>Fix:
I accidentally diff'd against the wrong commit, but the patch applies fine to the current HEAD too:
diff -u a/src/sys/dev/i2c/ihidev.c b/src/sys/dev/i2c/ihidev.c
--- a/src/sys/dev/i2c/ihidev.c 2024-12-09 23:06:31.000000000 +0100
+++ b/src/sys/dev/i2c/ihidev.c 2026-11-07 09:40:39.228007595 +0100
@@ -110,6 +110,7 @@
static int ihidev_match(device_t, cfdata_t, void *);
static void ihidev_attach(device_t, device_t, void *);
+static void ihidev_finish_attach(device_t);
static int ihidev_detach(device_t, int);
CFATTACH_DECL_NEW(ihidev, sizeof(struct ihidev_softc),
ihidev_match, ihidev_attach, ihidev_detach, NULL);
@@ -158,11 +159,8 @@
{
struct ihidev_softc *sc = device_private(self);
struct i2c_attach_args *ia = aux;
- struct ihidev_attach_arg iha;
- device_t dev;
int repid, repsz;
int isize;
- int locs[IHIDBUSCF_NLOCS];
sc->sc_dev = self;
sc->sc_tag = ia->ia_tag;
@@ -215,11 +213,24 @@
device_xname(sc->sc_dev), repid, repsz));
}
sc->sc_ibuf = kmem_zalloc(sc->sc_isize, KM_SLEEP);
+ sc->sc_ia = *ia;
+ config_interrupts(self, ihidev_finish_attach);
+}
+
+static void
+ihidev_finish_attach(device_t self)
+{
+ struct ihidev_softc *sc = device_private(self);
+ struct ihidev_attach_arg iha;
+ device_t dev;
+ int repid;
+ int locs[IHIDBUSCF_NLOCS];
+
if (!ihidev_intr_init(sc)) {
return;
}
- iha.iaa = ia;
+ iha.iaa = &sc->sc_ia;
iha.parent = sc;
/* Look for a driver claiming all report IDs first. */
diff -u a/src/sys/dev/i2c/ihidev.h b/src/sys/dev/i2c/ihidev.h
--- a/src/sys/dev/i2c/ihidev.h 2024-12-08 21:49:56.000000000 +0100
+++ b/src/sys/dev/i2c/ihidev.h 2026-11-07 09:15:57.355118946 +0100
@@ -144,6 +144,8 @@
u_char *sc_ibuf;
int sc_refcnt;
+
+ struct i2c_attach_args sc_ia;
};
struct ihidev {
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.