mwyborski / Linux-Magic-Trackpad-2-Driver

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

inconsistent USB vs bluetooth

esfourteen-zz opened this issue · comments

When using the trackpad via bluetooth, a quirks override is still necessary to fix the pressure issues. Additionally, for some reason palm rejection doesn't work at all (just picks up palm as mouse movements).

When using the trackpad via USB, pressures work as expected without any quirks and palm rejection works reliably.

Tested this with both live USB ubuntu 19.04 (kernel 5.0) and elementary juno (kernel 5.0.11), same issues.

additionally, xinput sees the device as 'Apple Inc. Magic Trackpad 2' with usb or bluetooth, but shows different product ID's.

When connected via usb the following additional input properties are present:

libinput Disable While Typing Enabled (315):    1
libinput Disable While Typing Enabled Default (316):    1

these are not present when connected via bluetooth.

Xorg log shows no difference in driver for usb vs bt, both report the following:

config/udev: Adding input device Apple Inc. Magic Trackpad 2 (/dev/input/event27)
Apple Inc. Magic Trackpad 2: Applying InputClass "evdev touchpad catchall"
Apple Inc. Magic Trackpad 2: Applying InputClass "libinput touchpad catchall"
Apple Inc. Magic Trackpad 2: Applying InputClass "Touchpads"
Using input driver 'libinput' for 'Apple Inc. Magic Trackpad 2'

USB:
xinput usb

Those quirks listed appear to be the default USB quirks defined for apple touchpads:

[Apple Touchpads USB]
MatchVendor=0x05AC
MatchBus=usb
MatchUdevType=touchpad
ModelAppleTouchpad=1
AttrSizeHint=104x75
AttrTouchSizeRange=150:130
AttrPalmSizeThreshold=800

Bluetooth:
xinput usb

note how theres no quirks listed, however copying the quirks shown above into local overrides only fixes the pressure which allows mouse movement and scrolling. palm detection still doesn't work

Patches necessary for it to work out-of-the-box are already in both systemd (systemd/systemd#12282, merged in v242) and libinput (https://gitlab.freedesktop.org/libinput/libinput/merge_requests/214, merged in 1.13.2). You have to wait until your distribution ships them or apply those fixes by yourself.

BTW. Palm rejection gets automatically disabled for external devices, so the correct behavior is to have it disabled for both Bluetooth and USB (it wasn't disabled for USB, because it was incorrectly marked as internal instead).

@dos1 i see, that makes sense. what would be the correct way to enable palm detection for bt (or usb when patch is merged)?

Not sure if libinput allows you to reenable palm detection for external touchpads, I guess it doesn't, but you can always use a local udev-hwdb override to mark the touchpad as internal (see the systemd PR for reference).

@dos1 ah yep, that works. thanks!