0

In a few programs (notably the LXQt panel and Artisan Roaster Scope), tapping on my touchscreen no longer creates the equivalents of left-clicks with the mouse. Instead, it creates the equivalent of pushing the left mouse button down and never releasing it. How to fix that?

Note that both the above programs are Qt5 programs. However, the issue does not affect all the Qt5 programs I have.

The issue happened to me with a Lenovo ThinkPad X201 Tablet in Ubuntu 18.10 with the LXQt desktop environment and also in Ubuntu 19.04 with the default Ubuntu (Gnome based) desktop environment. I did not try the above mentioned programs in earlier versions of Ubuntu, so I don't know if the issue was present there or not.

tanius
  • 6,303
  • 1
  • 39
  • 49

1 Answers1

0

Fixing it

The problem can be fixed with the follwing command:

  • For a ThinkPad X201 Tablet with Ubuntu 19.04

    xsetwacom --set "Serial Wacom Tablet WACf00c touch" Gesture off
    
  • For a ThinkPad X201 Tablet with Ubuntu 18.10

    xsetwacom --set "Wacom Serial Penabled 2FG Touchscreen Finger touch" 
    Gesture off
    
  • For other touchscreen devices

    Find out the product name of your touchscreen with xinput --list and supply it in the command above.

Making the fix permanent

To automatically apply the configuration change of the above command at every start of X11, create a file /etc/X11/xorg.conf.d/81-local-touchscreen-tweaks.conf with the content shown below, and restart your X server afterwards to test the effect.

  • For a ThinkPad X201 Tablet with Ubuntu 19.04

    # Tweaks for the Wacom touchscreen on a ThinkPad X201 Tablet.
    Section "InputClass"
        Identifier "local touchscreen tweaks"
    
        # Product to configure.
        MatchProduct "Serial Wacom Tablet WACf00c"
    
        # Driver to use for this device.
        # (Identical to the default, so not essential to mention.)
        Driver "wacom"
    
        # Disable multi-touch gestures to fix tap-to-click issues.
        Option "Gesture" "off"
    EndSection
    
  • For a ThinkPad X201 Tablet with Ubuntu 18.10

    Use the same file content as shown above, except that you have to change the MatchProduct line to the following:

    MatchProduct "Wacom Serial Penabled 2FG Touchscreen Finger"
    
  • For other touchscreen devices

    Look into your /var/log/Xorg.0.log for a line that mentions your touchscreen's product identifier, such as "Using input driver 'wacom' for '…'". Or simply use the product identifier reported by xinput --list without the "touch" at the end. That suffix is rather the mode of the product and not part of its identifier; modes can be touch, pen, eraser, cursor.

Background information

The fix disables all multi-touch gestures of the xf86-input-wacom driver. Obviously, either this feature of the driver or the programs where disabling it repairs normal tap-to-click behavior have a software bug, because the described problem is no intended consequence of multi-touch gestures. Probably it is a bug in the application software, as I could not find any difference between the events generated with "Gesture on" and "Gesture off" on either of the following levels:

  • driver level, using a command like sudo libinput debug-events
  • X event level, as reported with a command like sudo evtest /dev/input/event15

Obviously, you lose the driver's ability to interpret multi-touch events this way. This is not much of a problem though, because multi-touch gestures in this driver are a deprecated feature anyway:

"The xf86-input-wacom driver supports 2FGT gestures as a legacy feature from linuxwacom grandfathered in. […] [I]t is far more useful to have touch gestures […] supported by a gesture engine that can be used by all drivers and multitouch aware applications. […] [W]hen you disable xf86-input-wacom's default in-driver 2FGT support all the hardware-tracked fingers pass up to the X server. That allows all of the hardware reported touch contacts to be handled by the new multitouch through X Server features […] and supporting drivers." [source]

Indeed, after the change pinch zoom and two-finger scrolling still work in Chrome / Chromium, for example. The only annoying part is that the disabled gestures include the "tap-hold plus tap" two-finger gesture for right-clicking. Under the Ubuntu default desktop environment, right-clicking by touch is still possible with tap-and-hold, but not so in other desktop environments. But that's a different problem to solve.

tanius
  • 6,303
  • 1
  • 39
  • 49
  • Is "For a ThinkPad X201 Tablet with Ubuntu 18.10" section in the "Making the fix permanent" section correct? Shouldn't the MatchProduct be different? More specifically maybe Wacom Serial Penabled 2FG Touchscreen Finger? I wanted to be sure, rather than guess-fix your answer. – Carolus May 28 '19 at 09:39
  • @Carolus Yes, your proposed fix is correct. I edited my answer accordingly. Thanks! – tanius May 28 '19 at 22:01