From 07cdcc7bfbdba5f71b03b7c14484e598850b6e03 Mon Sep 17 00:00:00 2001 From: lichenggang Date: Mon, 16 Nov 2026 19:03:43 +0800 Subject: [PATCH] fix: add ModelPressurePad quirk for Lenovo ThinkBook 14/16 G8+ IPH MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Goodix GXTP5100 touchpads on the Lenovo ThinkBook 14 G8+ IPH and ThinkBook 16 G8+ IPH report pressure as contact size. Without a pressure pad quirk libinput can only click but cannot move the pointer. Add a ModelPressurePad quirk for these two exact models. The reverted patch (PR #8) used AttrInputProp=+INPUT_PROP_PRESSUREPAD. That property name is unknown to libevdev < 1.13.6, so the quirks parser fails and libinput discards the entire quirks database. Machines whose touchpad relies on a quirk (HONOR MagicBook Art 14, ThinkBook 14+ G6/G7, etc.) then lose it, which is why touchpads stopped working on some models. ModelPressurePad is the quirk supported by libinput 1.28.1 and does not depend on libevdev's property name table. Match the exact DMI modalias and the GXTP5100 device name instead of the shared Goodix USB IDs 27C6:01E7/27C6:01E8, so other Lenovo models are never affected. Log: Added a safe DMI-scoped pressure pad quirk for ThinkBook 14/16 G8+ IPH Influence: 1. Verify touchpad movement and click on ThinkBook 14 G8+ IPH 2. Verify touchpad movement and click on ThinkBook 16 G8+ IPH 3. Verify touchpads on other Lenovo models sharing 27C6:01E7/27C6:01E8 4. Verify HONOR MagicBook Art 14 and ThinkBook 14+ G6/G7 keep working 5. Run libinput quirks validate fix: 为 Lenovo ThinkBook 14/16 G8+ IPH 添加 ModelPressurePad quirk Lenovo ThinkBook 14/16 G8+ IPH 上的 Goodix GXTP5100 触摸板将压力值 上报为接触面积。缺少压力板 quirk 时 libinput 只能点击而无法移动指针, 因此为这两个具体机型添加 ModelPressurePad quirk。 被回退的补丁(PR #8)使用 AttrInputProp=+INPUT_PROP_PRESSUREPAD。 libevdev < 1.13.6 不认识该属性名,quirk 解析失败后 libinput 会丢弃 整个 quirks 数据库,依赖 quirk 的机型(HONOR MagicBook Art 14、 ThinkBook 14+ G6/G7 等)随之丢失 quirk,这正是部分机型触摸板失效的 原因。 ModelPressurePad 是 libinput 1.28.1 支持的 quirk,不依赖 libevdev 的属性名表。匹配时使用精确的 DMI modalias 和 GXTP5100 设备名,而不是 共用的 Goodix USB ID 27C6:01E7/27C6:01E8,避免影响其他 Lenovo 机型。 Log: 新增按 DMI 精确匹配的 ThinkBook 14/16 G8+ IPH 压力板 quirk Influence: 1. 验证 ThinkBook 14 G8+ IPH 触摸板移动和点击 2. 验证 ThinkBook 16 G8+ IPH 触摸板移动和点击 3. 验证共用 27C6:01E7/27C6:01E8 的其他 Lenovo 机型触摸板正常 4. 验证 HONOR MagicBook Art 14、ThinkBook 14+ G6/G7 不受影响 5. 运行 libinput quirks validate repo: libinput #master --- debian/changelog | 13 ++++ ...ad-quirk-for-Lenovo-ThinkBook-G8-IPH.patch | 61 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 75 insertions(+) create mode 100644 debian/patches/quirks-add-pressure-pad-quirk-for-Lenovo-ThinkBook-G8-IPH.patch diff --git a/debian/changelog b/debian/changelog index 741431e..c6c184d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,16 @@ +libinput (1.28.1-1+deb13u1deepin2) unstable; urgency=medium + + * Add a DMI-scoped ModelPressurePad quirk for the Lenovo ThinkBook + 14/16 G8+ IPH touchpad. + * Use ModelPressurePad instead of AttrInputProp=+INPUT_PROP_PRESSUREPAD: + the latter is unknown to libevdev < 1.13.6 and made libinput discard + the whole quirks database, breaking touchpads on other models. + * Match the exact DMI modalias instead of the shared Goodix USB IDs + 27C6:01E7/27C6:01E8. + * Ref: https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1442 + + -- lichenggang Mon, 16 Nov 2026 19:00:18 +0800 + libinput (1.28.1-1+deb13u1deepin1) unstable; urgency=medium * Rebuild with LTO enabled (dpkg vendor feature optimize/lto). diff --git a/debian/patches/quirks-add-pressure-pad-quirk-for-Lenovo-ThinkBook-G8-IPH.patch b/debian/patches/quirks-add-pressure-pad-quirk-for-Lenovo-ThinkBook-G8-IPH.patch new file mode 100644 index 0000000..15a73b6 --- /dev/null +++ b/debian/patches/quirks-add-pressure-pad-quirk-for-Lenovo-ThinkBook-G8-IPH.patch @@ -0,0 +1,61 @@ +From: lichenggang +Date: Mon, 16 Nov 2026 10:30:00 +0800 +Subject: quirks: add ModelPressurePad quirk for Lenovo ThinkBook 14/16 G8+ IPH + +The Goodix GXTP5100 touchpads on the Lenovo ThinkBook 14 G8+ IPH and +ThinkBook 16 G8+ IPH report pressure as contact size. Without a pressure +pad quirk libinput can only click but cannot move the pointer. + +Add a ModelPressurePad quirk for these two exact models. + +The previously reverted patch (PR #8) added +AttrInputProp=+INPUT_PROP_PRESSUREPAD. That property name is not known to +libevdev < 1.13.6, so parse_input_prop_property() fails and the failure +propagates up through parse_file()/parse_files(): libinput then gives up +on the *entire* quirks database ("Failed to load the device quirks ... +This will negatively affect device behavior"). Every model that relies +on a quirk - e.g. the HONOR MagicBook Art 14 or the ThinkBook 14+ G6/G7 +pressure pads - loses its quirk, which is why touchpads stopped working +on some machines. + +This version uses ModelPressurePad=1, which is supported by libinput +1.28.1 and does not rely on libevdev knowing the property name. The +match is also scoped to the exact DMI modalias and the GXTP5100 device +name instead of the shared Goodix USB IDs (27C6:01E7/27C6:01E8), so +other Lenovo models cannot be affected. + +Ref: https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1442 +Forwarded: https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1442 +Signed-off-by: lichenggang +--- + quirks/50-system-lenovo.quirks | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +diff --git a/quirks/50-system-lenovo.quirks b/quirks/50-system-lenovo.quirks +index 73b4167..4954881 100644 +--- a/quirks/50-system-lenovo.quirks ++++ b/quirks/50-system-lenovo.quirks +@@ -417,3 +417,23 @@ MatchName=*GXTP5100* + MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkBook14G7+IAH*:* + MatchUdevType=touchpad + ModelPressurePad=1 ++ ++# The Goodix GXTP5100 touchpads on the ThinkBook 14/16 G8+ IPH report ++# pressure as contact size, so libinput can only click but cannot move ++# the pointer. Mark these exact models as pressure pads. ++# ++# Match on the DMI modalias and the device name instead of the Goodix ++# USB IDs (27C6:01E7/27C6:01E8): those IDs are shared with touchpads on ++# other Lenovo models that are not pressure pads and must not get this ++# quirk. ++[Lenovo ThinkBook 14 G8+ IPH touchpad] ++MatchName=*GXTP5100* ++MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkBook14G8+IPH*:* ++MatchUdevType=touchpad ++ModelPressurePad=1 ++ ++[Lenovo ThinkBook 16 G8+ IPH touchpad] ++MatchName=*GXTP5100* ++MatchDMIModalias=dmi:*svnLENOVO:*pvrThinkBook16G8+IPH*:* ++MatchUdevType=touchpad ++ModelPressurePad=1 diff --git a/debian/patches/series b/debian/patches/series index a97901a..8320f34 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,3 +3,4 @@ tools-remove-references-to-libinput_quir.patch util-don-t-call-function-in-macro-argument.patch util-sanitize-control-characters-in-str_sanitize.patch libinput-device-group-sanitize-phys-before-printing-.patch +quirks-add-pressure-pad-quirk-for-Lenovo-ThinkBook-G8-IPH.patch