9

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.

Leonora Tindall
  • 333
  • 1
  • 3
  • 13
  • I 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. – Jamie Scott Nov 19 '20 at 16:04
  • 2
    UPDATE: You can solve this easily by using this script: https://gist.github.com/NoraCodes/13c5c2f9e6b161b2ce56fbdf97a3bb17 – Leonora Tindall Feb 09 '21 at 22:24

3 Answers3

11

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

Jamie Scott
  • 308
  • 1
  • 11
  • You're a hero. Thank you! – Leonora Tindall Nov 27 '20 at 15:53
  • No 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. – Jamie Scott Nov 28 '20 at 19:39
  • I'm on a [Thinkpad X1 5th Gen](https://psref.lenovo.com/syspool/Sys/PDF/ThinkPad/ThinkPad_X1_Carbon_5th_Gen/ThinkPad_X1_Carbon_5th_Gen_Spec.PDF) 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 ? – nutty about natty Apr 30 '21 at 09:56
  • @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. – Jamie Scott May 01 '21 at 15:40
3

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.

Jairelee
  • 671
  • 5
  • 4
0

According to this on wayland trackpad managed by libinput and on X by xinput. Try to compare settings of regular mouse and trackpad. Maybe sensitivity is set to 0 or trackpad emits specific events for move and you have to bind to them xinputs's move events. I want to buy same trackpad too and I hope we will be able to find solution for your problem.