A kernel patch for the trackpad has been accepted and backported to LTS kernels. It's available in:
- 6.1 LTS - 6.1.120 and newer
- 6.6 LTS - 6.6.66 and newer
- 6.12 LTS - 6.12.5 and newer
- 6.13 and newer
This is not needed for Apple Magic devices with lightning port connectors, which are supported in kernel version 5.15+.
To install the driver on non-debian distros, install dkms
and use the installer script:
sudo apt install dkms # or yum, pacman, etc
git clone https://github.com/mr-cal/Linux-Magic-Trackpad-2-USB-C-Driver.git
cd Linux-Magic-Trackpad-2-USB-C-Driver
chmod u+x install.sh
sudo ./install.sh
For Debian, Ubuntu, and derivatives, you can download and install the published deb package here and install it with:
wget https://github.com/mr-cal/Linux-Magic-Trackpad-2-USB-C-Driver/releases/download/latest/magicmouse-hid_2.1.0-0.deb
sudo dpkg -i magicmouse-hid_2.1.0-0.deb
To build and install the deb yourself:
./build-deb.sh
sudo dpkg -i magicmouse-hid_2.1.0-0.deb
To reload the driver:
sudo rmmod hid_magicmouse
sudo modprobe hid_magicmouse
sudo ./remove.sh
sudo dpkg -r magicmouse-hid
x: are x position of touch on touch surface
y: are y position of touch on touch surface
s: are state
touch_major: touch major axis of ellipse of finger detected
touch_minor: touch minor axis of ellipse of finger detected
size: size info
pressure: pressure of touch on touch surface
o: orientation of the touch on touch surface
i: id of touch
?: Unknown data
[ x x x x x x x x ]
[ y y y x x x x x ]
[ y y y y y y y y ]
[ s s ? ? ? ? y y ]
[ touch_major ]
[ touch_minor ]
[ size ]
[ pressure ]
[ o o o ? i i i i ]
The out-of-box experience with Magic Trackpads is significantly better with Wayland compared to X11.
setup | usual default featureset |
---|---|
no driver | point, hard left click |
driver + X11 | point, hard left/right clicks, scroll, three-finger middle mouse button |
driver + wayland | point, hard/soft left/right clicks, smooth scroll, zoom, three-finger middle mouse button |
Additional gestures can be configured with touchegg or libinput-gestures.
If you haven't installed an unofficial driver before, be advised that you must disable secure boot, use a kernel that does not require signed drivers, or self-sign the driver. See here for more information.
This driver is based on the work of @RicardoEPRodrigues, @robotrovsky, @svartalf, @0xABAD, and probably others. Thank you!