Thanks mainly to
Marek Wyborski (Robotrovsky) who wrote the bulk of the code and Sean O'Brien of Google's Chrome OS team for pushing it into the Linux Kernel HID driver, there is now Apple Magic Trackpad 2 in tree support.
While the pressure support was removed it still does things like two finger scroll, and I think two finger tap produces a right click, and that's
quite a bit more useable than the current setup. It's currently in the 4.20 release of the kernel. Is there any chance of a back port for this into the Raspberry Pi kernel? It would be massively more helpful for me as I use these keyboards and mouse pretty much exclusively.
HID: magicmouse: add support for Apple Magic Trackpad 2 (9d7b186)
Code: Select all
pi@raspberrypi:~ $ git clone https://github.com/robotrovsky/Linux-Magic-Trackpad-2-Driver.git
Cloning into 'Linux-Magic-Trackpad-2-Driver'...
remote: Enumerating objects: 265, done.
remote: Total 265 (delta 0), reused 0 (delta 0), pack-reused 265
Receiving objects: 100% (265/265), 73.04 KiB | 0 bytes/s, done.
Resolving deltas: 100% (70/70), done.
pi@raspberrypi:~ $ cd Linux-Magic-Trackpad-2-Driver/
pi@raspberrypi:~/Linux-Magic-Trackpad-2-Driver $ cd scripts/
pi@raspberrypi:~/Linux-Magic-Trackpad-2-Driver/scripts $ chmod +x install.sh
pi@raspberrypi:~/Linux-Magic-Trackpad-2-Driver/scripts $ sudo apt install raspberrypi-kernel-headers
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
raspberrypi-kernel-headers
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 16.1 MB of archives.
After this operation, 104 MB of additional disk space will be used.
Get:1 http://archive.raspberrypi.org/debian stretch/main armhf raspberrypi-kernel-headers armhf 1.20181112-1 [16.1 MB]
Fetched 16.1 MB in 2s (6,405 kB/s)
Selecting previously unselected package raspberrypi-kernel-headers.
(Reading database ... 86802 files and directories currently installed.)
Preparing to unpack .../raspberrypi-kernel-headers_1.20181112-1_armhf.deb ...
Unpacking raspberrypi-kernel-headers (1.20181112-1) ...
Setting up raspberrypi-kernel-headers (1.20181112-1) ...
Error: Timeout was reached
pi@raspberrypi:~/Linux-Magic-Trackpad-2-Driver/scripts $ sudo apt install dkms
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
python3-apport menu
The following NEW packages will be installed:
dkms
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 74.8 kB of archives.
After this operation, 289 kB of additional disk space will be used.
Get:1 http://raspbian-us.ngc292.space/raspbian stretch/main armhf dkms all 2.3-2 [74.8 kB]
Fetched 74.8 kB in 0s (75.0 kB/s)
Selecting previously unselected package dkms.
(Reading database ... 119233 files and directories currently installed.)
Preparing to unpack .../archives/dkms_2.3-2_all.deb ...
Unpacking dkms (2.3-2) ...
Setting up dkms (2.3-2) ...
Processing triggers for man-db (2.7.6.1-2) ...
pi@raspberrypi:~/Linux-Magic-Trackpad-2-Driver/scripts $ sudo ./install.sh
+ dkms_name=hid-magicmouse-dkms
+ dkms_version=4.18+magictrackpad2
+++ dirname ./install.sh
++ cd .
++ pwd
+ DIR=/home/pi/Linux-Magic-Trackpad-2-Driver/scripts
+ dkms status -m hid-magicmouse-dkms -v 4.18+magictrackpad2
+ egrep '(added|built|installed)'
+ dkms add /home/pi/Linux-Magic-Trackpad-2-Driver/scripts/../linux/drivers/hid
Creating symlink /var/lib/dkms/hid-magicmouse-dkms/4.18+magictrackpad2/source ->
/usr/src/hid-magicmouse-dkms-4.18+magictrackpad2
DKMS: add completed.
+ egrep '(built|installed)'
+ dkms status -m hid-magicmouse-dkms -v 4.18+magictrackpad2
+ dkms build hid-magicmouse-dkms/4.18+magictrackpad2
Error! echo
Your kernel headers for kernel 4.19.13-v7+ cannot be found at
/lib/modules/4.19.13-v7+/build or /lib/modules/4.19.13-v7+/source.
pi@raspberrypi:~/Linux-Magic-Trackpad-2-Driver/scripts $ uname -a
Linux raspberrypi 4.19.13-v7+ #1186 SMP Tue Jan 1 11:32:58 GMT 2019 armv7l GNU/Linux
Looks like I can't side load the module, as I don't have the kernel source code for this version of the kernel. Can I just ...
Code: Select all
$ cd /lib/modules/4.19.14-v7+/source/
$ git clone https://github.com/raspberrypi/linux.git