Bug 253382 - Elantech touchpad stopped recognizing taps with 12.2-p3 upgrade
Summary: Elantech touchpad stopped recognizing taps with 12.2-p3 upgrade
Status: Closed Works As Intended
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 12.2-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL: https://wayland.freedesktop.org/libin...
Keywords: needs-qa, regression
Depends on:
Blocks:
 
Reported: 2021-02-09 18:10 UTC by Pau Amma
Modified: 2021-09-30 12:48 UTC (History)
5 users (show)

See Also:
koobs: maintainer-feedback? (x11)


Attachments
Xorg log (29.37 KB, text/plain)
2021-02-09 18:10 UTC, Pau Amma
no flags Details
libinput record output (23.15 KB, text/plain)
2021-02-09 18:14 UTC, Pau Amma
no flags Details
/var/run/dmesg.boot (as requested) (10.89 KB, text/plain)
2021-02-10 02:30 UTC, Pau Amma
no flags Details
/var/log/messages record of whole pkg upgrade -f session (64.40 KB, text/plain)
2021-02-10 03:44 UTC, Pau Amma
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pau Amma 2021-02-09 18:10:17 UTC
Created attachment 222302 [details]
Xorg log

Since upgrading from 12.1-p10 (I think it was -p10 anyway) to 12.2-p3 and pkg upgrade -f, tapping the touchpad on my laptop stopped being recognized. (But moving the pointer by sliding a fingertip on the touchpad still works.) In Xorg.log I see messages like: "[  1619.693] (EE) event5  - ETPS/2 Elantech Touchpad: kernel bug: Touch jump detected and discarded. See https://wayland.freedesktop.org/libinput/doc/1.16.4/touchpad-jumping-cursors.html for details". I'm unsure whether this is a FreeBSD bug or a Xorg bug.
Comment 1 Pau Amma 2021-02-09 18:14:06 UTC
Created attachment 222303 [details]
libinput record output

https://wayland.freedesktop.org/libinput/doc/1.16.4/touchpad-jumping-cursors.html (linked in the Xorg log error line) suggested that I supply this.
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2021-02-10 01:50:13 UTC
Full package version deltas before and after the upgrade would be handy.

Without steps to reproduce or isolation this will be challenging to progress

Search results for "Touch jump detected and discarded" point to freedesktop/libinput

As to whether its a 'kernel bug', that needs to be 'verified' (what is the code that prints that and why?)

^Triage: -regression (unverified)
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2021-02-10 01:56:30 UTC
@Reporter The following would be handy:

- /var/run/dmesg.boot (as an attachment)
- pkg version -v (as an attachment) before and after upgrade. At least the logs from pkg for the pkg upgrade -f proces (should show version deltas)
Comment 4 Pau Amma 2021-02-10 02:30:51 UTC
Created attachment 222312 [details]
/var/run/dmesg.boot (as requested)
Comment 5 Pau Amma 2021-02-10 02:41:33 UTC
% grep libinput /var/log/messages
Feb  9 06:02:49 gadfly pkg[58517]: libinput reinstalled: 1.16.4 -> 1.16.4 
Feb  9 06:13:27 gadfly pkg[58517]: xf86-input-libinput reinstalled: 0.30.0_1 -> 0.30.0_1 

Full paste of pkg upgrade -f /var/log/messages output available upon request, but I think this is enough to rule out a libinput change as the cause.
Comment 6 Pau Amma 2021-02-10 03:44:08 UTC
Created attachment 222315 [details]
/var/log/messages record of whole pkg upgrade -f session
Comment 7 Gleb Popov freebsd_committer freebsd_triage 2021-02-10 04:14:41 UTC
Could it be iichid package is still compiled for 12.1?
Comment 8 Pau Amma 2021-02-10 04:56:25 UTC
(In reply to Gleb Popov from comment #7)
% pkg info iichid
pkg: No package(s) matching iichid
% pkg search iichid
iichid-0.0.3                   Generic FreeBSD HID layer for I2C and USB devices

So not installed at all. Should it be? (Probably from ports with default options if so, just to rule out a 12.1 stray definitely.)
Comment 9 Gleb Popov freebsd_committer freebsd_triage 2021-02-10 05:44:58 UTC
(In reply to PauAmma from comment #8)
Hum. Check the output of `kldstat -n iichid` first. If it is loaded, then you don't need to install the port, and the problem lies somewhere else.
Comment 10 Vladimir Kondratyev freebsd_committer freebsd_triage 2021-02-10 07:26:07 UTC
IIRC, libinput has taps disabled by default. You should add following lines to xorg.conf to enable it again:

Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        Option "Tapping" "on"
        Option "ClickMethod" "clickfinger"
EndSection
Comment 11 Pau Amma 2021-02-10 16:08:43 UTC
(In reply to Vladimir Kondratyev from comment #10)

I just added:

Option          "Tapping" "on"

to it and tapping works again, thanks. I'm still not sure what changed that made that option necessary, but I can live with the uncertainty for now, although it'd be nice to know eventually.
Comment 12 brtastic.dev 2021-02-23 12:31:11 UTC
I was using 12.1-RELEASE with moused and elantech support. After an upgrade to 12.2-RELEASE that setup was being ignored and I was able to figure out that it is now using libinput on X11. Tapping did not work as described in this bug report.

I was having much difficulty making my old setup work. However, the workaround with "Tapping" and "ClickMethod" worked. The touchpad now seem to be fully functional
Comment 13 Pau Amma 2021-09-28 20:36:13 UTC
I haven't had any time or energy to look deeper into this after I got that workaround 7 months ago, and I may never have, but since I'm apparently not the only one with that problem I'd rather not close it yet. What's the best way to deal with it?
Comment 14 Vladimir Kondratyev freebsd_committer freebsd_triage 2021-09-28 21:39:02 UTC
> What's the best way to deal with it?

FreeBSD switched from sysmouse to evdev as main mouse input protocol somewhere between 12.1 and 12.2. That resulted in replacement of traditional xf86-input-mouse input driver with xf86-input-libinput which have tapping disabled by default. To enable it again, you have following options:

1. Poke libinput authors to change defaults.
2. Set Option "Tapping" "on" in your X11 or DE config as you already did.
3. Make psm to be responsible for gesture processing again with setting of kern.evdev.rcpt_mask=3
4. Return back to xf86-input-mouse with recompiling your kernel with EVDEV_SUPPORT option disabled.

I recommend to stay with #2.
Comment 15 Gleb Popov freebsd_committer freebsd_triage 2021-09-29 06:21:50 UTC
I'd interpret Vladimir's reply as "Works as intended" and close this PR. x11@, what do you think?
Comment 16 Niclas Zeising freebsd_committer freebsd_triage 2021-09-30 12:48:08 UTC
Yes, this works as intended.

You can also use xinput to enable tapping, if you don't want to edit xorg configs.  I have the following in my .xinitrc (but for synaptics touchpads, you have to check the name of your device)

xinput --set-prop 'SynPS/2 Synaptics TouchPad' 'libinput Tapping Enabled' 1

Closing this.