Repository navigation
Conversation
Backport the upstream INPUT_PROP_PRESSUREPAD support and the touchpad
quirk entries added between 1.28.1 and 1.32.0.
Upstream replaced the ModelPressurePad quirk with
AttrInputProp=+INPUT_PROP_PRESSUREPAD and, while doing so, had to fix two
things that this version also needs:
a) the vendored linux headers do not define INPUT_PROP_PRESSUREPAD
(0x07), added upstream in 7621edab;
b) libevdev < 1.13.6 does not know the name "INPUT_PROP_PRESSUREPAD",
so parse_input_prop_property() fails and libinput discards the whole
quirks database. Upstream added a name fallback in db6a0466, and
made tp_init_pressurepad() honour the property as well.
Point b is the root cause of the touchpad regression that forced the
reverted debian patch (PR #8). Keeping ModelPressurePad alongside it
means the existing ThinkBook G6+/G7+ and HONOR quirks keep working.
On top of that, 37 touchpad quirk sections from upstream are imported
verbatim: Goodix 27C6:01E7/01E8/01E9/01EA/01EB/0F90/0F95/0F96, Elan
04F3:3355, Pixart 093A:4811/0255/0274/1336/200F, Synaptics 06CB:D024,
Dell 0488:108C/108D and 2C2F:0033/0034 and 06CB:D01A/D01D, plus Hantick,
Clevetura, Microsoft Surface Pro 10, Google Chromebook Roric/Rull,
Samsung Galaxy Book 4 360, Positivo, Wareus B15, Getac X600,
GPD MicroPC 2, Acer Nitro ANV16-42, EAECIS NL60R, HP OmniBook Ultra Flip
and Lenovo ThinkPad P14s Gen 6.
Entries that depend on quirks unknown to 1.28.1 are left out on purpose
(AttrTouchpadHysteresis, ModelCircularTouchpad, ModelScrollOnMiddleClick,
AttrIsVirtual); including them would make the parser reject the file and
lose the whole database again. All 304 existing quirk sections are kept
unchanged.
Log: Imported upstream INPUT_PROP_PRESSUREPAD support and 37 touchpad quirk entries
Influence:
1. Verify a quirk using AttrInputProp=+INPUT_PROP_PRESSUREPAD no longer breaks the quirks database
2. Verify haptic touchpads (Goodix/Elan/Pixart/Synaptics/Dell) move the cursor
3. Verify existing ThinkBook G6+/G7+, HONOR MagicBook Art 14 quirks still apply
4. Verify devices relying on ModelPressurePad behave as before
5. Run libinput quirks validate and the quirks test suite
feat: 回合上游触摸板支持(压力板/触感触摸板)
回合上游 1.28.1 到 1.32.0 之间新增的 INPUT_PROP_PRESSUREPAD 支持及其
触摸板 quirk 条目。
上游用 AttrInputProp=+INPUT_PROP_PRESSUREPAD 取代了 ModelPressurePad,
并为此修了两个问题,本版本同样需要:
a) 自带的内核头文件缺少 INPUT_PROP_PRESSUREPAD(0x07) 定义,上游在
7621edab 中补上;
b) libevdev < 1.13.6 不认识 "INPUT_PROP_PRESSUREPAD" 这个名字,
parse_input_prop_property() 会失败,导致 libinput 丢弃整个 quirks
数据库。上游在 db6a0466 中加了名称兜底,同时让
tp_init_pressurepad() 也认这个属性。
b) 正是导致触摸板失效、进而回退补丁(PR #8)的根因。保留
ModelPressurePad 是为了让已有的 ThinkBook G6+/G7+、HONOR 等 quirk 继续
生效。
此外逐字引入上游 37 个触摸板 quirk 条目:Goodix
27C6:01E7/01E8/01E9/01EA/01EB/0F90/0F95/0F96、Elan 04F3:3355、
Pixart 093A:4811/0255/0274/1336/200F、Synaptics 06CB:D024、Dell
0488:108C/108D 与 2C2F:0033/0034、06CB:D01A/D01D,以及 Hantick、
Clevetura、Microsoft Surface Pro 10、Google Chromebook Roric/Rull、
Samsung Galaxy Book 4 360、Positivo、Wareus B15、Getac X600、
GPD MicroPC 2、Acer Nitro ANV16-42、EAECIS NL60R、
HP OmniBook Ultra Flip、Lenovo ThinkPad P14s Gen 6。
依赖 1.28.1 不支持的新 quirk 的条目(AttrTouchpadHysteresis、
ModelCircularTouchpad、ModelScrollOnMiddleClick、AttrIsVirtual)刻意
不引入,否则解析失败会再次拖垮整个数据库。原有 304 个 quirk section
全部保持不变。
Log: 引入上游 INPUT_PROP_PRESSUREPAD 支持及 37 个触摸板 quirk 条目
Influence:
1. 验证 AttrInputProp=+INPUT_PROP_PRESSUREPAD 不再导致 quirks 库加载失败
2. 验证各触感触摸板(Goodix/Elan/Pixart/Synaptics/Dell)可移动光标
3. 验证已有 ThinkBook G6+/G7+、HONOR MagicBook Art 14 quirk 仍生效
4. 验证依赖 ModelPressurePad 的设备行为不变
5. 运行 libinput quirks validate 与 quirk 测试套件
repo: libinput #master
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Contributor
|
/hold |
|
TAG Bot TAG: 1.28.1-1+deb13u1deepin3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
上一轮为 Lenovo ThinkBook G8+ IPH 提交了 PR #15(
ModelPressurePad写法)。这次按上游实际演进方向,把 1.28.1 → 1.32.0 之间上游新增的触摸板支持整体回合,同时把压力板机制对齐上游。本 PR 独立于 #15(不含 #15 内容),版本号用
deepin3以避开 #15 的deepin2;两者合并顺序不受限制。关键发现:上游已废弃 ModelPressurePad
上游在 1.31/1.32 删除了
ModelPressurePad这个 quirk key(bde6d07d),全部改用AttrInputProp=+INPUT_PROP_PRESSUREPAD,并为此修了两处代码。这直接印证了 PR #8 回退的真实根因是解析失败,而不是 ID 匹配:7621edab— 自带内核头文件缺宏:include/linux/*/input-event-codes.h里没有INPUT_PROP_PRESSUREPAD (0x07)。db6a0466— libevdev 名字表缺项:libevdev < 1.13.6不认识"INPUT_PROP_PRESSUREPAD",parse_input_prop_property()返回失败,错误经parse_file()/parse_files()上抛,quirks_init_subsystem()返回 NULL,libinput 丢弃整个 quirks 数据库。这正是"部分机型触摸板失效"的机制。db6a0466— 消费点不认该属性:tp_init_pressurepad()原本只看ABS_MT_PRESSURE分辨率和ModelPressurePad,需补上libevdev_has_property(INPUT_PROP_PRESSUREPAD)。本 PR 把这三处按上游原样回传,并保留
ModelPressurePad兼容路径,保证既有 ThinkBook G6+/G7+、HONOR MagicBook Air 14 等 quirk 继续生效。quirk 数据
逐字引入上游 37 个新触摸板 section(注释与顺序保持上游原样,便于后续 refresh):
其中 9 个为上游新增 quirk 文件,9 个为在既有文件内追加。
刻意未纳入的条目
以下上游条目依赖 1.28.1 不存在的 quirk key,照搬会让解析失败并再次拖垮整个数据库,故排除:
AttrTouchpadHysteresis(Framework Laptop 13 Pro)ModelCircularTouchpad(Panasonic Let's Note CF-SV1/SV8/SC6/FV1,需新增圆形滚动特性与源文件)ModelScrollOnMiddleClick(Logitech MX Master 4)AttrIsVirtual(QEMU / Oracle / VMware 虚拟设备)ModelHPPavilionDM4Touchpad、ModelClevoW740SU、ModelSystem76Galago、ModelSystem76Kudu这些需要另开 PR 单独引入对应特性。
验证
在 1.28.1 源码树上实际套用两个补丁后实测(非仅静态检查):
libinput-quirks validate --data-dir=quirks→ exit 0;test/test_quirks_files.py→ 118 passed(含 configparser 严格模式,可捕获重复 section);origin/master为基线,原有 304 个 section 全部保留、内容零改动,净增 37 个(合计 341);+INPUT_PROP_PRESSUREPAD解析成功、-INPUT_PROP_BUTTONPAD/+0x07正常、未知名字仍被拒绝(兜底是名称精确匹配,不放宽其他输入)、libevdev_enable_property(0x07)后has_property为真 →tp_init_pressurepad()分支会触发。修复过程中的一个真实缺陷也是靠这套验证抓到的:初版误加了上游
Dell i2c Touchpads与Precision 7x50 Touchpad两个已存在于 1.28.1 的 section(仅 DMI 写法略有差异),validate能通过但test_quirks_files.py的 configparser 严格模式报 duplicate section,已删除重复副本。测试建议
ModelPressurePad的机器:行为与升级前一致;sudo libinput quirks validate与libinput list-devices确认 quirks 数据库正常加载(日志中不应出现Failed to load the device quirks)。