The is a guide to installing the Apple Magic TrackPad 2 on Ubuntu Linux. While this guide has been written for Ubuntu 20.04, it should be easy to follow these instructions with minor changes for Fedora.
Plug the TrackPad in to USB. The trackpad should just work via a cabled connection. 2 Finger scrolling will work, a 2-finger tap is right mouse button, and a 3-finger tap is the middle button (or paste).
To connect the trackpad via bluetooth, unplug the USB cable and turn the trackpad off, wait a second or two then turn it back on. The trackpad will now appear in bluetooth settings and can be paired.
Add your user to the ‘input’ group. After doing this you will need to completely restart your session – the easiest way to do this is to reboot. Logging in and out will not work.
$ sudo gpasswd -a $USER input
Now you will need to install libinput-gesture – the example below uses the latest from git
$ sudo apt-get install xdotool wmctrl git python3 libinput-tools build-essential $ mkdir ~/src/ $ cd ~/src/ $ git clone https://github.com/bulletmark/libinput-gestures.git $ cd libinput-gestures $ sudo make install $ libinput-gestures-setup autostart $ libinput-gestures-setup start
After this, a three finger swipe up and down will switch workscapes. Read /etc/libinput-gestures.conf to see other options that are available.
Unfortunately, when used over bluetooth, the sensitivity of the touch to click is far too sensitive. I found that text was constantly accidently selected. This issue does not occour when the decice is wired.
Libinput seems to show the same device details as below for both wired and bluetooth – so I’ve not figured out that cause of this yet.
Device: Apple Inc. Magic Trackpad 2 Kernel: /dev/input/event25 Group: 6 Seat: seat0, default Size: 162x115mm Capabilities: pointer gesture Tap-to-click: disabled Tap-and-drag: enabled Tap drag lock: disabled Left-handed: disabled Nat.scrolling: disabled Middle emulation: disabled Calibration: n/a Scroll methods: *two-finger edge Click methods: button-areas *clickfinger Disable-w-typing: n/a Accel profiles: none Rotation: n/a