我正在 Thinkpad X1 Yoga Gen 6 上测试 Debian Bullseye,使用带有 KDE 和非免费驱动程序的 Live CD (debian-live-11.5.0-amd64-kde+nonfree.iso
)。我想在擦除硬盘之前确保我需要的一切都可以正常工作。
一切似乎确实有效,除了当我用手指触摸对象或按钮时,这些对象或按钮不会按预期单击,最多只能选择。这似乎发生在与plasma/Qt 相关的任何事情上:
- 触摸等离子面板上的任何图标(包括应用程序启动器)只是将光标放置在那里;
- 触摸 KDE 应用程序/设置对话框中的按钮会选择它们,但不会单击它们;
- 触摸 KDE 应用程序中的菜单会展开它们,但触摸菜单项只会选择它们(例如 Konqueror 中的“文件”->“新选项卡”)。
情况手指按预期工作:
- 网页上的所有内容(HTML 按钮、YouTube 等 HTML5 控件)
- 非 KDE 应用程序中的所有内容(例如 Firefox)
- 窗口标题栏按钮(最小化/最大化/关闭)全部应用。
随附的 Wacom 数字笔始终按预期工作(触摸物体会单击它)。
以下是一些可能相关的信息:
KDE 等离子版本:5.20.5
KDE 框架版本:5.78.0
Qt版本:5.15.2
user@debian:~$ uname -a
Linux debian 5.10.0-18-amd64 #1 SMP Debian 5.10.140-1 (2022-09-02) x86_64 GNU/Linux
user@debian:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
user@debian:~$ sudo Xorg -version
X.Org X Server 1.20.11
X Protocol Version 11, Revision 0
Build Operating System: linux Debian
Current Operating System: Linux debian 5.10.0-18-amd64 #1 SMP Debian 5.10.140-1 (2022-09-02) x86_64
Kernel command line: BOOT_IMAGE=(hd0,gpt4)/live/vmlinuz-5.10.0-18-amd64 boot=live quiet splash fsck.mode=skip persistence --
Build Date: 05 August 2022 08:00:36AM
xorg-server 2:1.20.11-1+deb11u2 (https://www.debian.org/support)
Current version of pixman: 0.40.0
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
user@debian:~$ lsmod|grep wacom
wacom 131072 0
usbhid 65536 1 wacom
hid 147456 7 i2c_hid,wacom,usbhid,hid_multitouch,hid_sensor_hub,intel_ishtp_hid,hid_generic
相关dmesg
线路:
user@debian:~$ sudo dmesg|grep -i wacom
[ 2.483787] input: Wacom HID 5278 Pen as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-1/i2c-WACF2200:00/0018:056A:5278.0002/input/input15
[ 2.483979] input: Wacom HID 5278 Finger as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-1/i2c-WACF2200:00/0018:056A:5278.0002/input/input16
[ 2.484211] wacom 0018:056A:5278.0002: hidraw1: I2C HID v1.00 Mouse [WACF2200:00 056A:5278] on i2c-WACF2200:00
user@debian:~$ sudo dmesg|grep -i screen
[ 2.245919] input: WACF2200:00 056A:5278 Touchscreen as /devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-1/i2c-WACF2200:00/0018:056A:5278.0002/input/input9
xinput
和evdev
:
user@debian:~$ cat /proc/bus/input/devices
[...]
I: Bus=0018 Vendor=056a Product=5278 Version=0100
N: Name="Wacom HID 5278 Pen"
P: Phys=i2c-WACF2200:00
S: Sysfs=/devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-1/i2c-WACF2200:00/0018:056A:5278.0002/input/input15
U: Uniq=
H: Handlers=mouse2 event7
B: PROP=2
B: EV=1b
B: KEY=1e03 0 0 0 0 0
B: ABS=1000d000003
B: MSC=1
I: Bus=0018 Vendor=056a Product=5278 Version=0100
N: Name="Wacom HID 5278 Finger"
P: Phys=i2c-WACF2200:00
S: Sysfs=/devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-1/i2c-WACF2200:00/0018:056A:5278.0002/input/input16
U: Uniq=
H: Handlers=mouse3 event8
B: PROP=2
B: EV=b
B: KEY=400 0 0 0 0 0
B: ABS=260800000000003
[...]
user@debian:~$ xinput|grep Wacom
⎜ ↳ Wacom HID 5278 Pen stylus id=13 [slave pointer (2)]
⎜ ↳ Wacom HID 5278 Finger touch id=14 [slave pointer (2)]
⎜ ↳ Wacom HID 5278 Pen eraser id=20 [slave pointer (2)]
user@debian:~$ xinput list-props 14
Device 'Wacom HID 5278 Finger touch':
Device Enabled (188): 1
Coordinate Transformation Matrix (190): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (319): 0
Device Accel Constant Deceleration (320): 1.000000
Device Accel Adaptive Deceleration (321): 1.000000
Device Accel Velocity Scaling (322): 10.000000
Device Node (311): "/dev/input/event8"
Wacom Tablet Area (363): 0, 0, 12064, 7540
Wacom Rotation (364): 0
Wacom Pressurecurve (365): 0, 0, 100, 100
Wacom Serial IDs (366): 21112, 1, 3, 0, 0
Wacom Serial ID binding (367): 0
Wacom Pressure Threshold (368): 0
Wacom Sample and Suppress (369): 2, 4
Wacom Enable Touch (370): 1
Wacom Enable Touch Gesture (372): 1
Wacom Touch Gesture Parameters (373): 530, 235, 250
Wacom Tool Type (374): "TOUCH" (381)
Wacom Button Actions (375): "Wacom button action 0" (376), "Wacom button action 1" (377), "Wacom button action 2" (378)
Wacom button action 0 (376): 1572865
Wacom button action 1 (377): 1572866
Wacom button action 2 (378): 1572867
Device Product ID (312): 1386, 21112
Wacom Debug Levels (380): 0, 0
看来触摸屏幕确实会产生正确的事件:当我触摸屏幕时,我看到了button press 1
和。button release 1
xinput
evtest
user@debian:~$ xinput test 14
motion a[0]=8704 a[1]=4839 a[2]=0 a[3]=0 a[4]=0 a[5]=0
button press 1 a[0]=8704 a[1]=4839 a[2]=0 a[3]=0 a[4]=0 a[5]=0
motion a[0]=8701 a[1]=4836 a[2]=0 a[3]=0 a[4]=0 a[5]=0
button release 1
user@debian:~$ sudo evtest /dev/input/event8
Input driver version is 1.0.1
Input device ID: bus 0x18 vendor 0x56a product 0x5278 version 0x100
Input device name: "Wacom HID 5278 Finger"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 330 (BTN_TOUCH)
Event type 3 (EV_ABS)
Event code 0 (ABS_X)
Value 8833
Min 0
Max 12064
Resolution 40
Event code 1 (ABS_Y)
Value 1925
Min 0
Max 7540
Resolution 40
Event code 47 (ABS_MT_SLOT)
Value 0
Min 0
Max 9
Event code 53 (ABS_MT_POSITION_X)
Value 0
Min 0
Max 12064
Resolution 40
Event code 54 (ABS_MT_POSITION_Y)
Value 0
Min 0
Max 7540
Resolution 40
Event code 57 (ABS_MT_TRACKING_ID)
Value 0
Min 0
Max 65535
Properties:
Property type 1 (INPUT_PROP_DIRECT)
Testing ... (interrupt to exit)
Event: time 1668884040.469294, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value 770
Event: time 1668884040.469294, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 9293
Event: time 1668884040.469294, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 3886
Event: time 1668884040.469294, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 1
Event: time 1668884040.469294, type 3 (EV_ABS), code 0 (ABS_X), value 9293
Event: time 1668884040.469294, type 3 (EV_ABS), code 1 (ABS_Y), value 3886
Event: time 1668884040.469294, -------------- SYN_REPORT ------------
Event: time 1668884040.471569, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 9282
Event: time 1668884040.471569, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 3888
Event: time 1668884040.471569, type 3 (EV_ABS), code 0 (ABS_X), value 9282
Event: time 1668884040.471569, type 3 (EV_ABS), code 1 (ABS_Y), value 3888
Event: time 1668884040.471569, -------------- SYN_REPORT ------------
Event: time 1668884040.477811, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 9279
Event: time 1668884040.477811, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 3896
Event: time 1668884040.477811, type 3 (EV_ABS), code 0 (ABS_X), value 9279
Event: time 1668884040.477811, type 3 (EV_ABS), code 1 (ABS_Y), value 3896
Event: time 1668884040.477811, -------------- SYN_REPORT ------------
Event: time 1668884040.488292, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1
Event: time 1668884040.488292, type 1 (EV_KEY), code 330 (BTN_TOUCH), value 0
Event: time 1668884040.488292, -------------- SYN_REPORT ------------
所以我认为问题出在与plasma/KDE/Qt 的交互中(因为GTK 和HTML 按预期工作)。
所以我的问题是,如何确保 Plasma/Qt/KDE 将屏幕触摸处理为鼠标左键单击?你能帮我调试这个吗?
PS:基本的多点触控功能:两根手指用于右键单击和滚动;英寸缩放可以工作(模拟按键/释放 37),但很棘手,您必须尝试多次。
PPS:我读到 Wayland 似乎对手势有更好的支持,但我真的不需要任何花哨的东西,我宁愿坚持使用 Xorg,因为我太老了,无法学习新东西,而 Plasma 中的 Wayland 似乎太年轻。
user@debian:~$ echo $XDG_SESSION_TYPE
x11
编辑:阅读了更多内容wayland
,我现在愿意尝试一下,到目前为止我的经历很复杂:触摸和基本手势可以工作,包括捏合缩放,但代价是失去一些笔功能;此外,一段时间后,它的响应速度会降低,并且会出现错误。我计划用它进行更多实验。也许Debian不稳定的版本会更好。
答案1
我想我有这个 KDE 错误,由于默认设置忽略这个 Qt 错误。它在5.23中被标记为已解决,而我仍然有5.20。
建议的解决方法是完全放弃触摸屏手势,这很遗憾,因为有些应用程序在非 Qt 应用程序中工作(右键单击和两指滚动)。
为此,您当前必须在 KDE 5.20 中执行以下操作(错误页面上的说明有点过时):
sudo apt install kde-config-tablet
- 进入设置 -> 输入 -> 绘图板。就我而言,屏幕未被自动识别,因为它不在数据库中,但我可以轻松添加它。
- 看到屏幕后,切换到选项卡
Touch
并取消选择Enable Gestures
,但保持Enable Touch
打开状态。 - 注销,登录,瞧,现在我的触摸屏按预期工作了。
无需修改 Xorg 设置。
如果您愿意,可以使用命令行替代方案来实现相同的目的:
$ xsetwacom --set 'Wacom HID 5278 Finger touch' Gesture off
(您可能需要更改设备名称,请使用 检查您的设备名称xsetwacom --list
)。
此外,要在 Firefox 中启用触摸屏,请强制其使用Xinput2
,将以下行添加到/etc/security/pam_env.conf
:
MOZ_USE_XINPUT2 DEFAULT=1
通过这些组合设置,我可以在大多数应用程序中使用手指触摸滚动(一根手指就足够了)或捏合缩放,包括 firefox、okular、xournal、xournal++、konqueror。
除了捏合缩放之外,我仍然缺乏适当的手势,例如两根手指滚动或右键单击。