Bug 96925

Summary: Touchpad tap doesn't work on DELL XPS 15 9550
Product: Wayland Reporter: Russell Stuart <russell+freedesktop.org>
Component: libinputAssignee: Wayland bug list <wayland-bugs>
Status: RESOLVED NOTABUG QA Contact:
Severity: normal    
Priority: medium CC: peter.hutterer
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Russell Stuart 2016-07-14 04:12:02 UTC
Tapping does work with synaptics, but not libinput.

Extensive details on hardware and configuration can be found here:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=822835#25
Comment 1 Peter Hutterer 2016-07-14 04:30:09 UTC
What I'll need is an evemu-recording of a touch sequence please.

http://www.freedesktop.org/wiki/Evemu/
Comment 2 Peter Hutterer 2016-07-14 04:30:21 UTC
a *tap* sequence, sorry
Comment 3 Russell Stuart 2016-07-14 04:36:46 UTC
# evemu-record /dev/input/event15
# EVEMU 1.2
# Input device name: "DLL06E4:01 06CB:7A13 Touchpad"
# Input device ID: bus 0x18 vendor 0x6cb product 0x7a13 version 0x100
# Supported events:
#   Event type 0 (EV_SYN)
#     Event code 0 (SYN_REPORT)
#     Event code 1 (SYN_CONFIG)
#     Event code 2 (SYN_MT_REPORT)
#     Event code 3 (SYN_DROPPED)
#     Event code 4 ((null))
#     Event code 5 ((null))
#     Event code 6 ((null))
#     Event code 7 ((null))
#     Event code 8 ((null))
#     Event code 9 ((null))
#     Event code 10 ((null))
#     Event code 11 ((null))
#     Event code 12 ((null))
#     Event code 13 ((null))
#     Event code 14 ((null))
#   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     56
#       Min        0
#       Max     1228
#       Fuzz       0
#       Flat       0
#       Resolution 12
#     Event code 1 (ABS_Y)
#       Value    693
#       Min        0
#       Max      928
#       Fuzz       0
#       Flat       0
#       Resolution 12
#     Event code 47 (ABS_MT_SLOT)
#       Value      1
#       Min        0
#       Max        4
#       Fuzz       0
#       Flat       0
#       Resolution 0
#     Event code 53 (ABS_MT_POSITION_X)
#       Value      0
#       Min        0
#       Max     1228
#       Fuzz       0
#       Flat       0
#       Resolution 12
#     Event code 54 (ABS_MT_POSITION_Y)
#       Value      0
#       Min        0
#       Max      928
#       Fuzz       0
#       Flat       0
#       Resolution 12
#     Event code 57 (ABS_MT_TRACKING_ID)
#       Value      0
#       Min        0
#       Max    65535
#       Fuzz       0
#       Flat       0
#       Resolution 0
# Properties:
#   Property  type 0 (INPUT_PROP_POINTER)
#   Property  type 2 (INPUT_PROP_BUTTONPAD)
N: DLL06E4:01 06CB:7A13 Touchpad
I: 0018 06cb 7a13 0100
P: 05 00 00 00 00 00 00 00
B: 00 0b 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 01 00 00 00 00 00
B: 01 20 e5 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 01 00 00 00 00 00 00 00 00
B: 02 00 00 00 00 00 00 00 00
B: 03 03 00 00 00 00 80 60 02
B: 04 00 00 00 00 00 00 00 00
B: 05 00 00 00 00 00 00 00 00
B: 11 00 00 00 00 00 00 00 00
B: 12 00 00 00 00 00 00 00 00
B: 14 00 00 00 00 00 00 00 00
B: 15 00 00 00 00 00 00 00 00
B: 15 00 00 00 00 00 00 00 00
A: 00 0 1228 0 0 12
A: 01 0 928 0 0 12
A: 2f 0 4 0 0 0
A: 35 0 1228 0 0 12
A: 36 0 928 0 0 12
A: 39 0 65535 0 0 0
################################
#      Waiting for events      #
################################
E: 0.000000 0003 002f 0000	# EV_ABS / ABS_MT_SLOT          0
E: 0.000000 0003 0039 4440	# EV_ABS / ABS_MT_TRACKING_ID   4440
E: 0.000000 0003 0035 0370	# EV_ABS / ABS_MT_POSITION_X    370
E: 0.000000 0003 0036 0266	# EV_ABS / ABS_MT_POSITION_Y    266
E: 0.000000 0001 014a 0001	# EV_KEY / BTN_TOUCH            1
E: 0.000000 0001 0145 0001	# EV_KEY / BTN_TOOL_FINGER      1
E: 0.000000 0003 0000 0370	# EV_ABS / ABS_X                370
E: 0.000000 0003 0001 0266	# EV_ABS / ABS_Y                266
E: 0.000000 0000 0000 0000	# ------------ SYN_REPORT (0) ----------
E: 0.306938 0003 0039 -001	# EV_ABS / ABS_MT_TRACKING_ID   -1
E: 0.306938 0001 014a 0000	# EV_KEY / BTN_TOUCH            0
E: 0.306938 0001 0145 0000	# EV_KEY / BTN_TOOL_FINGER      0
E: 0.306938 0000 0000 0000	# ------------ SYN_REPORT (0) ----------
Comment 4 Peter Hutterer 2016-07-14 05:04:50 UTC
what version of libinput is this? seems to work fine here with git master, but you can verify this locally:

sudo libinput-debug-events --enable-tap

if that detects the taps as button presses then the issue is elsewhere. the xinput list-props output in the debian report shows that tapping is enabled though. please make sure this is still the case.
Comment 5 Russell Stuart 2016-07-14 05:23:40 UTC
> if that detects the taps as button presses

I think this means it does:

$ sudo libinput-debug-events --enable-tap
event5 	DEVICE_ADDED     Power Button                      seat0 default group1 cap:k
event9 	DEVICE_ADDED     Video Bus                         seat0 default group2 cap:k
event10	DEVICE_ADDED     Video Bus                         seat0 default group2 cap:k
event3 	DEVICE_ADDED     Power Button                      seat0 default group3 cap:k
event4 	DEVICE_ADDED     Sleep Button                      seat0 default group4 cap:k
event7 	DEVICE_ADDED     Integrated_Webcam_HD              seat0 default group5 cap:k
event6 	DEVICE_ADDED     ELAN Touchscreen                  seat0 default group6 cap:t	size 333.50/188.50mm calib
event15	DEVICE_ADDED     DLL06E4:01 06CB:7A13 Touchpad     seat0 default group7 cap:pg	size 102.33/77.33mm tap(dl off) left scroll-nat scroll-2fg-edge click-buttonareas-clickfinger dwt-on
event0 	DEVICE_ADDED     AT Translated Set 2 keyboard      seat0 default group8 cap:k
event1 	DEVICE_ADDED     SynPS/2 Synaptics TouchPad        seat0 default group9 cap:pg	size 106.98/80.00mm tap(dl off) left scroll-nat scroll-2fg-edge click-buttonareas-clickfinger dwt-on
event15	POINTER_BUTTON    +1.10s	BTN_LEFT (272) pressed, seat count: 1
event15	POINTER_BUTTON    +1.37s	BTN_LEFT (272) released, seat count: 0
event0 	KEYBOARD_KEY      +5.06s	KEY_LEFTCTRL (29) pressed
event0 	KEYBOARD_KEY      +6.18s	KEY_C (46) pressed
$

> xinput list-props output in the debian report shows that tapping is enabled
though. please make sure this is still the case.

It isn't the case on boot:

$ xinput list-props 15
Device 'SynPS/2 Synaptics TouchPad':
	Device Enabled (140):	1
	Coordinate Transformation Matrix (142):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
	libinput Tapping Enabled (281):	0
	libinput Tapping Enabled Default (282):	0
	libinput Tapping Drag Enabled (283):	1
	libinput Tapping Drag Enabled Default (284):	1
	libinput Tapping Drag Lock Enabled (285):	0
	libinput Tapping Drag Lock Enabled Default (286):	0
	libinput Accel Speed (287):	0.000000
	libinput Accel Speed Default (288):	0.000000
	libinput Natural Scrolling Enabled (289):	0
	libinput Natural Scrolling Enabled Default (290):	0
	libinput Send Events Modes Available (261):	1, 1
	libinput Send Events Mode Enabled (262):	0, 0
	libinput Send Events Mode Enabled Default (263):	0, 0
	libinput Left Handed Enabled (291):	0
	libinput Left Handed Enabled Default (292):	0
	libinput Scroll Methods Available (293):	1, 1, 0
	libinput Scroll Method Enabled (294):	1, 0, 0
	libinput Scroll Method Enabled Default (295):	1, 0, 0
	libinput Click Methods Available (296):	1, 1
	libinput Click Method Enabled (297):	1, 0
	libinput Click Method Enabled Default (298):	1, 0
	libinput Disable While Typing Enabled (299):	1
	libinput Disable While Typing Enabled Default (300):	1
	Device Node (264):	"/dev/input/event1"
	Device Product ID (265):	2, 7
	libinput Drag Lock Buttons (301):	<no items>
	libinput Horizonal Scroll Enabled (266):	1
$

So I execute:

$ xinput set-prop 15 281 1
$ xinput list-props 15
Device 'SynPS/2 Synaptics TouchPad':
	Device Enabled (140):	1
	Coordinate Transformation Matrix (142):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
	libinput Tapping Enabled (281):	1
	libinput Tapping Enabled Default (282):	0
	libinput Tapping Drag Enabled (283):	1
	libinput Tapping Drag Enabled Default (284):	1
	libinput Tapping Drag Lock Enabled (285):	0
	libinput Tapping Drag Lock Enabled Default (286):	0
	libinput Accel Speed (287):	0.000000
	libinput Accel Speed Default (288):	0.000000
	libinput Natural Scrolling Enabled (289):	0
	libinput Natural Scrolling Enabled Default (290):	0
	libinput Send Events Modes Available (261):	1, 1
	libinput Send Events Mode Enabled (262):	0, 0
	libinput Send Events Mode Enabled Default (263):	0, 0
	libinput Left Handed Enabled (291):	0
	libinput Left Handed Enabled Default (292):	0
	libinput Scroll Methods Available (293):	1, 1, 0
	libinput Scroll Method Enabled (294):	1, 0, 0
	libinput Scroll Method Enabled Default (295):	1, 0, 0
	libinput Click Methods Available (296):	1, 1
	libinput Click Method Enabled (297):	1, 0
	libinput Click Method Enabled Default (298):	1, 0
	libinput Disable While Typing Enabled (299):	1
	libinput Disable While Typing Enabled Default (300):	1
	Device Node (264):	"/dev/input/event1"
	Device Product ID (265):	2, 7
	libinput Drag Lock Buttons (301):	<no items>
	libinput Horizonal Scroll Enabled (266):	1
$ 

And tapping still does not work.  However, note this comment in the debian bug report:

> Again using "xinput set-prop 15 ..." had no effect I could detect (I
tried setting 283=0, 289=1,1 295=2,1,3 306=0).
Comment 6 Russell Stuart 2016-07-14 05:47:28 UTC
Given you're assurances it does work, I tried adding this file to /etc/X11/xorg.conf.d/touchpad.conf:

  Section "InputClass"
    Identifier	"Touchpad"
    Driver	"libinput"
    MatchIsTouchpad "yes"
    Option	"ScrollMethod"		"twofinger"
    Option	"Tapping"		"true"
    Option	"TappingDrag"		"true"
    Option	"DisableWhileTyping"	"true"
  EndSection

And now tapping works.  So the real issues are:

- Tapping is not enabled at boot (but two fingered scroll is).
- "xinput set-props" doesn't work.

And for what it's worth, the pinch gesture described on has no effect I can see.  I tested it in gnome-terminal, firefox, pidgin, gvim, gimp, and an evolution mail window.
Comment 7 Peter Hutterer 2016-07-14 05:50:10 UTC
(In reply to Russell Stuart from comment #5)
> > if that detects the taps as button presses
> 
> I think this means it does:
> 
> $ sudo libinput-debug-events --enable-tap
> event5 	DEVICE_ADDED     Power Button                      seat0 default
> group1 cap:k
> event9 	DEVICE_ADDED     Video Bus                         seat0 default
> group2 cap:k
> event10	DEVICE_ADDED     Video Bus                         seat0 default
> group2 cap:k
> event3 	DEVICE_ADDED     Power Button                      seat0 default
> group3 cap:k
> event4 	DEVICE_ADDED     Sleep Button                      seat0 default
> group4 cap:k
> event7 	DEVICE_ADDED     Integrated_Webcam_HD              seat0 default
> group5 cap:k
> event6 	DEVICE_ADDED     ELAN Touchscreen                  seat0 default
> group6 cap:t	size 333.50/188.50mm calib
> event15	DEVICE_ADDED     DLL06E4:01 06CB:7A13 Touchpad     seat0 default
> group7 cap:pg	size 102.33/77.33mm tap(dl off) left scroll-nat
> scroll-2fg-edge click-buttonareas-clickfinger dwt-on
> event0 	DEVICE_ADDED     AT Translated Set 2 keyboard      seat0 default
> group8 cap:k
> event1 	DEVICE_ADDED     SynPS/2 Synaptics TouchPad        seat0 default
> group9 cap:pg	size 106.98/80.00mm tap(dl off) left scroll-nat
> scroll-2fg-edge click-buttonareas-clickfinger dwt-on
> event15	POINTER_BUTTON    +1.10s	BTN_LEFT (272) pressed, seat count: 1
> event15	POINTER_BUTTON    +1.37s	BTN_LEFT (272) released, seat count: 0

yes, that's a left button press. you should see right and middle buttons for
2 and 3 finger taps, respectively too then.

> It isn't the case on boot:

tapping is disabled by default, see
https://wayland.freedesktop.org/libinput/doc/latest/tapping.html

You'll have to enable it, either with an xorg.conf snippet (see man
libinput, option Tapping) or have something set it for you (like gnome does
when the toggle is flipped). alternatively, you can manually set it through
libinput through some startup script, but that's flaky and not really
recommended.

> So I execute:
> 
> $ xinput set-prop 15 281 1

fwiw, a better approach would be:
    xinput set-prop "SynPS/2 Synaptics TouchPad" "libinput Tapping Enabled" 1
which will work even when the device ID changes and is a lot more obvious
than the pure property numbers.
http://who-t.blogspot.com.au/2016/07/xinput-resolves-device-names-and.html

> $ xinput list-props 15
> Device 'SynPS/2 Synaptics TouchPad':

ok, the reason is that your touchpad has two devices, one of which never
sends events. that's a side-effect of the i2c kernel implementation, check
the event node in the libinput output above: all the events come from
event15 which is the "DLL06E4:01 06CB:7A13 Touchpad" device. So if you run
the xinput command against that device it'll work.
Comment 8 Peter Hutterer 2016-07-14 05:54:02 UTC
(In reply to Russell Stuart from comment #6)
> Given you're assurances it does work, I tried adding this file to
> /etc/X11/xorg.conf.d/touchpad.conf:
> 
>   Section "InputClass"
>     Identifier	"Touchpad"
>     Driver	"libinput"

you should be using MatchDriver here and rely on the system to assign the right input driver to the right device. Not that it really matters, but it's the recommended approach.

>     MatchIsTouchpad "yes"
>     Option	"ScrollMethod"		"twofinger"
>     Option	"Tapping"		"true"
>     Option	"TappingDrag"		"true"
>     Option	"DisableWhileTyping"	"true"

except for the Tapping the other three are set to the defaults for your device. You don't need the options, they have no real effect.

>   EndSection
 
> And for what it's worth, the pinch gesture described on has no effect I can
> see.  I tested it in gnome-terminal, firefox, pidgin, gvim, gimp, and an
> evolution mail window.

because X lacks any protocol for pinch (or gestures at all). you'll have to wait for wayland to have this supported, sorry, should've made this clear earlier.
Comment 9 Russell Stuart 2016-07-14 06:14:51 UTC
> fwiw, a better approach would be:
>    xinput set-prop "SynPS/2 Synaptics TouchPad" "libinput Tapping Enabled" 1

I know.  Somewhere along the line I guessed 15 worked, and got lazy.

Which brings me to another comment in that Debian bug:

> Setting 291 and 294 looked enticing but I could not figure out the syntax xinput wanted.

Translation: the xinput doco sucks in some places.  I remembered when I tried to do this today:

  $ xinput set-prop "DLL06E4:01 06CB:7A13 Touchpad" "libinput Accel Speed" 1.5
  X Error of failed request:  BadValue (integer parameter out of range for operation)

Integer value? It's a float.

> you'll have to wait for wayland to have this supported, sorry, should've made this clear earlier.

It isn't a problem for me - I just wanted to ensure you were aware of it.

Currently I have a 300 DPI laptop display and a 100 DPI desktop monitor.  With X only one can be made to look sane.  I've read Wayland will fix that too.  Here's hoping.

In the mean time though, Intel fixing their Skylake GPU driver so the monitor displays something every time rather than 1 time in 10 or so would be a great improvement.
Comment 10 Peter Hutterer 2016-07-14 06:27:56 UTC
(In reply to Russell Stuart from comment #9)
> Which brings me to another comment in that Debian bug:
> 
> > Setting 291 and 294 looked enticing but I could not figure out the syntax xinput wanted.

xinput is a developer tool. it merely sets key/value pairs, it has no knowledge on what it actually set. it's like gsettings in that regard. the keys are the device name and property name, the value is what the property requires, and that's driver specific. xinput merely takes whatever you give it and passes it on, it has no notion of what it's doing otherwise. it shouldn't be used for permanent device configuration anyway, we have said that for years.

> Translation: the xinput doco sucks in some places.  I remembered when I
> tried to do this today:
> 
>   $ xinput set-prop "DLL06E4:01 06CB:7A13 Touchpad" "libinput Accel Speed"
> 1.5
>   X Error of failed request:  BadValue (integer parameter out of range for
> operation)

BadValue is an X error code and similar to the errno EINVAL. the error message is printed by Xlib. And float properties didn't appear until 20 years after BadValue was implemented first... the properties API has not a lot of options for error messages, BadValue, BadMatch and BadAccess are the only ones iirc.




Anyway, closing this bug as NOTABUG, cause was that tapping was enabled on the wrong device and hence it didn't take effect. The wrong device because the i2c driver exposes two device nodes (one mute) so it's easy to make that mistake.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.