Apple magic trackpad ubuntu

Apple Magic Trackpad gestures on Ubuntu

How I finally got it to work

Mar 26, 2014 · 3 min read

A Little Preface

When I first heard that Ubuntu added multitouch support a couple years ago, I got really hyped. It was huge. Finally we could have the shiny, cool, but most of all useful feature Apple has always been bragging about on our Linux PCs. So after a bit of research, which showed that multitouch support was there (although it was very basic), I bought a Magic Trackpad for 69 euros. I hoped to follow the development and maybe do some testing.

Big mistake. After t h e initial hype and announcements, it all became stagnant and half forgotten. After a while I gave up and used the trackpad as a normal one with a couple more features like being wireless and very big.

But today, I tried the in-development version of Ubuntu (14.04) and I thought, why not try the trackpad? Maybe it works now!

Well, no. I got a kernel panic within 2 minutes of each time I was testing it. This is obviously ok, it is still under development after all. Nevertheless, I got interested in the trackpad again and did some research about how to make it work on my elementary OS Luna system, based on Ubuntu 12.04.

I got it to work, and here is how.

First of all, pair the Magic Trackpad, using this guide. Then, create the directory /etc/X11/xorg.conf.d and in it create the file “ 50-synaptics.conf” with the following content:

Section «InputClass»
Identifier «evdev touchpad catchall»
Driver «synaptics»
MatchUSBID «05ac:030e»
MatchIsTouchpad «on»
Option «Protocol» «event»
Option «SHMConfig» «on»
EndSection

You will need to restart your session after this.

If like me you don’t have two finger scrolling available from the trackpad options in the system settings you have to enable it using xinput:

Use the command

with no arguments and find the id and the name associated to the trackpad in the list it outputs. On my computer, it was and the name displayed under “Virtual core pointer” was “Apple Magic Trackpad”, so I will use those. Now, we can use the command

xinput set-prop 12 «Synaptics Two-Finger Scrolling» 1 1

to enable two finger scrolling.

After this we need to get and set up xSwipe. First of all install libx11-guitest-perl with

sudo apt-get install libx11-guitest-perl

Then get xSwipe with

wget https://github.com/iberianpig/xSwipe/archive/master.zip
unzip master.zip
cd xSwipe-master

You can then test the default configuration (the eventKey.cfg file) by using the command:

To change the default configuration, you can read the official documentation for xSwipe customization. You can also get my configuration file here, which is really simple and has just the basic gestures for desktop and window management.

To start xSwipe as soon as you login automatically we can move the xSwipe.pl and eventKey.cfg files to a folder

/ .xSwipe and then we can create a script to be launched on startup containing

# set your devices names here trackpad=»Apple Magic Trackpad»

id=$(xinput | awk -F= «/$trackpad.*pointer/ » | cut -f1)

if [[ -n «$» ]]; then xinput set-prop «$» «Synaptics Two-Finger Scrolling» 1 1 fi
perl

Источник

Magic Trackpad vs Ubuntu — кто косячит?

Есть у меня такой вот трекпад от говноэппла. Вроде терпимая штука, за неимением альтернатив (на кровати с мышкой очень неудобно).

Но есть одна проблемка — он не выключается сам при неактивности. А я регулярно забываю его выключить перед сном. В результате батарейки выжираются и приходится регулярно их менять.

Вопрос в том кто лажает? (ну кроме меня). Либо эппловские продукты и впрямь такое говно и они не предусмотрели такую элементарную вещь — или всетаки моя бубунта этому припятствует и шлет какието keepalive (как вариант, хз бывает ли такое). Вдруг это всеже можно както исправить?

з.ы. у меня первой версии, оказывается они его уже перевыпустить успели лол

Косячишь в данном случае ты. Не надо использовать аппле устройства на неаппле ОС. Драйверов нет, ничего нет, поэтому работает не лучше мышки за 150 деревянных, а то и хуже. Разве что на ощупь приятнее. А в макос с соответствующими драйверами равных трекпаду нет. Мышь расчехляю только если вдруг захочется поиграть в какой-нибудь спинномозговик.

Читайте также:  Привязанные телефоны apple id

И по памяти: мышь эппловская у меня была, разряжалась достаточно быстро 2 недели-1 месяц даже при эксплуатации с маком. Не сравнить с логитеком (привет соседнему треду) в котором я батарейки менял раз в год наверное, не чаще.

о, эпплодрочер чтоль?
тачпад как тачпад. в офисе пользовался ей с маком пару недель — никаких различий (разве что жесты из коробки есть). и кстати ничего крутого в нем нет, кусок фекалий разработанный дизайнерами и маркетологами. пользоваться можно, но своих денег не стоит даже близко — просто аналогов на момент покупки небыло. такчто не неси херни

Источник

Ubuntu Wiki

AppleMagicTrackpad

The Magic Trackpad is a multi-touch trackpad produced by Apple Inc.

It can be used as a single-touch device in Ubuntu by pairing it using the Bluetooth utilities in Ubuntu. The following setup instructions only need to be followed once, then Ubuntu will recognize the Magic Trackpad without further configuration.

Also note the nubs on the underside of the trackpad act as the mouse button — the two rubber pieces act as such when you press *on* the device itself.

Testing

You can confirm that gestures are recognized by following the directions here:

In order to use this device with other multi-touch software, you will need to know its input device name and number.

Here is example output for lsinput with a Magic Trackpad present (other irrelevant input device removed):

In this case the input device would be /dev/input/event7. The input device number would be 7.

For more information on testing this device for multi-touch support, see Multitouch/Testing.

Once you’ve confirmed the above, you can try using PyMT.

Pairing the Magic Trackpad

Using graphical tools

Once you have inserted batteries in your Magic Trackpad, if your system is Bluetooth-capable and its radio is enabled, you will see a dialog box asking for a PIN to pair it:

Such pairing can be forced by pressing and holding the button at the top-right side of the tablet.

You need to provide 0000 as the PIN code and press Enter to pair the trackpad. Once this has been done you need to permanently authorize this device to pair with your system. You can do so by going to the Bluetooth applet and choosing Apple Wireless Trackpad > Connect:

You will then be asked to confirm authorization to connect from this device. Make sure the «Always grant access» checkbox is ticked and click on Grant:

Once these steps have been completed the trackpad will remain available in Ubuntu.

If the above instructions fail, see below for manual Bluetooth pairing instructions.

Problem: Pairing does not persist between reboots on Maverick (10.10)

If you find that you are not being prompted to «Always grant access» and that the device is not available after a reboot (i.e., you have to reconnect), try adding the pincode for the device (0000) to /var/lib/bluetooth/

/pincodes, like so:

Determine the physical (model-specific) and unique device IDs from the output of lsinput (from the «input-tools» package) as shown above.

/pincodes as the root user (or with sudo): Add this line to the new file, save, and exit:

is a backslash-escaped physical device ID, like D8\:30\:62\:38\:18\:02, and is your device’s unique ID, both from the output of lsinput.

Using the command line

First, verify that your Bluetooth radio is indeed on. Open a terminal window and issue the following command:

The above example output shows what you would see if / when your Bluetooth radio is detected and enabled.

Next, let’s scan for nearby Bluetooth devices. Note you must press the pairing/ON/OFF button for approximately 10 seconds on your Magic Trackpad for it to enter «pairing» mode. A small green light will start flashing.

The above output has important information. The bluez-compat package needs to be installed before requesting pairing:

Then we can use the «XX. » string to request pairing of the trackpad:

There should be no output after the above command, however your trackpad should now be recognized and act as a single-touch device.

Support on Ubuntu 10.04 (Lucid Lynx)

By default, it’s possible to pair the Magic Trackpad and use basic mouse-like functionality with the regular left-click being available via the physical click only; tapping and scrolling will not work. As of September 8th, with the unsupported 2.6.35 (Maverick) kernel from the Ubuntu Kernel Team PPA, all expected basic functionality (two-finger scrolling, tap to click, right and middle click emulation through two and three finger taps respectively) works by using the «synaptics» X driver.

Читайте также:  Убрать способы оплаты айфон

Support for Magic Trackpad on Ubuntu 12.04 LTS (Precise Pangolin) on iMac 27¨ (2013 revision)

The Long Term Stable version of Ubuntu supports the Apple wireless Keyboard and the wireless Trackpad. While automatic pairing of Ubuntu to the keyboard is as you might expect, pairing with the Trackpad is not quite so intuitive, until you realise what may be happening. With the wireless keyboard, the Ubuntu Bluetooth utility asks you to type a random six digit security code on the keyboard, to enable the pairing. This is not possible with the Trackpad! The Trackpad his an ínbuilt code of ´0000´.

Pairing the Bluetooth Trackpad to Ubuntu 12.04:- Within the Settings | Bluetooth utility, first press Add (+) and Continue | PIN Options | ´Fixed PIN 0000´ and then Close (start searching) BEFORE starting-up the Trackpad registration (pressing-in its power button for several seconds). You need to specify ´Fixed PIN 0000´ BEFORE the System Administrators Trackpad is found and added to the selection list by Ubuntu! It appears that the fixed PIN is behaving like a filter for any incoming Bluetooth pairing requests; that when Ubuntu knows this, it accepts the Trackpad (default of ´0000´) and pairing then completes automatically as you would expect. This pairing is persistent between system re-boots and powering off-on, though you might wish to have a spare USB keyboard and mouse available, just in case. On top line of the Ubuntu screen you should select the appropriate Macintosh keyboard for your locale, especially if wishing to access some of the more quirky keyboard characters during login (@ or # or currency symbols).

Having paired Ubuntu Bluetooth and the Magic Trackpad, you have a physical right and left click, normal scrolling with a single or double click, also two-finger scrolling going up and down an list, or sideways on a screen, or zoom-in or -out, also a three finger gesture to grab the current screen and relocate it on the desktop (nearly as flexible as the iMac´s OS X). Regrettably, when you switch between Linux Ubuntu and Apple OS X, you are obliged to re-pair the keyboard and trackpad afresh — a little niggle worth paying, if you prefer the greater contrast and larger characters of Ubuntu on the iMac 27¨ super high definition screen.

Known issues

Using Ginn for multi-touch gesture inputs

This method utlises Ginn to produce keyboard and mouse events based on multi-touch gesture events. This utilises the standard evdev driver and therfore the Synaptics style functionality method conflicts. The Ginn method will emulate the Synaptics style and provide additional functionality

2) Download the attached Ginn wishes file wishes.xml and save to your home folder. Replace /etc/ginn/wishes.xml with the downloaded version.

As ginn is a little unstable at present, the ginn-wrapper script can be used to automatically restart ginn if it crashes.

Synaptics style functionality

In Ubuntu 10.10, some typical trackpad features are not available when using the default gesture support. These include two finger scrolling and two finger tap for right click. Ubuntu 11.04 and on allow for gestures and these trackpad features at the same time.

If you are running 10.10 and want to switch from gesture support to traditional trackpad support, add this section to /etc/X11/xorg.conf, creating the file if necessary:

Multitouch — Ubuntu community documentation

Apple Magic Trackpad and Ubuntu Lucid — How to pair the Magic Trackpad in Ubuntu 10.04 LTS

Launchpad bug #618838 — «Apple Magic Trackpad requires PIN to pair, fails manual pairing»

Touchégg — alternative project to bring a multitouch gesture configuration GUI to Linux/Ubuntu

version 0.2 binary packages may provide multitouch gestures for Maverick (untested), provided you are not using the synaptics xorg driver.

Multitouch/AppleMagicTrackpad (последним исправлял пользователь gdenby 2013-10-21 16:13:22)

The material on this wiki is available under a free license, see Copyright / License for details.

Источник

Apple magic trackpad ubuntu

Linux Apple Magic Mouse 2 and Magic Trackpad 2 Driver

This repository contains the linux hid-magicmouse driver with Magic Trackpad 2 and Magic Mouse 2 support for Linux 4.18 onwards. For older kernels you might have to diff and backport. It also contains 2 fixes to the Magic Mouse 2 regarding Bluetooth random disconnections and this driver not loading on bluetooth reconnection.

Читайте также:  Штрафы гибдд для iphone

This driver is based off of the work of @robotrovsky, @svartalf, @0xABAD and probably others.

Please help to test this driver and report issues.

NOTE: Since kernel version 5.15, there is support for the mouse without the need for this driver. We try to backport changes to this driver to have it up-to-date with the one on the kernel and try to offer a bit more functionality but it is not perfect. If you want the mouse to just work either install a more recent kernel or proceed with this driver installation.

Ubuntu (and derivatives)

A .deb file is now available in Releases. Get the latest version here.

Install Driver with DKMS and the two fixes.

Apple Magic Trackpad 2

The driver supports bluetooth and USB for the trackpad. To connect the Trackpad via bluetooth, it must be clicked once after it is turned on, then the Trackpad tries to reconnect to the last paired (and trusted) connection.

Apple Magic Mouse 2

The drivers supports regular mouse motion and additionally scrolling and mouse middle click. Middle click is a single finger click near the middle portion of the touch surface OR a 3 finger click anywhere on the touch surface if you put the mouse in 3 finger middle click mode. Scrolling is a single finger up or down motion anywhere on the touch surface.

Several parameters are avaliable for you to modify to personalize the driver to your taste. These can be found in /etc/modprobe.d/hid-magicmouse.conf after install. Modify them and the next time the driver is loaded it will have the new values.

Reloading the driver

After changing the parameters the driver can be reloaded using the following commands:

If the driver is not working, please make sure that the correct hid-magicmouse driver gets loaded and try the following steps:

Now unplug the trackpad and plug it back in, to see which driver gets loaded.

Data Layout of bluetooth packets.

Below is the explanation to 2 fixes performed when running the install.sh shown above. The first relates to the disconnection of the mouse over bluetooth and will restart the bluetooth service. The second regards the driver not being loaded when the mouse reconnects with the computer.

There have been many complaining of repeated and random disconnections of the Magic Mouse 2. One solution to this is to disable eSCO mode on the bluetooth service as shown in this answer. You can disable it like this:

Driver not loading when connecting Magic Mouse 2

0xABAD created a fix that loads the driver when it detects the mouse. Here we’ll show an updated version that was changed a bit to use the idProduct of the device to identify any Magic Mouse 2.

To begin we need to build the driver and register it has a kernel module, please take a look at scripts/install.sh .

With that we’ll create a shell script that will load the driver. Let’s create a folder in /opt/ to place it into.

Let’s create a script named magic-mouse-2-add.sh (to create and edit it use something like sudo nano /opt/magic-mouse-fix/magic-mouse-2-add.sh ). This should be the its contents:

You can also adjust the scroll_speed to a value of your liking (somewhere between 0 to 63). If you wish to disable scroll acceleration or middle clicking with 3 fingers then set those values to zero. Give the script permission to run with sudo chmod +x /opt/magic-mouse-fix/magic-mouse-2-add.sh . When this script is run it will unload the default Magic Mouse driver and then load the new one built eariler.

We now need to create a udev rule that runs the script and loads the driver when the Mouse connects. In /etc/udev/rules.d directory create a 10-magicmouse.rules file and add the following:

The 10- prefix was picked arbitrarily and could be any number as it is used to determine the lexical ordering of rules in the kernel. The earlier the file is loaded guarantees that the rule will be applied before any others.

Now we need to reload the udev database with:

With that in place the Magic Mouse 2 will now be properly loaded with scrolling when connected via Bluetooth. Note that isn’t perfect and bugs may be around.

Источник

Оцените статью