1

I am testing Debian Bullseye on a Thinkpad X1 Yoga Gen 6, using a live cd with KDE and non-free drivers (debian-live-11.5.0-amd64-kde+nonfree.iso). I'd like to be sure that everything I need works before wiping the hard drive.

Everything seems to work indeed, except that when I use a finger to touch objects or buttons, these are not clicked as expected, only selected at best. This seems to happen with anything related to plasma/Qt:

  • touching any icon on the plasma panel (including the application launcher) just places the cursor there;
  • touching buttons in KDE apps/settings dialogs selects them but does not click them;
  • touching menus in KDE apps unfolds them, but touching menu items just selects them (eg File -> New Tab in Konqueror).

Situations where the finger works as expected:

  • everything on web pages (HTML buttons, HTML5 controls on eg youtube)
  • everything in non-KDE applications (eg Firefox)
  • window titlebar buttons (minimize/maximize/close) for all apps.

The included Wacom digitizer pen always works as expected (touching an object clicks on it).

Here are some infos that may be relevant:

KDE Plasma Version: 5.20.5

KDE Frameworks Version: 5.78.0

Qt Version: 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

Relevant dmesg lines:

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 and 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

It seems that touching the screen does produce the right event: when I touch the screen I see button press 1 and button release 1 both with xinput and with 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 ------------

So I assume the issue lies somewhere in the interaction with plasma/KDE/Qt (as GTK and HTML work as expected).

So my question is, how do I make sure that plasma/Qt/KDE process a screen touch as a mouse button left click ? Can you help me debug this?

PS: basic multi-touch that works: two fingers for right click and scrolling; inch-to-zoom works (emulating key press/release 37) but is tricky, you have to try multiple times.

PPS: I have read that Wayland seems to have a better support of gestures, but I really don't need anything fancy, and I'd rather stick with Xorg because I'm too old to learn new things, and Wayland in Plasma seems too young.

user@debian:~$ echo $XDG_SESSION_TYPE
x11

Edit: Reading a bit more on wayland, I am now willing to give it a try, so far I had mixed experiences: touch and basic gestures work, including pinch-to-zoom, but at the cost of loosing some pen functionality; moreover it gets less responsive and buggy after some time. I plan to experiment more with it. Maybe the version in Debian unstable will be better.

2
  • While this cold be migrated, that would just mean your question would appear as an old, days-old question on the target site. I am happy to do it, if you really want, but it is easier and better for you to just delete this and repost on the target site. Note that this would be off topic on Stack Overflow, but it is on topic on Super User if you want to ask it there. Or let me know if you would really prefer it to be migrated even though it will appear as an old question and have less visibility than if you do it yourself.
    – terdon
    Nov 28, 2022 at 9:45
  • it's ok I answered myself, thanks!
    – ggll
    Nov 30, 2022 at 13:41

1 Answer 1

1

I think I have this KDE bug, due to default settings ignoring this Qt bug. It is marked as solved in 5.23, and I still have 5.20.

The proposed workaround is to give up touchscreen gestures altogether, which is a pity as some were working in non-Qt apps (right click and two-finger scrolling).

In order to do that, here's what you currently have to do in KDE 5.20 (instructions on the bug's page are a bit outdated):

  1. sudo apt install kde-config-tablet
  2. Go to Setting -> Input -> Graphic Tablet. In my case the screen was not automatically recognized as it's not in the data base, but I could easily add it.
  3. Once you see your screen, switch to tab Touch and deselect Enable Gestures, but leave Enable Touch on.
  4. Logout, login, voila, now my touch screen works as expected.

No need to modify Xorg settings.

Command line alternative to achieve the same thing if you prefer:

$ xsetwacom --set 'Wacom HID 5278 Finger touch' Gesture off

(you may have to change the device name, check yours with xsetwacom --list).

Additionally, to enable the touchscreen in Firefox, by forcing it to use Xinput2, add the following line to /etc/security/pam_env.conf:

MOZ_USE_XINPUT2 DEFAULT=1

With these combined settings, I can use finger touch to scroll (one finger is enough) or pinch-to-zoom in most applications, including firefox, okular, xournal, xournal++, konqueror.

I still lack proper gestures, other than pinch-to-zoom, like two finger scrolling or right click.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .