360-dennis
January 7th, 2019, 01:25 PM
I set out to get the Apple Magic Trackpad 2 (i've shortened it to AMT2) to work, this post is ment to share my experiences, to dump 50 tabs of my browser in this post and to ask some questions. I'm not a expert on ubuntu desktops, although i'm an enthousiast. Hopefully this thread will get all the how to get AMT2 working. If it's usefull, I will make some efforts to incorporate it into the official Ubuntu documentation although It will be my first doing so.
> What is the magic trackpad 2?
Basicly an external trackpad ment for apple laptops:
https://en.wikipedia.org/wiki/Magic_Trackpad_2
> How do I install the hardware driver for the AMT2?
You don't, most of the linux hardware drivers reside in the kernel. The AMT2 drivers are in the 4.20 kernel, which isn't incorparated (yet) in an official ubuntu flavor. Yu can find the used kernel vs ubuntu version here:
https://wiki.ubuntu.com/Kernel/LTSEnablementStack
To install newer kernels, I recommend using ukuu:
https://www.omgubuntu.co.uk/2017/02/ukuu-easy-way-to-install-mainline-kernel-ubuntu
> How to check if your AMT2 is recognised?
open a terminal and run:
xinput list
It should list a "Apple Inc. Magic Trackpad 2" device. Write down the id number, you will need this later.
> Does your AMT2 only work if you press it really hard (almost to a click or even after a click)? You will probably have to change the pressure sensitivity:
This is due to defaults which aren't right (just yet). I expect to be corrected after the linux kernel 4.20 is incorporated into the kernel. If we find the correct settings in this post, I will try to find out how we will get the correct defaults in ubuntu.
First find out if you are using libinput or synaptics as main driver in your system:
xinput list-props [DEVICE ID]
replace the [DEVICE ID] with the id you wrote down earlier. You should get the properties of the AMT2, which should say "Device 'Apple Inc. Magic Trackpad 2'".
Set the finger options:
xinput set-prop [DEVICE ID] [FINGER PROPERTY ID] 2, 2, 0
So in my case this looks like
xinput set-prop 17 296 2, 2, 0
More information here:
- explaination of xinput:
https://help.ubuntu.com/community/SynapticsTouchpad
- settings of synaptics and the finger options:
http://manpages.ubuntu.com/manpages/precise/man4/synaptics.4.html
same as https://www.x.org/releases/X11R7.6/doc/man/man4/synaptics.4.xhtml
> Do you want to use the 3 finger click as the middle mouse button (paste the selection).
open a terminal and configure:
synclient TapButton3=2
More details here:
https://askubuntu.com/questions/130393/how-to-configure-the-touchpad-middle-click
> Make the changes stick (so you won't have to set the settings every time you connect the AMT2).
Not sure yet what the best approach is, I'm using the shell startup script for now like described here:
https://askubuntu.com/questions/130393/how-to-configure-the-touchpad-middle-click
But this might work:
https://www.dell.com/support/article/nl/nl/nlbsdt1/sln308258/precision-xps-ubuntu-general-touchpad-mouse-issue-fix?lang=en
Todo/questions:
- I haven't tried the bluetooth config yet, I think I have some issues with my bluetooth broadcom hardware in my Dell XPS13-9350. I'm about to swap the broadcom chip with the intel, after that I will give the bluetooth driver a go. From what I've read the experience should be the same as with the wired config.
- I haven't yet tried to configure gestures, what should be the way to go? I was thinking of describing a few options like
https://www.omgubuntu.co.uk/2018/09/linux-touchpad-gestures-app
https://askubuntu.com/questions/1034624/touchpad-gestures-in-ubuntu-18-04-lts
Are these the best options? And what is preferred? I would like it to contain the easiest, but also include expert options.
- I'm using kubuntu 18.04 now, but I did use xubuntu, ubuntu-gnome, ubuntu-unity. It seems every desktop manager has their own preference on how to configure the touchpad. Is that correct? Should this guide contain guidance on the main ubuntu desktop managers to get the AMT2 working? I think I would stick to the latest LTS versions.
- Should AMT2 use libinput or synaptics? Did I understand correcty that Wayland prefers libinput so for future Ubuntu versions libinput is preferred? If so, I think this guide should contain configuring AMT2 with libinput, am I correct?
- How do I configure the AMT2 to prefer libinput instead of synaptics? I only found posts of switching to libinput for all devices, but I want it to be for the AMT2 only. Should it be through /usr/share/X11/xorg.conf.d/50-synaptics.conf or is that outdated in 18.04? I found another recent post here:
https://askubuntu.com/questions/1031940/how-to-switch-from-libinput-to-synaptics-in-ubuntu-18-04
- And If it uses libinput, should I configure the touch sensitivity like this: https://www.reddit.com/r/linuxquestions/comments/ad0bez/needing_a_bit_of_help_regarding_libinput_on_ubuntu/
https://askubuntu.com/questions/1099785/how-do-i-increase-touch-pad-senstivity-using-libinput
- "libinput debug-gui" or "libinput quirks" or "libinput list quirks" does not work in my xubuntu 18.04. Is this correct? It's the same like this post:
https://stackoverflow.com/questions/50274218/getting-raw-multitouch-data-with-libinput
I can't find a mention of this here:
https://wayland.freedesktop.org/libinput/doc/latest/device-quirks.html
So.. this took my whole morning, I'm looking forward to your comments!
> What is the magic trackpad 2?
Basicly an external trackpad ment for apple laptops:
https://en.wikipedia.org/wiki/Magic_Trackpad_2
> How do I install the hardware driver for the AMT2?
You don't, most of the linux hardware drivers reside in the kernel. The AMT2 drivers are in the 4.20 kernel, which isn't incorparated (yet) in an official ubuntu flavor. Yu can find the used kernel vs ubuntu version here:
https://wiki.ubuntu.com/Kernel/LTSEnablementStack
To install newer kernels, I recommend using ukuu:
https://www.omgubuntu.co.uk/2017/02/ukuu-easy-way-to-install-mainline-kernel-ubuntu
> How to check if your AMT2 is recognised?
open a terminal and run:
xinput list
It should list a "Apple Inc. Magic Trackpad 2" device. Write down the id number, you will need this later.
> Does your AMT2 only work if you press it really hard (almost to a click or even after a click)? You will probably have to change the pressure sensitivity:
This is due to defaults which aren't right (just yet). I expect to be corrected after the linux kernel 4.20 is incorporated into the kernel. If we find the correct settings in this post, I will try to find out how we will get the correct defaults in ubuntu.
First find out if you are using libinput or synaptics as main driver in your system:
xinput list-props [DEVICE ID]
replace the [DEVICE ID] with the id you wrote down earlier. You should get the properties of the AMT2, which should say "Device 'Apple Inc. Magic Trackpad 2'".
Set the finger options:
xinput set-prop [DEVICE ID] [FINGER PROPERTY ID] 2, 2, 0
So in my case this looks like
xinput set-prop 17 296 2, 2, 0
More information here:
- explaination of xinput:
https://help.ubuntu.com/community/SynapticsTouchpad
- settings of synaptics and the finger options:
http://manpages.ubuntu.com/manpages/precise/man4/synaptics.4.html
same as https://www.x.org/releases/X11R7.6/doc/man/man4/synaptics.4.xhtml
> Do you want to use the 3 finger click as the middle mouse button (paste the selection).
open a terminal and configure:
synclient TapButton3=2
More details here:
https://askubuntu.com/questions/130393/how-to-configure-the-touchpad-middle-click
> Make the changes stick (so you won't have to set the settings every time you connect the AMT2).
Not sure yet what the best approach is, I'm using the shell startup script for now like described here:
https://askubuntu.com/questions/130393/how-to-configure-the-touchpad-middle-click
But this might work:
https://www.dell.com/support/article/nl/nl/nlbsdt1/sln308258/precision-xps-ubuntu-general-touchpad-mouse-issue-fix?lang=en
Todo/questions:
- I haven't tried the bluetooth config yet, I think I have some issues with my bluetooth broadcom hardware in my Dell XPS13-9350. I'm about to swap the broadcom chip with the intel, after that I will give the bluetooth driver a go. From what I've read the experience should be the same as with the wired config.
- I haven't yet tried to configure gestures, what should be the way to go? I was thinking of describing a few options like
https://www.omgubuntu.co.uk/2018/09/linux-touchpad-gestures-app
https://askubuntu.com/questions/1034624/touchpad-gestures-in-ubuntu-18-04-lts
Are these the best options? And what is preferred? I would like it to contain the easiest, but also include expert options.
- I'm using kubuntu 18.04 now, but I did use xubuntu, ubuntu-gnome, ubuntu-unity. It seems every desktop manager has their own preference on how to configure the touchpad. Is that correct? Should this guide contain guidance on the main ubuntu desktop managers to get the AMT2 working? I think I would stick to the latest LTS versions.
- Should AMT2 use libinput or synaptics? Did I understand correcty that Wayland prefers libinput so for future Ubuntu versions libinput is preferred? If so, I think this guide should contain configuring AMT2 with libinput, am I correct?
- How do I configure the AMT2 to prefer libinput instead of synaptics? I only found posts of switching to libinput for all devices, but I want it to be for the AMT2 only. Should it be through /usr/share/X11/xorg.conf.d/50-synaptics.conf or is that outdated in 18.04? I found another recent post here:
https://askubuntu.com/questions/1031940/how-to-switch-from-libinput-to-synaptics-in-ubuntu-18-04
- And If it uses libinput, should I configure the touch sensitivity like this: https://www.reddit.com/r/linuxquestions/comments/ad0bez/needing_a_bit_of_help_regarding_libinput_on_ubuntu/
https://askubuntu.com/questions/1099785/how-do-i-increase-touch-pad-senstivity-using-libinput
- "libinput debug-gui" or "libinput quirks" or "libinput list quirks" does not work in my xubuntu 18.04. Is this correct? It's the same like this post:
https://stackoverflow.com/questions/50274218/getting-raw-multitouch-data-with-libinput
I can't find a mention of this here:
https://wayland.freedesktop.org/libinput/doc/latest/device-quirks.html
So.. this took my whole morning, I'm looking forward to your comments!