Elantech touchpad three finger tap causes continuous middle clicking

Hi everyone!

I'm having trouble setting up my Elantech touchpad on a Thinkpad T480s. Tap to click, tap dragging and natural scrolling with two fingers works fine. My only issue is that tapping with three fingers fires off multiple middle clicks in quick succession. In fact it continues to fire of middle clicks while I old three fingers on the touchpad.

I will attach some command outputs that I think are relevant, but please ask me for further information that can help troubleshooting this problem.

Thanks for the help in advance.

$ uname -a
Code:
FreeBSD pepper 15.0-RELEASE-p13 FreeBSD 15.0-RELEASE-p13 releng/15.0-n281114-af58d0db156a GENERIC amd64

$ doas sh -c 'dmesg | grep -E "input|elantech|synaptics|psm"'
Code:
Password:
psm0: <PS/2 Mouse> flags 0x2000 irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
WARNING: Device "psm" is Giant locked and may be deleted before FreeBSD 16.0.
psm0: model Elantech Touchpad, device ID 0

$ cat /usr/local/etc/X11/xorg.conf.d/40-libinput.conf
Code:
Section "InputClass"
    Identifier "Elantech Touchpad"
    MatchProduct "Elantech Touchpad"
    MatchDevicePath "/dev/input/event*"
    Driver "libinput"

    Option "Tapping" "on"
    Option "TappingDrag" "on"
    Option "MiddleEmulation" "on"
    Option "TappingButtonMap" "lrm"
    Option "ClickMethod" "clickfinger"
    Option "NaturalScrolling" "on"
EndSection

$ cat /boot/loader.conf
Code:
aesni_load="YES"
geom_eli_load="YES"
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
zfs_load="YES"
acpi_video_load="YES"
hw.psm.elantech_support="1"
hw.psm.synaptics_support="1"

$ cat /etc/rc.conf
Code:
...
kld_list="i915kms fusefs"
moused_nondefault_enable="NO"
moused_enable="NO"
moused_flags="-d"
...

$ xinput list "ETPS/2 Elantech Touchpad"
Code:
ETPS/2 Elantech Touchpad                    id=11    [slave  pointer  (2)]
    Reporting 7 classes:
        Class originated from: 11. Type: XIButtonClass
        Buttons supported: 7
        Button labels: "Button Left" "Button Middle" "Button Right" "Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Horiz Wheel Right"
        Button state:
        Class originated from: 11. Type: XIValuatorClass
        Detail for Valuator 0:
          Label: Rel X
          Range: -1.000000 - -1.000000
          Resolution: 0 units/m
          Mode: relative
        Class originated from: 11. Type: XIValuatorClass
        Detail for Valuator 1:
          Label: Rel Y
          Range: -1.000000 - -1.000000
          Resolution: 0 units/m
          Mode: relative
        Class originated from: 11. Type: XIValuatorClass
        Detail for Valuator 2:
          Label: Rel Horiz Scroll
          Range: -1.000000 - -1.000000
          Resolution: 0 units/m
          Mode: relative
        Class originated from: 11. Type: XIValuatorClass
        Detail for Valuator 3:
          Label: Rel Vert Scroll
          Range: -1.000000 - -1.000000
          Resolution: 0 units/m
          Mode: relative
        Class originated from: 11. Type: XIScrollClass
        Scroll info for Valuator 2
          type: 2 (horizontal)
          increment: 120.000000
          flags: 0x0
        Class originated from: 11. Type: XIScrollClass
        Scroll info for Valuator 3
          type: 1 (vertical)
          increment: 120.000000
          flags: 0x0

$ xinput list-props "ETPS/2 Elantech Touchpad"
Code:
Device 'ETPS/2 Elantech Touchpad':
    Device Enabled (185):    1
    Coordinate Transformation Matrix (186):    1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    libinput Tapping Enabled (348):    1
    libinput Tapping Enabled Default (349):    0
    libinput Tapping Drag Enabled (350):    1
    libinput Tapping Drag Enabled Default (351):    1
    libinput Tapping Drag Lock Enabled (352):    0
    libinput Tapping Drag Lock Enabled Default (353):    0
    libinput Tapping Button Mapping Enabled (354):    1, 0
    libinput Tapping Button Mapping Default (355):    1, 0
    libinput Natural Scrolling Enabled (319):    1
    libinput Natural Scrolling Enabled Default (320):    0
    libinput Disable While Typing Enabled (356):    1
    libinput Disable While Typing Enabled Default (357):    1
    libinput Scroll Methods Available (321):    1, 1, 0
    libinput Scroll Method Enabled (322):    1, 0, 0
    libinput Scroll Method Enabled Default (323):    1, 0, 0
    libinput Click Methods Available (358):    1, 1
    libinput Click Method Enabled (359):    0, 0
    libinput Click Method Enabled Default (360):    1, 0
    libinput Clickfinger Button Mapping Enabled (361):    1, 0
    libinput Clickfinger Button Mapping Default (362):    1, 0
    libinput Middle Emulation Enabled (328):    1
    libinput Middle Emulation Enabled Default (329):    0
    libinput Accel Speed (330):    0.000000
    libinput Accel Speed Default (331):    0.000000
    libinput Accel Profiles Available (332):    1, 1, 1
    libinput Accel Profile Enabled (333):    0, 1, 0
    libinput Accel Profile Enabled Default (334):    1, 0, 0
    libinput Accel Custom Fallback Points (335):    <no items>
    libinput Accel Custom Fallback Step (336):    0.000000
    libinput Accel Custom Motion Points (337):    <no items>
    libinput Accel Custom Motion Step (338):    0.000000
    libinput Accel Custom Scroll Points (339):    <no items>
    libinput Accel Custom Scroll Step (340):    0.000000
    libinput Left Handed Enabled (341):    0
    libinput Left Handed Enabled Default (342):    0
    libinput Send Events Modes Available (304):    1, 1
    libinput Send Events Mode Enabled (305):    0, 0
    libinput Send Events Mode Enabled Default (306):    0, 0
    Device Node (307):    "/dev/input/event6"
    Device Product ID (308):    2, 14
    libinput Drag Lock Buttons (343):    <no items>
    libinput Horizontal Scroll Enabled (344):    1
    libinput Scrolling Pixel Distance (345):    15
    libinput Scrolling Pixel Distance Default (346):    15
    libinput High Resolution Wheel Scroll Enabled (347):    1

$ doas libinput list-devices
Code:
...
Device:                  ETPS/2 Elantech Touchpad
Kernel:                  /dev/input/event6
Id:                      serial:0002:000e
Group:                   7
Seat:                    seat0, default
Size:                    98x61mm
Capabilities:            pointer gesture
Tap-to-click:            disabled
Tap-and-drag:            enabled
Tap button map:          left/right/middle
Tap drag lock:           disabled
Left-handed:             disabled
Nat.scrolling:           disabled
Middle emulation:        disabled
Calibration:             n/a
Scroll methods:          *two-finger edge 
Scroll button:           n/a
Scroll button lock:      n/a
Click methods:           *button-areas clickfinger 
Clickfinger button map:  left/right/middle
Disable-w-typing:        enabled
Disable-w-trackpointing: enabled
Accel profiles:          flat *adaptive custom
Rotation:                n/a
Area rectangle:          n/a
...
 
On a Lenovo ThinkPad E15 AMD, this is what I have configured in /usr/local/etc/X11/xorg.conf.d/libinput.conf:
Code:
Section "InputClass"
    Identifier    "libinput Touchpad"
    MatchIsTouchpad    "on"
    Option        "NaturalScrolling" "on"
    Option        "Tapping" "on"
    Option        "TappingDrag" "on"
    Option        "TappingDragLock" "on"
EndSection
Section "InputClass"
    Identifier    "Middle Button Emulation"
    MatchIsPointer    "on"
    Option        "MiddleEmulation" "on"
EndSection

Code:
 # uname -a
FreeBSD ****** 15.1-RELEASE-p3 FreeBSD 15.1-RELEASE-p3 releng/15.1-n283611-88e7371d9dc2 GENERIC amd64

Code:
# dmesg | grep -E "input|elantech|synaptics|psm"
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
WARNING: Device "psm" is Giant locked and may be deleted before FreeBSD 16.0.
psm0: model Elantech Touchpad, device ID 0

You can remove red highlighted settings:
$ cat /boot/loader.conf
Rich (BB code):
aesni_load="YES"
geom_eli_load="YES"
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
zfs_load="YES"
acpi_video_load="YES"
hw.psm.elantech_support="1"
hw.psm.synaptics_support="1"
"aesni" is built in the 15.0 / 15.1 GENERIC kernel, the other two are set automatically without user settings.

You might want to add cryptodev_load="YES":

cryptodev(4)
Code:
DESCRIPTION
     The crypto driver gives user-mode applications access to hardware-
     accelerated cryptographic transforms as implemented by the crypto(9) in-
     kernel interface.

geli(8)
Code:
DESCRIPTION
          ...
           •   Utilizes the crypto(9) framework, so when there is crypto
               hardware available, geli will make use of it automatically.

Regarding:
Code:
# dmesg | grep Crypto
GEOM_ELI:     Crypto: accelerated software
see FreeBSD 13.0-RELEASE Release Notes
General Kernel Changes

geli(8) now reports the use of accelerated software cryptography (such as AES-NI on x86 CPUs) as "accelerated software" rather than "hardware". This is purely a change in naming, and does not imply reduced performance or support. a3d565a1188f (Sponsored by Chelsio Communications)
 
Back
Top