[BUG] HID: i2c-hid: ELAN 04F3:30FD touchpad reset race causes -EREMOTEIO on HP Pavilion Gaming 15-ec1xxx
Adam <[email protected]> Mon, 10 Aug 2026 19:31:32 +0200
| Newsgroups | org.kernel.vger.linux-input |
|---|---|
| Message-ID | <CAEru=6LrMqg93AKrmbTJtvRNPx=arYuhSf4zMw4bK1SjWQQvrw@mail.gmail.com> |
Hello, I'm reporting a reproducible probe failure for an ELAN i2c-hid touchpad (ACPI ELAN0718:00, VID:PID 04F3:30FD) on an HP Pavilion Gaming 15-ec1033nw (AMD platform, i2c bus under AMDI0010:03). The touchpad fails to initialize on nearly every boot on Linux, while the same hardware works reliably every time under Windows 11 on the same machine (dual context, same BIOS F.35 rev.A). Kernel: 7.1.6-arch1-1 (Arch Linux) Also reported by other users with the same touchpad ID on different kernels/distros (Arch, Ubuntu, Linux Mint) going back to at least 2022: - https://bbs.archlinux.org/viewtopic.php?id=277393 - https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2031061 - https://forums.linuxmint.com/viewtopic.php?t=329212 Symptom (default logging): i2c_hid_acpi i2c-ELAN0718:00: failed to fetch HID descriptor: -121 i2c_hid_acpi i2c-ELAN0718:00: Failed to fetch the HID Descriptor i2c_hid_acpi i2c-ELAN0718:00: probe with driver i2c_hid_acpi failed with error -121 With dynamic_debug enabled for i2c_hid and i2c_hid_acpi: i2c_hid_start_hwreset i2c_hid_set_power: cmd=05 00 00 08 i2c_hid_xfer: cmd=05 00 00 01 i2c_hid_finish_hwreset: waiting... i2c_hid_finish_hwreset: finished. asking HID report descriptor i2c_hid_xfer: cmd=02 00 reading report descriptor failed can't add hid device: -121 probe with driver i2c_hid_acpi failed with error -121 Note the device is already tagged with I2C_HID_QUIRK_BOGUS_IRQ and I2C_HID_QUIRK_NO_WAKEUP_AFTER_RESET via the USB_VENDOR_ID_ELAN, HID_ANY_ID entry in i2c_hid_quirks[], but this specific chip still appears to need additional settle time between the reset-complete IRQ and the immediately following descriptor read - the two happen back to back (sub-millisecond apart in the trace) with zero delay. The i2c bus and controller are not at fault: an ACPI-level PCI remove/rescan of the SMBus controller (0000:00:14.0, piix4_smbus) successfully re-enumerates the bus, and once probe *does* succeed (intermittently - roughly 1 in 10-15 boots in my testing), the touchpad works completely normally for the rest of the session. This points to a narrow timing race rather than a persistent hardware/firmware fault. Windows never exhibits this behavior on the same machine. I tested a draft workaround patch (attached) attempting to add msleep() delays after i2c_hid_finish_hwreset() and before descriptor fetch for devices with I2C_HID_QUIRK_BOGUS_IRQ, but the issue still persists on my machine. I am attaching the patch and debug logs in hopes that maintainers can pinpoint the exact timing, sequence, or quirk needed for this ELAN revision. Happy to test alternate patches, adjust delay values, or gather any additional traces (i2cdump, further dynamic_debug, ACPI tables via acpidump) if useful. Hardware: - HP Pavilion Gaming 15-ec1033nw - AMD Ryzen 5 4600H - BIOS F.35 rev.A (latest per HP support site) - Touchpad: ACPI ELAN0718:00, USB VID:PID 04F3:30FD, on i2c-3 / AMDI0010:03 Let me know if you'd like the full dmesg, acpidump, or anything else. Thanks, Adam
elan-touchpad-bogus-irq-reset-delay.patch
(text/x-patch, 1.4 KB)
--- a/drivers/hid/i2c-hid/i2c-hid-core.c
+++ b/drivers/hid/i2c-hid/i2c-hid-core.c
@@ -520,6 +520,18 @@
if (!(ihid->quirks & I2C_HID_QUIRK_NO_WAKEUP_AFTER_RESET))
ret = i2c_hid_set_power(ihid, I2C_HID_PWR_ON);
+ /*
+ * Some ELAN i2c-hid touchpads (e.g. 04F3:30FD, seen on HP Pavilion
+ * Gaming 15-ec1xxx) signal reset-complete via IRQ before they are
+ * actually ready to answer the immediately following HID/report
+ * descriptor read, causing a spurious -EREMOTEIO (-121). The
+ * Windows driver is known to insert a delay after PWR_ON/RESET
+ * (see comment in i2c_hid_set_power above); give this quirky class
+ * of ELAN devices the same grace period.
+ */
+ if (ihid->quirks & I2C_HID_QUIRK_BOGUS_IRQ)
+ msleep(100);
+
return ret;
}
@@ -1052,6 +1064,18 @@
return -ENXIO;
}
+ /*
+ * Some ELAN i2c-hid touchpads (e.g. 04F3:30FD, seen on HP Pavilion
+ * Gaming 15-ec1xxx) are not yet ready to answer the very first HID
+ * descriptor read on cold boot / power-on, before any reset has
+ * even been issued, causing an intermittent -EREMOTEIO (-121) here.
+ * Give this quirky class of ELAN devices a short grace period,
+ * mirroring the delay already applied after hwreset for the same
+ * quirk further down in this file.
+ */
+ if (ihid->quirks & I2C_HID_QUIRK_BOGUS_IRQ)
+ msleep(200);
+
ret = i2c_hid_fetch_hid_descriptor(ihid);
if (ret < 0) {
dev_err(&client->dev,