Thread (15 messages) 15 messages, 3 authors, 4d ago

Re: [PATCH v4] HID: multitouch: add support for Goodix GXTP7863 touchpad

From: Ruzal <hidden>
Date: 2026-09-19 09:23:53
Also in: lkml
Subsystem: hid core layer, the rest · Maintainers: Jiri Kosina, Benjamin Tissoires, Linus Torvalds

On 9/18/26 9:01 PM, Ruzal wrote:
Both descriptor-level approaches confirm what you suspected: modifying the
descriptor still leaves the application collection instantiated as an empty/
broken input node, which trips up libinput and blocks the compositor event
loop for ~15 seconds.
Hi Benjamin,

Quick update on the stall and a tested quirk fix:

The userspace stall happens because unrecognized vendor pages hit
`unknown:` in hid-input.c:1420 (`map_abs(ABS_MISC)`). This sets EV_ABS,
causing hidinput_has_been_populated() to return true and register an
anomalous node with only ABS_MISC, which trips up libinput.

Instead of touching the descriptor, we can handle this via hid-multitouch:
- Add MT_QUIRK_IGNORE_VENDOR_TELEMETRY to drop HID_UP_HPVENDOR2 in mt_input_mapping().
- Add MT_CLS_GOODIX (mirroring MT_CLS_WIN_8 quirks).
- Bind with HID_GROUP_MULTITOUCH_WIN_8 in mt_devices[] (preserving INPUT_PER_APP).

This drops the phantom input node while leaving raw reports on /dev/hidraw intact.

I built the module and tested loading it: /proc/bus/input/devices no longer
creates the UNKNOWN node, and /dev/hidraw0 remains available.

Diff:

---
 drivers/hid/hid-ids.h        |  1 +
 drivers/hid/hid-multitouch.c | 27 +++++++++++++++++++++++++++
 2 files changed, 28 insertions(+)
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index b3aca5aa9176..d0850a98c9f8 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -567,6 +567,7 @@
 #define USB_DEVICE_ID_GENERAL_TOUCH_WIN8_PIT_E100 0xe100
 
 #define I2C_VENDOR_ID_GOODIX		0x27c6
+#define I2C_DEVICE_ID_GOODIX_01E0	0x01e0
 #define I2C_DEVICE_ID_GOODIX_01E8	0x01e8
 #define I2C_DEVICE_ID_GOODIX_01E9	0x01e9
 #define I2C_DEVICE_ID_GOODIX_01F0	0x01f0
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
index 451c7324e6a0..2e973a3b652b 100644
--- a/drivers/hid/hid-multitouch.c
+++ b/drivers/hid/hid-multitouch.c
@@ -79,6 +79,7 @@ MODULE_LICENSE("GPL");
 #define MT_QUIRK_APPLE_TOUCHBAR		BIT(23)
 #define MT_QUIRK_YOGABOOK9I		BIT(24)
 #define MT_QUIRK_KEEP_LATENCY_ON_CLOSE	BIT(25)
+#define MT_QUIRK_IGNORE_VENDOR_TELEMETRY	BIT(26)
 
 #define MT_INPUTMODE_TOUCHSCREEN	0x02
 #define MT_INPUTMODE_TOUCHPAD		0x03
@@ -235,6 +236,7 @@ static void mt_post_parse(struct mt_device *td, struct mt_application *app);
 #define MT_CLS_APPLE_TOUCHBAR			0x0114
 #define MT_CLS_YOGABOOK9I			0x0115
 #define MT_CLS_EGALAX_P80H84			0x0116
+#define MT_CLS_GOODIX				0x0117
 #define MT_CLS_SIS				0x0457
 
 #define MT_DEFAULT_MAXCONTACT	10
@@ -457,6 +459,15 @@ static const struct mt_class mt_classes[] = {
 			MT_QUIRK_IGNORE_DUPLICATES |
 			MT_QUIRK_CONTACT_CNT_ACCURATE,
 	},
+	{ .name = MT_CLS_GOODIX,
+		.quirks = MT_QUIRK_ALWAYS_VALID |
+			MT_QUIRK_IGNORE_DUPLICATES |
+			MT_QUIRK_HOVERING |
+			MT_QUIRK_CONTACT_CNT_ACCURATE |
+			MT_QUIRK_STICKY_FINGERS |
+			MT_QUIRK_WIN8_PTP_BUTTONS |
+			MT_QUIRK_IGNORE_VENDOR_TELEMETRY,
+		.export_all_inputs = true },
 	{ }
 };
 
@@ -1524,6 +1535,17 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
 		return 1;
 	}
 
+	/*
+	 * Goodix FreeTouch devices emit a periodic heartbeat on vendor
+	 * page 0xFF01 which hid-input would otherwise map to
+	 * KEY_MICMUTE / KEY_BRIGHTNESS*, creating a phantom keyboard.
+	 * Drop it here so no input node is exported; the report remains
+	 * available through hidraw.
+	 */
+	if ((application->quirks & MT_QUIRK_IGNORE_VENDOR_TELEMETRY) &&
+	    (usage->hid & HID_USAGE_PAGE) == HID_UP_HPVENDOR2)
+		return -1;
+
 	if (rdata->is_mt_collection)
 		return mt_touch_input_mapping(hdev, hi, field, usage, bit, max,
 					      application);
@@ -2457,6 +2479,11 @@ static const struct hid_device_id mt_devices[] = {
 	  HID_DEVICE(BUS_I2C, HID_GROUP_ANY, I2C_VENDOR_ID_GOODIX,
 		     I2C_DEVICE_ID_GOODIX_01E9) },
 
+	/* Goodix GXTP7863 device with FreeTouch heartbeat on page 0xFF01 */
+	{ .driver_data = MT_CLS_GOODIX,
+	  HID_DEVICE(BUS_I2C, HID_GROUP_MULTITOUCH_WIN_8, I2C_VENDOR_ID_GOODIX,
+		     I2C_DEVICE_ID_GOODIX_01E0) },
+
 	/* GoodTouch panels */
 	{ .driver_data = MT_CLS_NSMU,
 		MT_USB_DEVICE(USB_VENDOR_ID_GOODTOUCH,
If this approach looks good to you, I can formally submit it as [PATCH v5].

Cheers,
Ruzal
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help