Apple Magic Trackpad 2 clicks and gestures, but does not move the mouse in X, only Wayland
Solution 1
Aha I think I've found the solution to this as I was having the exact same issue. I initially thought it was just click-and-drag which was working but this wasn't quite the case. Slowly adding more pressure to my finger to the point it registered a click then keeping that constant and moving my finger did not move the mouse. A bit more pressure was needed.
After some desperate Googling I found this Reddit post which suggests the default finger pressure levels were probably not right: https://www.reddit.com/r/Ubuntu/comments/ahgbdg/apple_magic_trackpad_2_configuration_on_kubuntu/
I tried setting mine to the same values as in the thread and it just started working!
First you need the xinput device ID
$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
...
⎜ ↳ Apple Inc. Magic Trackpad 2 id=32 [slave pointer (2)]
...
Here, the ID of my trackpad is 32.
Now get the properties of the device to find the "Finger" ID
xinput list-props 32
Device 'Apple Inc. Magic Trackpad 2':
Device Enabled (146): 1
...
Synaptics Finger (330): 70, 75, 0
...
The ID is the bit in brackets after "Finger", mine is 330
Now you can change the levels, I'm not sure yet exactly what the numbers mean but the ones from Reddit just worked for me. Make sure to change both IDs as appropriate.
xinput set-prop 32 330 2, 2, 0
Now note that this is only a temporary solution, as soon as you unplug and replug the MT2 the settings are lost. I haven't looked into how to make this stick yet, though this looks promising: https://wiki.archlinux.org/index.php/Touchpad_Synaptics#Configuration
Solution 2
I found how to make these settings permanent by editing the xorg.conf file.
Add this section to your /etc/X11/xorg.conf file:
Section "InputClass"
Identifier "Apple Magic Trackpad"
MatchIsTouchpad "on"
MatchUSBID "05ac:0265"
Driver "synaptics"
Option "VertScrollDelta" "50"
Option "HorizScrollDelta" "50"
Option "MinSpeed" "0.6"
Option "MaxSpeed" "1.3"
Option "AccelFactor" "0.08"
Option "VertResolution" "1"
Option "HorizResolution" "3"
Option "TapButton1" "1"
Option "TapButton3" "2"
Option "VertEdgeScroll" "on"
Option "VertTwoFingerScroll" "on"
Option "HorizEdgeScroll" "on"
Option "HorizTwoFingerScroll" "on"
Option "CircularScrolling" "on"
Option "CircScrollTrigger" "2"
Option "EmulateTwoFingerMinZ" "40"
Option "EmulateTwoFingerMinW" "8"
Option "CoastingSpeed" "0"
Option "FingerLow" "2"
Option "FingerHigh" "2"
Option "MaxTapTime" "125"
EndSection
These two options will do the trick as xinput:
Option "FingerLow" "2"
Option "FingerHigh" "2"
Update the USB ID with your device ID, get it with "lsusb"
Hope that helps.
Regards.
Related videos on Youtube
Leonora Tindall
Updated on September 18, 2022Comments
-
Leonora Tindall over 1 year
I got an Apple Magic Trackpad 2 and plugged it in to my Ubuntu 20.04 system. Clicking works, click-and-dragging works, and gestures like three-finger-workspace-switch work, but actually moving the mouse only works in Wayland, not X.
-
Jamie Scott over 3 yearsI have the exact same issue, apart from mouse movement while clicking and dragging is stuttery. I have a VM which is supposed to be a replica of my system and I decided to try debugging there where I'm happy to install junk and revert to snapshot. However, I passed the USB for the trackpad through to my VM and it literally just works brilliantly... Ubuntu 20.04 kernel 5.4.0-53-generic.
-
Leonora Tindall over 3 yearsUPDATE: You can solve this easily by using this script: gist.github.com/NoraCodes/13c5c2f9e6b161b2ce56fbdf97a3bb17
-
-
Leonora Tindall over 3 yearsYou're a hero. Thank you!
-
Jamie Scott over 3 yearsNo worries. And after some more poking around, I've discovered the synaptics driver just doesn't work as well as the libinput one (which doesn't have this problem anyway). So you might want to just uninstall synaptics and install libinput.
-
nutty about natty about 3 yearsI'm on a Thinkpad X1 5th Gen and, when not stationary, using the internal trackpad happily (probably with/via Synaptics; can I have both drivers installed and continue using Synaptics for the internal trackpad and libinput for the AMT2 ?
-
Jamie Scott about 3 years@nuttyaboutnatty if it's possible, I haven't worked out how to do it. I've just reverted to using libinput for both my integrated trackpad and my AMT2. I've not found any noticeable difference using my integrated trackpad with libinput instead of Synaptics.