linuxmint / cinnamon-control-center

A collection of configuration plugins used in cinnamon-settings
GNU General Public License v2.0
62 stars 65 forks source link

libinput: two-finger right click not working #260

Open wchargin opened 3 years ago

wchargin commented 3 years ago
  * cinnamon-control-center 4.8.2
  * Mint 20.1 Ulyssa
  * Thinkpad T440s with stock drivers for 5.4.0-64 kernel
      * Using input driver 'libinput' for 'SynPS/2 Synaptics TouchPad'
      * Using input driver 'libinput' for 'TPPS/2 IBM TrackPoint'
      * Using input driver 'libinput' for 'ThinkPad Extra Buttons'
  * 64-bit

Issue

Can right-click with two-finger tap but not two-finger click.

In Sonya, all of the following were right-clicks:

  1. two-finger tap: remove all fingers from the touchpad and tap it with two fingers simultaneously
  2. two-finger click: rest two fingers on the touchpad and press down simultaneously
  3. click in bottom-right or top-right corners of trackpad

Method (1) still works. Method (2) doesn’t: it acts as a left-click instead, which is wrong. (Method (3) still works, but is not very useful for me.)

Changing “Click actions” in the Touchpad settings to any of “Left click only”, “Automatic” (default), “Emulate mouse buttons”, or “Use multiple fingers for right and middle click” does nothing. I would expect the last one to do what I want, but they all seem to be the same.

I used to be able to configure stuff like this with a line like:

synclient 'VertScrollDelta=-99' 'HorizScrollDelta=-99' 'HorizTwoFingerScroll=1' 'VertEdgeScroll=0' 'ClickFinger3=2' 'TapButton3=2'

But now that libinput is the default touchpad driver and synclient is not installed, I’d prefer to stay on the main train.

Can be fixed on command line with:

xinput set-prop 'SynPS/2 Synaptics TouchPad' 'libinput Click Method Enabled' 0 1

which has the side-effect of breaking method (3). (Acceptable for me, but still a regression from Sonya.) Trying to set to 1 1 to enable both fails:

xinput set-prop 'SynPS/2 Synaptics TouchPad' 'libinput Click Method Enabled' 1 1
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  131 (XInputExtension)
  Minor opcode of failed request:  57 ()
  Value in failed request:  0x13c
  Serial number of failed request:  21
  Current serial number in output stream:  22

Can repro on live CD as well as full install (stock options).

Steps to reproduce

  1. Hover cursor over desktop, or something else right-clickable.
  2. Place exactly two fingers on touchpad surface.
  3. Click (press down and release) with both fingers simultaneously.

Expected behaviour

Right-click.

Actual behaviour

Left-click.

Other information

Somewhat related issues: linuxmint/cinnamon#5996, #159.

$ xinput list-props 'SynPS/2 Synaptics TouchPad' | grep 'Click Method'
    libinput Click Methods Available (315): 1, 1
    libinput Click Method Enabled (316):    1, 0
    libinput Click Method Enabled Default (317):    1, 0

Interpretation courtesy of @leigh123linux:

http://manpages.ubuntu.com/manpages/wily/man4/libinput.4.html

   libinput Click Methods Enabled
          2 boolean values (8  bit,  0  or  1),  in  order  "buttonareas",
          "clickfinger".   Indicates  which  click  methods are enabled on
          this device.

More diagnostics available upon request.

NikoKrause commented 3 years ago

Have you tried the synaptic touchpad driver as described here:

https://www.linuxmint.com/rel_ulyssa_xfce.php

wchargin commented 3 years ago

Yes; it works if I run

apt install xserver-xorg-input-synaptics

and log out and back in (tested on live CD). But, as I mentioned above, I’d prefer to continue to use libinput now that it’s the default. This seems to me like a bug in the control center rather than the drivers, since manually setting the property to clickfinger works but the dropdown menu in cinnamon-settings does nothing.

With xserver-xorg-input-synaptics installed, changing the dropdown from “Emulate mouse buttons” to “Use multiple fingers for right and middle click” causes my synclient to change:

-    ClickFinger2            = 0
-    ClickFinger3            = 0
+    ClickFinger2            = 3
+    ClickFinger3            = 2

Shouldn’t the control panel do something similar in case of libinput?