Ubuntu 20.04,内核 5.15.0-43-generic。xinput 检测到触摸板:
$ sudo xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Logitech USB Optical Mouse id=17 [slave pointer (2)]
⎜ ↳ Apple Inc. Magic Trackpad 2 id=9 [slave pointer (2)]
⎜ ↳ Apple Inc. Magic Trackpad 2 id=10 [slave pointer (2)]
evtest 表明设备产生事件
$ sudo evtest /dev/input/event23
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x5ac product 0x265 version 0x110
Input device name: "Apple Inc. Magic Trackpad 2"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 272 (BTN_LEFT)
Event code 325 (BTN_TOOL_FINGER)
Event code 328 (BTN_TOOL_QUINTTAP)
Event code 330 (BTN_TOUCH)
Event code 333 (BTN_TOOL_DOUBLETAP)
Event code 334 (BTN_TOOL_TRIPLETAP)
Event code 335 (BTN_TOOL_QUADTAP)
Event type 3 (EV_ABS)
Event code 0 (ABS_X)
Value 0
Min -3678
Max 3934
Resolution 47
..............
Event: time 1659540389.373966, -------------- SYN_REPORT ------------
Event: time 1659540389.393961, type 3 (EV_ABS), code 0 (ABS_X), value 2086
Event: time 1659540389.393961, type 3 (EV_ABS), code 1 (ABS_Y), value 2872
Event: time 1659540389.393961, -------------- SYN_REPORT ------------
Event: time 1659540389.413961, type 3 (EV_ABS), code 0 (ABS_X), value 2050
Event: time 1659540389.413961, type 3 (EV_ABS), code 1 (ABS_Y), value 2916
Event: time 1659540389.413961, -------------- SYN_REPORT ------------
Event: time 1659540389.434967, type 3 (EV_ABS), code 0 (ABS_X), value 2072
Event: time 1659540389.434967, type 3 (EV_ABS), code 1 (ABS_Y), value 2940
Event: time 1659540389.434967, -------------- SYN_REPORT ------------
Event: time 1659540389.455013, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1659540389.455013, -------------- SYN_REPORT ------------
Event: time 1659540389.470993, type 3 (EV_ABS), code 40 (ABS_MISC), value 0
Event: time 1659540389.470993, type 3 (EV_ABS), code 0 (ABS_X), value 0
Event: time 1659540389.470993, type 3 (EV_ABS), code 1 (ABS_Y), value 0
Event: time 1659540389.470993, -------------- SYN_REPORT ------------
但是 xev 什么都没显示,并且鼠标指针也没有移动。
答案1
psmouse
你好,我发现解决方案只是在桌面上安装模块。
sudo modprobe psmouse