Linux magic mouse driver

Apple Magic Mouse + Linux ?

Чего там с драйверами под новую эпловскую мышку ? Если я правильно понял, то без них не будет скроллинг работать — не кошерно.

Apple Magic Mouse + Linux ?

а нахрена этот зонд нужен в наших уютных линуксах?

Apple Magic Mouse + Linux ?

А ты представь, как удобно можно путешествовать между виртуальными мониторами. Во все стороны

Apple Magic Mouse + Linux ?

под веществами что ли? я за компьютером не путешествую, а работаю

Apple Magic Mouse + Linux ?

Genius Traveler 915BT — металлический верх, резина по бокам, с полпинка в моём линуксе работает, проблем с поддержкой мыши мне ещё не хватало. Я счастлив.

Apple Magic Mouse + Linux ?

> а нахрена этот зонд нужен в наших уютных линуксах?

Отучаемся говорить за всех (с)

Apple Magic Mouse + Linux ?

> Genius Traveler 915BT

Год назад брал пару штук. Не сложилось. Обе садились за сутки. Пока логитеками пользуюсь (450, 555, 470).

Все-таки хочется новую ябломышку. Прикалывает отсутствуие кнопок и колеса.

Apple Magic Mouse + Linux ?

> Прикалывает отсутствуие кнопок и колеса.

+1, тоже хочется. но, как я понял, оно пока только под маком работает.

Apple Magic Mouse + Linux ?

По неделе живёт, ЧЯДНТ?

Apple Magic Mouse + Linux ?

тоже интересно, а пока жду — 15 декабря придет, тогда посмотрю

Apple Magic Mouse + Linux ?

> По неделе живёт, ЧЯДНТ?

ХЗ. Может мне совсем не повезло. Все равно мало. Грамотные мышки на синезубе живут пару месяцев. Ну по крайней мере, мои логитековские.

В свое время очень возбудился на эту мышку. Конструктив клевый. Только вот, не срослось 🙁

Apple Magic Mouse + Linux ?

Отпишитесь обязательно. Буду ждать.

По свединиям ОБС — на венде работают клики 2 кнопками, а дальше без драйверов непонятно. Мне всякие многопальцевые осьминоговые жесты не особо нужны. Только скроллинг, как колесиком.

Излазал крупные линуксовые форумы — там пока нема отзывов.

Apple Magic Mouse + Linux ?

Возможно, но у меня аккумуляторам — 3 года.

Apple Magic Mouse + Linux ?

мыши у Apple традиционно образец дизайнерского «креатива» и неудобства

Apple Magic Mouse + Linux ?

> В свое время очень возбудился на эту мышку

Быть гомосеком уже не модно? На периферию возбуждаемся?

Apple Magic Mouse + Linux ?

Ну вам виднее, что модно. Я не в курсе.

Apple Magic Mouse + Linux ?

Раз мышь, то это скорее зоофилия.

Apple Magic Mouse + Linux ?

А если её сырыми руками брать, то не будет работать, как и обычный тачпад?

Судя по картинке, её держать неудобно, она настолько тонкая, что ухватиться не за что.

Вообще, Openoffice Mouse (кстати, я так и не понял, фейк ли это), судя по картинке, и удобнее, и функциональнее, чем сабж, за исключением того, что те кнопки, которые находятся сзади от классических «правой» и «левой», будут мешаться (опять же, если судить по картинке). Можно было бы ими пожертвовать, а классические кнопки сделать побольше. Ну и справа тоже джойстик могли бы сделать, чтобы и левшам можно было бы пользоваться, и правши, возможно, применение бы нашли.

Источник

Ubuntu Documentation

The Magic Mouse is a wireless mouse with a multi-touch surface that serves as mouse buttons and scroll wheel. It should work with Ubuntu 11.04 out of the box. To configure the mouse

  1. Open Bluetooth Preferences
  2. Switch on the Magic Mouse
  3. Click Set up new Device.
  4. The set up wizard will appear, click Forward
  5. Your computer will scan for new devices. Once your mouse is found select it and click Forward
  6. You will be asked for a pin to pair the mouse. Enter 0000 and then click OK.
  7. Click Finish

Ubuntu 10.04 and earlier

For Ubuntu 10.04 and 9.10 there is a driver for this device that is still under development, you can download it from the following address:

Читайте также:  Медленно выключается компьютер windows 10 при завершении работы

README

This code contains a Linux kernel driver for the magic mouse. Please see the INSTALL file for directions on how to use it with your kernel.

This code also contains three standalone programs:

hid-parse reads one or more input files (specified on the command line) that contain hexadecimal-formatted HID report descriptors, and prints out human-readable text forms of the descriptors. It should be considered fairly complete and stable.

mtalk talks to an Apple Magic Mouse (using L2CAP with the HID control and interrupt Protocol and Service Multiplexors [PSMs]) and prints human-readable forms of the messages that it receives. Typically the only command-line parameters you would pass are -r . It should be considered 85% complete.

usb-bt-dump reads a text dump in the format generated by Linux’s usbmon (e.g. /sys/kernel/debug/usb/usbmon/0u) to parse Bluetooth messages at various layers (HCI, L2CAP, etc) and print annotations with the parsed form. It is woefully incomplete and buggy and will probably not be maintained.

I wrote usb-bt-dump first, followed by mtalk, followed by hid-parse. mtalk is the only one that I expect to modify going forward.

INSTALLING THE MAGICMOUSE DRIVER

The Magic Mouse driver for linux is a module named hid-magicmouse.

Older kernels do not have all the hooks that a driver needs to talk to the Magic Mouse. These are provided in this directory; you must apply them and rebuild the kernel before you can load hid-magicmouse. To apply the patch series, change to your linux-2.6 directory, and run either:

OR (in a Bourne shell, such as /bin/sh):

This series were cherry-picked from the HID and Bluetooth trees onto v2.6.32.8. They should be filtering from the HID and Bluetooth trees into the mainstream kernel between v2.6.33 and v2.6.34. This directory’s hid-magicmouse.c should match the final result of applying the patches in sequence.

You will obviously need to reboot into the new kernel before the module can be loaded, but at that point user-space should see it as a normal input device, including a(n emulated) scroll wheel and middle button.

AppleMagicMouse (последним исправлял пользователь alex-moreati 2011-07-02 13:47:36)

The material on this wiki is available under a free license, see Copyright / License for details
You can contribute to this wiki, see Wiki Guide for details

Источник

Linux magic mouse driver

These are my notes for getting Apple’s Magic Mouse 2 with scrolling when connected to work with Linux. While I’m running Ubuntu 19.04 this should work with other distro’s at it only involves udev which is standard with any modern Linux kernel.

DISCLAIMER: While I’ve used Linux off an on over the years, I am by no means an expert. I managed to get the Magic Mouse 2 working for me it might not work for you, and I most likely will not be able to assist you. Finally, while these instructions merely add a configuration file and shell script to your system, I take no responsibility for any damage that may occur on yours. As with anything you find on the internet. USE AT YOUR OWN RISK.

UPDATE: RicardoEPRodrigues has created a one stop shop that builds and installs the driver, necessary udev rules, and load script with a single install script. While this repo remains here for informational purposes your best bet is to checkout his work and not fuss with all these details.

Apple’s Magic Mouse 1 works with Ubuntu out of the box (I tried with a co-worker’s), Magic Mouse 2 on the other hand does not work completely (no scrolling) as it speaks a different protocol. Thankfully, someone has written a working driver that you can get from here:

From those instructions, you don’t need DKMS nor do you need to run the install.sh script. Instead just build the kernel module:

Note that the repository will then have you unload the existing driver and load the one you just built which will cause your Magic Mouse 2 to work as intended. However, if you disconnect the mouse, reboot, reset bluetooth, etc. the driver will not be reloaded. I thought I would be clever and replace the existing driver on my system with this new one but everytime I reconnected the mouse the scrolling would not work and I would still have to manually reload the driver.

Читайте также:  Установить visual studio linux mint

The work-around listed here is definitely a kludge and uses udev to run a script when the Magic Mouse 2 is connected via bluetooth. I would recommend checking out this tutorial about udev rules along with reading the man pages. Note that the tutorial is a bit old in internet years and refers to tools udevinfo , udevtest , udevcontrol , and udevtrigger . These should be replaced with udevadm info , udevadm test , udevadm control , and udevadm trigger respectively. The udevadm command is pretty handy and you should definitely check out the man page for it.

The first thing to do is learn how to identify the Magic Mouse when it is connected. We can look at the output of tail -f

/.local/share/xorg/Xorg.0.log while connecting the Magic Mouse 2 via Bluetooth and look for lines similiar to these:

The important line here is the config/udev: Adding input device Magic Mouse 2 (/dev/input/event21) or more specifically the /dev/input/event21 part. This acutal location may differ on your system. With this piece of information you can lookup the mouse’s physical ID with udevadm info -a -p $(udevadm info -q path -n /dev/input/event21) . This will print out a lot of info but important part will look similiar to:

It’s the ATTRS==»d0:c6:37:e4:5f:fb» (your ID may differ) that will be used in a udev rule to identify the mouse inside a rule in the /etc/udev/rules.d directory. In that 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. Ensure that the ATTRS contains the correct ID found from earlier and ensure that the RUN+= portion contains an absolute path to a script on your system. Don’t use a relative path or

as the path is not interpreted by a shell and udev processes the path under root. With that place a shell script can be created at that location and should contain the following:

Replace the /home/user_name/path/to with the location of where you downloaded and built the Magic Mouse 2 driver. 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. When this script is run it will unload the default Magic Mouse driver and then load the new one built eariler.

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 sometimes the kernel will attempt to reload the driver several times every a few seconds. Also, your mouse may randomly disconnect at times but this was happening to me before applying this fix, may be related to a kernel battery power management issue, and something I am looking into.

About

Connect Apple’s Magic Mouse 2 with scrolling on Linux

Источник

Linux magic mouse driver

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.

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.

Источник

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