mwyborski / Linux-Magic-Trackpad-2-Driver

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Will it work on kernel 4.18.12?

alwzying opened this issue · comments

and in which version has it been merged into kernel

Working on 4.18.12 (Arch) for me. From what I read it might make it into 4.20 proper

@adam-h Did you notice any issues, i.e. lag, unresponsiveness, with Linux 4.18.14 from Arch?

Nope, still looking good via USB and BT

@adam-h Thanks. I tried connecting via usb today and the trackpad indeed appears to be working as before again, the described issues via bluetooth are yet still present. I will play around with it this weekend and will report back here, if i find something.

Updated to Linux 4.18.16 on Arch Linux: the functionality is all there, if connected via bluetooth, but i have to press my finger quite harder onto the touchpad to move the cursor, compared to when connected via usb. Same as 4.18.14. Tried re-pairing the trackpad, rebuilding/reloading the module, manually adding the module, etc., but it appears only downgrading to 4.18.12 restores the functionality to where it was before.

@sydneymeyer I just tried via Bluetooth for the first time in a few weeks and notice that I also have to press harder for normal touch operations like two-finger scrolling. Kernel 4.18.16 on Arch Linux as well.

@sydneymeyer @alanorth I got the same issue on latest Arch kernel via bluetooth. I need to press almost to a click to perform any action. My setup is:

linux-zen 4.18.16.zen1-1
xf86-input-libinput 0.28.1-1
libinput 1.12.2-1

What i supposed the pressure is a key. Looks like via bluetooth connection the pressure threshold are activated. Because libinput record register all of the touches and libinput measure touchpad-pressure shows that the threshold is kinda 30:25 (press and release levels). So you just need to override them!
I've done that with this quirks config file:

> cat /etc/libinput/local-overrides.quirks
[Touchpad pressure override]
MatchName=*Magic Trackpad 2
AttrPressureRange=2:0

Adjust values for yourself and reboot system to apply changes.

For more you can refer to this links:
https://wiki.archlinux.org/index.php/Libinput#Change_touchpad_sensitivity
https://wayland.freedesktop.org/libinput/doc/latest/touchpad-pressure-debugging.html#touchpad-pressure-hwdb
https://wayland.freedesktop.org/libinput/doc/latest/device-quirks.html

Also I did not test yet, but seems like usb connection ignore those thresholds.

This is right. The offsets for the pressures have been removed from the kernel-module and need now to be handled in userspace.

https://lkml.org/lkml/2018/10/3/145

Peter Hutterer:

libinput uses touch major/minor but only if a threshold is defined for
that device in the quirks files (matches on VID/PID/name/...).
https://gitlab.freedesktop.org/libinput/libinput/quirks/

No existing quirk will match for this device so libinput falls back to using
pressure instead. That too can be defined per-device in the quirks but for
this VID/PID it isn't so we fall back to the default thresholds guessed
based on the pressure range (12% of the range, that's where the 30 comes
from).

Adding a quirk for this device with the required major/minor threshold (or
pressure if that's more reliable) should be enough to make it work, it
definitely doesn't require a kernel workaround.

fwiw, testing against libinput is as simple as building the git repo with
meson and running:
sudo ./builddir/libinput-debug-events
or if you want some graphical debugging (requires gtk3-devel)
sudo ./builddir/libinput-debug-gui

Cheers,
Peter

For ubuntu users, the quirks file is located in /usr/share/libinput/.quirks

@idomitori you're right, those quirks work well for me on Arch Linux kernel 4.18.16 while using the trackpad over Bluetooth. Thanks!