# The Ubuntu Forum Community > Ubuntu Specialised Support > Apple Hardware Users > [ubuntu] MAC Magic Mouse on Ubuntu 9.10

## schmidberger@gmx.at

Hi,

I have a MacBookPro (5.3) and installed Ubuntu 9.10 on it. Most works great, nearly all out of the box. Only the new MAC Magic Mouse works not correctly.

Bluetooth detects the mouse and assigns it as 'Apple Wireless Mouse'

There I have the following problems:

* No support for the multi-touch face
* bumpy moving cursor.

Any solutions? Any third-party support?

Thanks

----------


## madu

Hello,

I also couldn't get the magic mouse to work.
Right & left buttons and thats it. No touch scroll or anything.
Tried with BTNX and it also didn't detect any. Went back to using my old mouse. The middle click is still more useful than what the Magic mouse can offer IMO.

----------


## linuxopjemac

> I just got it to work on my ancient PowerBook G4, much to my surprise.


You mean the Magic Mouse under Linux on your PB G4? If so, can you please tell us what you did ?

----------


## schmidberger@gmx.at

please provide more information how the Magic Mouse (including multi-touch) works at the G4

----------


## Jay2Cee

Yes, I'm interested in this, too. My experience with the Magic Mouse was, that it can be connected as bluetooth HID device and that moving and the left and right clock works out of the box. But I found no way to get multitouch or even scrolling to work.

----------


## davim

check this out -> http://github.com/entrope/linux-magicmouse

----------


## Jay2Cee

Compilation and loading the module with a patched kernel works fine. I will test the functionality with a Magic Mouse of a friend on friday.

----------


## davim

I've created a bug report on launchpad to see if this gets included in next ubuntu relese:

https://bugs.launchpad.net/ubuntu/+s...ux/+bug/512773

----------


## Jay2Cee

The kernel module works and enables scrolling and middle clock for the magic mouse. But scrolling is not very smooth, yet.

----------


## mmans

Hi!

I'm playing with the entrope-magic-mouse driver with ubuntu 9.10.
First I compiled a new kernel with all of the 3 patches. The new hid-module was
compiled into the kernel and my magic mouse learned to scroll in ubuntu  :Razz: 

Now I compiled a new kernel with only the first 2 patches. After starting the new kernel
I compiled the module. After that I copied the hid-magicmouse.ko file into /lib/modules/2.6.33-rc6. 
Then I ran depmod -a.

lsmod is showing this:
Module                  Size  Used by
hid_magicmouse          5719  0 
hidp                   14296  1 
binfmt_misc             7486  1 
--snip--

But I cannot get the system to use the module... How can I tell ubuntu to use the hid_magicmouse module?

Thanks for any help!

----------


## jisaac

Hi amd-64!

I did not get any error and I've inserted the module as well but no way the surface does not work.

Any idea?

----------


## amd-64

jisaac, you must be very close now.  

Check in  mouse preferences > touchpad> two finger scrolling is enabled
Find out what other modules may be interfering. There is a list of my modules from 'lsmod' below. Check that you have all the hid and apple specific modules. Check for any messages in /var/log related to hid_magicmouse. What else? 

Module                  Size  Used by
ahci                   37646  4 
applesmc               29217  0 
bcm5974                 8453  0 
binfmt_misc             7960  1 
bitblit                 5811  1 fbcon
bluetooth              58621  10 hidp,rfcomm,sco,bnep,l2cap,btusb
bnep                   11820  2 
bridge                 53152  0 
btusb                  12969  4 
fbcon                  39270  71 
font                    8053  1 fbcon
forcedeth              55592  0 
hid                    81789  4 hid_magicmouse,hidp,hid_apple,usbhid
hid_apple               5309  0 
hid_magicmouse          6035  0 
hidp                   14295  1 
i2c_nforce2             6099  0 
ieee1394               94675  1 ohci1394
input_polldev           3106  1 applesmc
joydev                 11072  0 
l2cap                  34774  23 hidp,rfcomm,bnep
led_class               3732  1 applesmc
lib80211                6119  2 lib80211_crypt_tkip,wl
lib80211_crypt_tkip     8676  0 
lp                      9336  0 
nvidia              10799466  44 
nvidia_bl               7632  0 
ohci1394               30260  0 
parport                37160  2 ppdev,lp
ppdev                   6375  0 
rfcomm                 40329  8 
sco                     9617  2 
snd                    70978  18 snd_hda_codec_cirrus,snd_hda_intel,snd_hda_codec,s  nd_hwdep,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_seq  _oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
snd_hda_codec          85727  2 snd_hda_codec_cirrus,snd_hda_intel
snd_hda_codec_cirrus    11825  1 
snd_hda_intel          25645  3 
snd_hwdep               6924  1 snd_hda_codec
snd_mixer_oss          16299  1 snd_pcm_oss
snd_page_alloc          8500  2 snd_hda_intel,snd_pcm
snd_pcm                87850  3 snd_hda_intel,snd_hda_codec,snd_pcm_oss
snd_pcm_oss            41394  0 
snd_rawmidi            23388  1 snd_seq_midi
snd_seq                57417  6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_mid  i_event
snd_seq_device          6824  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi  ,snd_seq
snd_seq_dummy           1782  0 
snd_seq_midi            5829  0 
snd_seq_midi_event      7267  2 snd_seq_oss,snd_seq_midi
snd_seq_oss            31219  0 
snd_timer              23553  2 snd_pcm,snd_seq
softcursor              1565  1 bitblit
soundcore               8052  1 snd
stp                     2171  1 bridge
tileblit                2487  1 fbcon
usb_storage            49833  0 
usbhid                 40352  0 
uvcvideo               62403  0 
v4l1_compat            15495  2 uvcvideo,videodev
v4l2_compat_ioctl32    12020  1 videodev
vga16fb                12757  1 
vgastate                9857  1 vga16fb
videodev               40486  1 uvcvideo
wl                   1964968  0

----------


## jisaac

I have not touchpad tab in my gnome-mouse-properties!?

Could it be the problem?

After inserting hid_magicmouse it seems that others are missing... I've inserted them successfully but nothing (only right and left click).

In the other hand my bluetooth preferences show "No Bluetooh adapters present"...

I did not find any error related to hid_magicmouse in /var/log...

I've attached my lsmod output.

PS: amd-64, I appreciate your help, thanks.

----------


## amd-64

I am not sure what package is missing, so here are the ones I have, one of them provides the touchpad tab, I hope

tpconfig
kcm-touchpad
xserver-xorg-input-synaptics
gsynaptics
bcm5974-dkms



Have you used BT on MACOSX, in other words, can you confirm you have BT and that it is enabled. The adapter should be present and visible. Install blueman-applet and see if it can connect.

----------


## jisaac

I have to make more tests (with blueman) but I think my Bluetooth is not detected on Ubuntu 10.04.

Let you know soon...

PS: It is unabled and working perfectly on OSX.

----------


## jisaac

No way, no bluetooth neither with blueman and bluez  :Sad: 

I've opened 2 new threads:
- http://ubuntuforums.org/showthread.php?t=1471483
- http://ubuntuforums.org/showthread.php?t=1471519

----------


## amd-64

If you don't have BT in 10.04 why you think there is a magic mouse issue to deal with. You have the module loading fine, so it is a matter of getting BT recognized on the imac, nothing else.

To start diagnosing. 

sudo grep -R bluetooth /var/log

and look for any error messages in the output

----------


## jisaac

> If you don't have BT in 10.04 why you think there is a magic mouse issue to deal with. You have the module loading fine, so it is a matter of getting BT recognized on the imac, nothing else.


I did it because, someone else could test it from a clean install of 10.04 and give us his feedback easier if looking for any Magic Mouse issue on an iMac 27" i7 or similar (I've used a more appropriate name for the title).

Here is the output of "sudo grep -R -i bluetooth /var/log | grep -i error":



> /var/log/debug:May  3 21:55:04 mac01 bluetoothd[2015]: HFP AG features: "Ability to reject a call" "Enhanced call status" "Extended Error Result Codes" 
> /var/log/debug:May  3 21:55:47 mac01 bluetoothd[2031]: HFP AG features: "Ability to reject a call" "Enhanced call status" "Extended Error Result Codes" 
> /var/log/debug:May  3 21:57:01 mac01 bluetoothd[2047]: HFP AG features: "Ability to reject a call" "Enhanced call status" "Extended Error Result Codes" 
> /var/log/daemon.log:May  3 21:55:04 mac01 bluetoothd[2015]: HFP AG features: "Ability to reject a call" "Enhanced call status" "Extended Error Result Codes" 
> /var/log/daemon.log:May  3 21:55:47 mac01 bluetoothd[2031]: HFP AG features: "Ability to reject a call" "Enhanced call status" "Extended Error Result Codes" 
> /var/log/daemon.log:May  3 21:57:01 mac01 bluetoothd[2047]: HFP AG features: "Ability to reject a call" "Enhanced call status" "Extended Error Result Codes"


Here is the ouput of "dmesg | grep -i bluetooth":



> [   19.010149] Bluetooth: Core ver 2.15
> [   19.010292] Bluetooth: HCI device and connection manager initialized
> [   19.010294] Bluetooth: HCI socket layer initialized
> [   19.014658] Bluetooth: L2CAP ver 2.14
> [   19.014659] Bluetooth: L2CAP socket layer initialized
> [   19.018188] Bluetooth: RFCOMM TTY layer initialized
> [   19.018191] Bluetooth: RFCOMM socket layer initialized
> [   19.018192] Bluetooth: RFCOMM ver 1.11


I've attached:
- "bluetooth_setting_OSX.txt": My OSX bluetooth settings.
- "bluetooth_status_OSX.txt": My OSX bluetooth status.
- "grep_bluetooth_varlog.txt.tar.gz": The output of "sudo grep -R -i bluetooth /var/log".
- "grep_magicmouse_varlog.txt": The ouput of "sudo grep -R -i magicmouse /var/log".

----------


## schmidberger@gmx.at

On Ubuntu 9.10 with the patched kernel the Magic Mouse was working very well.

Now I upgraded to 10.04.
BT and Magic Mouse is working, but not the touchpad on the Magic Mouse.

So I installed 'magicmouse-kernel-source', rebootet and loaded the module. Now the touchpad at the mouse is working but the mouse pointer is jumping around the screen.

The same with 'multitouch-kernel-source'. Any ideas?

Thanks
Markus

----------


## Chrissss

Thanks to the ppa :Mad: org-edgers/multitouch PPA it's quite easy to get the Magic Mouse up and running in Lucid. This...

 * Left click
 * Middle click
 * Right click
 * Vertical scrolling

...works for me. I can't get...

 * Horizontal scrolling (even though i activated it inside the gnome settings)
 * Twi finger swipe and every other "fancy" functions
 * Adjust the scrolling speed (it's quite slow)

...to work. I guess you guys have the same issues?

Thanks
Christoph

----------


## amd-64

> On Ubuntu 9.10 with the patched kernel the Magic Mouse was working very well.
> 
> Now I upgraded to 10.04.
> BT and Magic Mouse is working, but not the touchpad on the Magic Mouse.
> 
> So I installed 'magicmouse-kernel-source', rebootet and loaded the module. Now the touchpad at the mouse is working but the mouse pointer is jumping around the screen.
> 
> The same with 'multitouch-kernel-source'. Any ideas?


It was working well for me until I updated two days ago. Now i can  report the same as schmidberger, the pointer is too jumpy/jittery making it almost impossible to use, but  the multitouch functionality works fine.

----------


## albertoi

I had the same problem. "magicmouse-kernel-source" is not longer update. I installed "multitouch-kernel-source" and now works fine.

Run the following to install:

$ sudo add-apt-repository ppa:chasedouglas/multitouch
$ sudo apt-get update
$ sudo apt-get install multitouch-kernel-source

More info: https://launchpad.net/~chasedouglas/+archive/multitouch

Sorry for my english, I'm spanish.  :Wink:

----------


## Chrissss

Hmmm... Yesterday i was able to work with the Magic Mouse. Today I can't. The cursor is stuck to the upper left corner of the screen. It doesn't move when i move the mouse. Only when i touch the surface of the mouse. It looks like that i'm able to move the cursor by touching the surface. But the movement is very jittery.

@albertoi
So I installed multitouch-kernel-source out of the Multitouch-PPA. By installing the multitouch-kernel-source package the magicmouse-kernel-source has been removed. But I still have the same problem...



```
$lsmod | grep hid
hid_magicmouse          6035  0 
hidp                   14295  1 
l2cap                  34774  21 hidp,rfcomm,bnep
hid_apple               5309  0 
usbhid                 40352  0 
bluetooth              58621  10 hidp,rfcomm,sco,bnep,l2cap,btusb
hid                    81789  4 hid_magicmouse,hidp,hid_apple,usbhid

$ dpkg -l *multitouch* | grep ii
ii  multitouch-kernel-source               1.2                                             Experimental multitouch device driver source
ii  multitouchd                            1.0-0ubuntu1                                    tools for multitouch devices
```

What kernel module is running in your system?

----------


## albertoi

```
$ lsmod | grep hid
hid_magicmouse          6035  0 
hidp                   14295  1 
hid                    81789  2 hid_magicmouse,hidp
l2cap                  34774  21 hidp,rfcomm,bnep
bluetooth              58621  10 hidp,rfcomm,sco,bnep,l2cap,btusb

$ dpkg -l *multitouch* | grep ii
ii  multitouch-kernel-source              1.2                                             Experimental multitouch device driver source
```

I just uninstall "multitouchd", "magicmouse-kernel-source" and install "multi-kernel-source".

I've lucid lynx with the lastest kernel 2.6.32-22-generic

----------


## togsfx

> It was working well for me until I updated two days ago. Now i can  report the same as schmidberger, the pointer is too jumpy/jittery making it almost impossible to use, but  the multitouch functionality works fine.


I have the exact same problem. Are there any workarounds for this problem yet?

----------


## albertoi

> I have the exact same problem. Are there any workarounds for this problem yet?


Run the following to install:

$ sudo add-apt-repository ppa:chasedouglas/multitouch
$ sudo apt-get update
$ sudo apt-get install multitouch-kernel-source

More info: https://launchpad.net/~chasedouglas/+archive/multitouch

Sorry for my english, I'm spanish.

----------


## amd-64

> Run the following to install:
> 
> $ sudo add-apt-repository ppa:chasedouglas/multitouch
> $ sudo apt-get update
> $ sudo apt-get install multitouch-kernel-source
> 
> More info: https://launchpad.net/~chasedouglas/+archive/multitouch
> 
> Sorry for my english, I'm spanish.


This did not work for me. Magic mouse is still jumpy across the screen but the multitouch works fine. Does this has to do with X11 settings? I have no xorg.conf. 

BTW, another BT mouse (Logitech) works fine.

----------


## togsfx

> Run the following to install:
> 
> $ sudo add-apt-repository ppa:chasedouglas/multitouch
> $ sudo apt-get update
> $ sudo apt-get install multitouch-kernel-source
> 
> More info: https://launchpad.net/~chasedouglas/+archive/multitouch
> 
> Sorry for my english, I'm spanish.


Thank you Albertoi. Unfortunately this does not work for me either.. Looking forward to new ideas on this issue.

----------


## Chrissss

I reported the issue to https://bugzilla.kernel.org/show_bug.cgi?id=15928 and wrote on linux-input@vger.kernel.org about it. Unfortunately I didn't get an answer yet.

----------


## togsfx

And I reported a bug on launchpad.net:
https://bugs.launchpad.net/ubuntu/+s...ux/+bug/578520

----------


## davim

I'm having the same problem, it seams like the multitouch surface of the mouse is beeing interperted as a trackpad...

----------


## Chrissss

There was a update for multitouch-kernel-source today... But according to the changelog...



```
multitouch (1.4) lucid; urgency=low

  * Some hid drivers were skipped, added them in
  * Bump module versions for HID drivers so dkms installation succeeds
```

...nothing changed about the magic mouse.

----------


## davim

Just updated and I'm still gettin the same issues  :Sad:

----------


## davim

no news on this?

----------


## Chrissss

According to the changelog they worked on the magic mouse part...



```
 multitouch (1.5) lucid; urgency=low
 .
   * Fix eGalax Touchcontroller event report definitions
   * Fix Magic Mouse initialization when HIDRAW is not available
```

...but it's not a fix to the problem.

----------


## Dorisking3

My Magic mouse works well generally before I installed the VMware Fusion on my Macbook Pro. It now often cracks and seems a little bit harder to connect with my Macbook via BT. :Mad:

----------


## davim

I've updated my packages but it still doesn't work  :Sad:

----------


## tuping

Hello folks,

I have installed the multitouch-kernel package and it worke well for me until today.
Yesterday I have used the magic mouse normally, but today it isn't working well and the mouse seems to be recognized as a "touchpad" and I can move the cursor by touching the surface only. Yesterday everything was right, the mouse worke properly and the multitouch surface worked like the "mouse wheel".

Yesterday, the following lines din't appear on my syslog file:



```
May 26 06:32:04 e4300 kernel: [   68.209883] Bluetooth: HIDP (Human Interface Emulation) ver 1.2~multitouch
May 26 06:37:25 e4300 kernel: [   32.909262] Bluetooth: HIDP (Human Interface Emulation) ver 1.2~multitouch
May 26 07:01:53 e4300 kernel: [  113.913025] Bluetooth: HIDP (Human Interface Emulation) ver 1.2~multitouch
May 26 07:12:06 e4300 kernel: [   28.199420] Bluetooth: HIDP (Human Interface Emulation) ver 1.2~multitouch
May 26 07:22:02 e4300 kernel: [  143.699573] Bluetooth: HIDP (Human Interface Emulation) ver 1.2~multitouch
```

And below are the lines that I think are related to magicmouse (yesterday and today):



```
May 25 09:47:04 e4300 bluetoothd[1272]: link_key_request (sba=00:24:2B:F9:59:A3, dba=D8:30:62:42:32:67)
May 25 09:47:04 e4300 kernel: [11949.342555] magicmouse 0005:05AC:030D.0006: hidraw3: BLUETOOTH HID v0.84 Mouse [Apple Wireless Mouse] on 00:24:2B:F9:59:A3
May 25 09:47:04 e4300 kernel: [11949.342810] input: Apple Wireless Mouse as /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.3/3-1.3:1.0/bluetooth/hci0/hci0:12/input21
May 25 11:38:11 e4300 bluetoothd[1272]: link_key_request (sba=00:24:2B:F9:59:A3, dba=D8:30:62:42:32:67)
May 25 11:38:12 e4300 kernel: [18617.157448] magicmouse 0005:05AC:030D.0007: hidraw3: BLUETOOTH HID v0.84 Mouse [Apple Wireless Mouse] on 00:24:2B:F9:59:A3
May 25 11:38:12 e4300 kernel: [18617.157585] input: Apple Wireless Mouse as /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.3/3-1.3:1.0/bluetooth/hci0/hci0:12/input22
May 26 06:32:04 e4300 kernel: [   68.209883] Bluetooth: HIDP (Human Interface Emulation) ver 1.2~multitouch
May 26 06:32:36 e4300 bluetoothd[1221]: link_key_request (sba=00:24:2B:F9:59:A3, dba=D8:30:62:42:32:67)
May 26 06:32:36 e4300 kernel: [  100.347185] magicmouse 0005:05AC:030D.0005: hidraw3: BLUETOOTH HID v0.84 Mouse [Apple Wireless Mouse] on 00:24:2B:F9:59:A3
May 26 06:32:36 e4300 kernel: [  100.348147] input: Apple Wireless Mouse as /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.3/3-1.3:1.0/bluetooth/hci0/hci0:12/input20
May 26 06:33:07 e4300 AptDaemon: INFO: Initializing daemon
May 26 06:33:15 e4300 bluetoothd[1221]: link_key_request (sba=00:24:2B:F9:59:A3, dba=D8:30:62:42:32:67)
May 26 06:33:15 e4300 kernel: [  139.629687] magicmouse 0005:05AC:030D.0006: hidraw3: BLUETOOTH HID v0.84 Mouse [Apple Wireless Mouse] on 00:24:2B:F9:59:A3
May 26 06:33:15 e4300 kernel: [  139.630706] input: Apple Wireless Mouse as /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.3/3-1.3:1.0/bluetooth/hci0/hci0:12/input21
May 26 06:34:08 e4300 bluetoothd[1221]: link_key_request (sba=00:24:2B:F9:59:A3, dba=D8:30:62:42:32:67)
May 26 06:34:08 e4300 kernel: [  192.593161] magicmouse 0005:05AC:030D.0007: hidraw3: BLUETOOTH HID v0.84 Mouse [Apple Wireless Mouse] on 00:24:2B:F9:59:A3
May 26 06:34:08 e4300 kernel: [  192.593294] input: Apple Wireless Mouse as /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.3/3-1.3:1.0/bluetooth/hci0/hci0:12/input22
May 26 06:37:25 e4300 kernel: [   32.909262] Bluetooth: HIDP (Human Interface Emulation) ver 1.2~multitouch
May 26 06:37:42 e4300 bluetoothd[1213]: link_key_request (sba=00:24:2B:F9:59:A3, dba=D8:30:62:42:32:67)
May 26 06:37:42 e4300 kernel: [   49.490026] magicmouse 0005:05AC:030D.0005: hidraw3: BLUETOOTH HID v0.84 Mouse [Apple Wireless Mouse] on 00:24:2B:F9:59:A3
May 26 06:37:42 e4300 kernel: [   49.490080] input: Apple Wireless Mouse as /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.3/3-1.3:1.0/bluetooth/hci0/hci0:11/input20
May 26 06:37:54 e4300 kernel: [   61.832127] magicmouse 0005:05AC:030D.0006: hidraw3: BLUETOOTH HID v0.84 Mouse [Apple Wireless Mouse] on 00:24:2B:F9:59:A3
May 26 06:37:54 e4300 kernel: [   61.832179] input: Apple Wireless Mouse as /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.3/3-1.3:1.0/bluetooth/hci0/hci0:11/input21
```

I don't know if it helps, but it seems that yesterday (when the line Bluetooth: HIDP (Human Interface Emulation) ver 1.2~multitouch doesn't appear on my syslog) the mouse worked well. Today, it isn't working.

I'm not an expert on hardware issues but maybe this information can help someone to figure out a solution.

Regards,
Rodrigo.

----------


## davim

@Tuping you should add this information to this bug report:

https://bugs.launchpad.net/ubuntu/+s...ux/+bug/578520

thanks!

----------


## drelig

I was using the Magic Mouse and Apple wireless keyboard nicely with the older 2.6.32-21 kernel, but some weeks ago the new 22 kernel prevented both of these devices to pair with the computer at all. For those who don't know yet, you can boot to older kernel by pressing shift key during boot to show the grub menu (assuming you installed your system before the kernel update). 

According to Synaptic the current version of multitouch-kernel-source was 1.2 and for some reason the Update Manager wasn't able to update it. I typed the installation commands from the page https://launchpad.net/~chasedouglas/+archive/multitouch again and rebooted to the new 22 kernel. Now the devices are working again and Synaptic reports version 1.5 for multitouch-kernel-source. I don't have the Apple computer, but hopefully this helps others struggling with latest updates.

----------


## jorgecachoh

I all,

Yesterday I installed multitouch:



```
$ sudo add-apt-repository ppa:chasedouglas/multitouch
$ sudo apt-get update
$ sudo apt-get install multitouch-kernel-source
```

I was able to work perfectly with mouse and with scrolling. But after 2-3 reboots the mouse began to be very jumpy/jittery making it impossible to use so I have uninstalled  multitouch-kernel-source.

Is there any update on this so scrolling works on Magic Mouse?

----------


## Twiggy794

I experienced the crazy mouse jumpiness when using the xorg-edgers repository, namely the xserver-xorg-input-evdev package.  Removing that gets me usable behavior out of my magic mouse, albeit with slow scroll speeds.

----------


## tuping

Just to confirm: uninstalling and then reisntalling xserver-xorg-input-evdev did work for me.

I have made an sudo remove xserver-xorg-input-evdev, then rebooted. Ubuntu didn't show up the login screen because when you do a remove of this package it also remove xserver-xorg-core...

So I have to enter in "recovery mode" and make a sudo apt-get install xserver-xorg-core and voillà, my magic mouse is working again.

Thanks for the help, Twiggy794.

----------


## Twiggy794

So are there any projects out their actively working on the true multitouch features of the device?  I'd love to get two-finger scrolling working, and optimally get my 3-finger and 2-finger swipe bindings setup that I use in OSX.  I definitely would be interested in doing some of the hacking myself, but it's not something I'm familiar enough with to get started on my own.

----------


## schmidberger@gmx.at

This is not working at my system. I only removed the 'xserver-xorg-input-evdev' package (sudo dpkg --force-depends --remove xserver-xorg-input-evdev). After reboot my keyboard was not working any more in the xorg. So I reinstalled the package in the recovery mode. Now everything is woking fine, but not the Magic Mouse.

Probably it depends on another package you removed?

Best
Markus

----------


## Twiggy794

> This is not working at my system. I only removed the 'xserver-xorg-input-evdev' package (sudo dpkg --force-depends --remove xserver-xorg-input-evdev). After reboot my keyboard was not working any more in the xorg. So I reinstalled the package in the recovery mode. Now everything is woking fine, but not the Magic Mouse.
> 
> Probably it depends on another package you removed?
> 
> Best
> Markus


When I removed xserver-xorg-input-evdev I had to replace a ton of packages.  A quick fix might be to remove the xedgers repo and reinstall the multitouch packages, or try this:



```
$ sudo apt-get install xserver-xorg-video-all
$ sudo apt-get install xserver-xorg-input-all
```

I'm recalling this from memory so the package names might not be entirely correct, but I would assume you just inadvertently removed a necessary package for the Magic Mouse when you removed evdev.

----------


## davim

Just try installing the ubuntu-desktop package.

----------


## Twiggy794

There were two updates on xorg-edgers in the last week or so.  Has anybody tried them?  Giving them a go now.

Edit: Nevermind, they were for Maverick.

----------


## inflintor

> So are there any projects out their actively working on the true multitouch features of the device?  I'd love to get two-finger scrolling working, and optimally get my 3-finger and 2-finger swipe bindings setup that I use in OSX.  I definitely would be interested in doing some of the hacking myself, but it's not something I'm familiar enough with to get started on my own.


What is two-finger scrolling with magic mouse?

I have made some preliminary testing for getting inertia scrolling and swipe gestures, but I don't have anything useful yet. As always, lack of time makes sure this is going forward really slowly. I have made my changes by modifying the kernel module which makes things little bit complicated, but I have no idea how to get the data in user space.

Of course it would be nice to get the pixel scrolling also, but there is lot of problems to get it working without breaking the traditional line scrolling.

----------


## Twiggy794

> What is two-finger scrolling with magic mouse?
> 
> I have made some preliminary testing for getting inertia scrolling and swipe gestures, but I don't have anything useful yet. As always, lack of time makes sure this is going forward really slowly. I have made my changes by modifying the kernel module which makes things little bit complicated, but I have no idea how to get the data in user space.
> 
> Of course it would be nice to get the pixel scrolling also, but there is lot of problems to get it working without breaking the traditional line scrolling.


How were you going about doing this?  I know nothing about building an Xorg driver.

As for two-finger scrolling, this would effectively mean that A) the entire surface of the mouse is scrollable and B) it treats two fingers like one, so mouse acceleration isn't doubled as a result of the second finger.

I spent a little time today chatting with Chase Douglas on his build system for his multitouch kernel repo and have forked it on Github.  I have a patch merged into my master branch that I found here (github.com).  I've been using this patch for a few weeks and while the acceleration needs tweaking, it works well.  It will allow you to use the entire surface of the mouse for scrolling, as well as enable horizontal scrolling.  An amd64 package is attached below.

If you're feeling REALLY hardcore, I have backported Chase Douglas' commits to the Maverick kernel source tree.  I'll tell you now, these don't work.  They crash my machine after the desktop loads (and presumably the bluetooth service initializes).   I'll be looking into the bugs later this week hopefully, but any assistance would be more than welcome.

Here's the link to my repo: http://github.com/scottferg/multitouch
And here's another link to the amd64 package: http://github.com/downloads/scottfer...ce_1.5_all.deb

----------


## inflintor

Is your master branch compatible with Lucid Lynx and what commands I should use to build and install module from your repo?

For my own testing I did something like this to get modifications build: 

add multitouch repo and install multitouch-kernel-source packagecopy /usr/src/multitouch-1.5 to /usr/src/custom-multitouch-1.5modify /usr/src/custom-multitouch-1.5/dkms.conf with the new namemodify /usr/src/custom-multitouch-1.5/drivers/hid/hid-magicmouse.cdkms add -m custom-multitouch -v 1.5dkms build -m custom-multitouch -v 1.5
To install them temporarily (boot will revert to old module)

rmmod hid-magicmouse (your mouse stops working)insmod /var/lib/dkms/custom-multitouch/1.5/KERNEL/VERSION/module/hid-magicmouse.ko
To install permanently

dkms remove -m multitouch -v 1.5 --all (your mouse stops  working)dkms install -m custom-multitouch -v 1.5
To get further modifications build:

dkms remove -m custom-multitouch -v 1.5 --alldkms add -m custom-mutltiouch -v 1.5dkms build -m custom-mutltiouch -v 1.5rmmod hid-magicmouse (mouse stops working)
 There is probably easier way and I would be happy to hear about it. Currently I'm testing with the kernel timers to get the module send inertial scroll events.

----------


## Twiggy794

> Is your master branch compatible with Lucid Lynx and what commands I should use to build and install module from your repo?
> 
> For my own testing I did something like this to get modifications build: 
> 
> add multitouch repo and install multitouch-kernel-source packagecopy /usr/src/multitouch-1.5 to /usr/src/custom-multitouch-1.5modify /usr/src/custom-magicmouse-1.5/dkms.conf with the new namemodify /usr/src/custom-magicmouse-1.5/drivers/hid/hid-magicmouse.cdkms add -m custom-mutltiouch -v 1.5dkms build -m custom-mutltiouch -v 1.5
> To install them temporarily (boot will revert to old module)
> 
> dkms remove -m multitouch -v 1.5 --all (your mouse stops working)insmod /var/lib/dkms/custom-multitouch/1.5/KERNEL/VERSION/module/hid-magicmouse.ko
> To install permanently
> ...


Just cd into the directory and:


```
$ dpkg-buildpackage -rfakeroot -b
```

Also, I have merged in the latest Maverick patches, so my master branch is now a backport of the Maverick upstream.

----------


## inflintor

> Just cd into the directory and:
> 
> 
> ```
> $ dpkg-buildpackage -rfakeroot -b
> ```
> 
> Also, I have merged in the latest Maverick patches, so my master branch is now a backport of the Maverick upstream.


Thanks, I was able to build a package and install it. However, for testing new modifications to the kernel module it would nice to try the new module without loading it automatically in boot. I have used to do that by installing the *.ko file with insmod command, but I wasn't able to do the same with this installation process. 

If the boot reverts to old modules it's easy to continue development after a restart if some mistake freezes the computer. But if the problematic module is already installed I have to boot the computer with live-cd and remove the module manually to be able to get the machine running again. Naturally I wouldn't like to do this after every mistake I make, because I do make lot of them.

----------


## inflintor

Here is the first and very early version of inertial scrolling. I took the Twiggy794's master branch and made little changes on top of that. It's not very reliable in starting and stopping the movement and also it's done now only for vertical axis. It's working in my setup, but be prepared to fix your computer and have backups if you are going to try it, because I don't have much experience in kernel module development.

To install:

Download attached zip file and extract it to /usr/srcdkms add -m scottferg-multitouch -v 0.1dkms build -m scottferg-multitouch -v 0.1rmmod hid-magicmouse (your mouse stops working)insmod  /var/lib/dkms/scottferg-multitouch/0.1/KERNEL/VERSION/module/hid-magicmouse.ko
This installs the module only temporarily and restart should fix things if anything goes wrong. 

The slow end of the movement is really jerky with current line scrolling events. It would be great if someone has knowledge or is able to learn little bit about Firefox plugins. Basically we need plugin that listens to two specific keyboard keys and scrolls one pixel up or down when those events occur. That way we could make the magicmouse send both line scrolling events like now and pixel scrolling events trough that specific key event. Of course the normal scrolling has to be disabled in Firefox to avoid double scrolling, but I think this can be done through the about**:config page.

----------


## inflintor

Actually the scroll event has to be mouse button instead of keyboard key to be able to scroll unfocused windows also. I don't know if it is possible to generate and listen events of mouse buttons that don't really exist, but this would be quite straightforward way.

----------


## Twiggy794

This is awesome.  Do you want to fork it on github so we can track changes more easily?  It would make collaboration a bit easier.

I think the ideal solution here though is to have this occur in userspace with an Xorg driver.  This way individual applications wouldn't need to do anything, and we could also customize to the level of BetterTouchTool and enable fancy swipe gestures.

----------


## inflintor

Yeh, I should put this to github, it's just one more thing to learn. I had a look to Mozilla api and it looked like there isn't support for additional mouse buttons, but scrolling is trivial.

Actually the xorg driver starts to be quite interesting. Maybe the two-finger scrolling or some other touchpad functionalities are implemented that way and we could use those as a starting point.

----------


## Twiggy794

> Yeh, I should put this to github, it's just one more thing to learn. I had a look to Mozilla api and it looked like there isn't support for additional mouse buttons, but scrolling is trivial.
> 
> Actually the xorg driver starts to be quite interesting. Maybe the two-finger scrolling or some other touchpad functionalities are implemented that way and we could use those as a starting point.


Paging back in this thread I see some vague mentions of the Synaptics driver that some users also apparently have active.  I'm using my Magic Mouse on my desktop, so I don't have any synaptics hardware, but yeah, an Xorg driver would be ideal past the existing functionality.

----------


## rlinsurf

Can someone tell me how the update to 10.0.4, which actually removes Bluetooth support, affects all of this? I can't even get that going, much less my Mouse.

----------


## Twiggy794

> Can someone tell me how the update to 10.0.4, which actually removes Bluetooth support, affects all of this? I can't even get that going, much less my Mouse.


What update?  I'm using it just fine :/

----------


## rlinsurf

> What update?  I'm using it just fine :/


Ubuntu. As soon as I installed, I was alerted that there were a bunch of files, and an update, to 10.0.4. After I performed the update, I was informed that support had been removed for the following: and Bluetooth was one of those in the list. Sure enough, my magic mouse stopped working altogether, and the bluetooth menu had disappeared.

----------


## davim

could anyone create a PPA archive for this?

----------


## nilsja

Twiggy794, i don't know how to use github.




> Just cd into the directory and:
> Code:
> 
> $ dpkg-buildpackage -rfakeroot -b


 What directory? Do i first have to download each file? At download i only find an amd package...

----------


## Twiggy794

> Twiggy794, i don't know how to use github.
> 
>  What directory? Do i first have to download each file? At download i only find an amd package...


Try this:


```
$ sudo apt-get install git-core
$ git clone git://github.com/scottferg/multitouch.git
$ cd multitouch
$ dpkg-buildpackage -rfakeroot -b
```

You'll find the multitouch-kernel-source_1.5 package in the parent directory.

----------


## Twiggy794

Cross-posting this with another thread:

Hardcore hacks ahoy.  If you use my kernel driver and follow these instructions you can get PyMT up and running on Lucid.  PyMT requires an application to be running on the desktop, but continues to accept input whether or not the app has focus (or is minimized).  Because of this, I was able to hack together a rough implementation of multitouch gestures for the desktop.

Swiping left/right with two fingers will rotate the cube.  Swiping down with three fingers will call up Expose.  In order to use this you will need the Dbus, Scale, and Rotate Cube plugins enabled in Compiz.  I also had to be a little dirty and apply:


```
$ sudo chmod a+r /dev/input/event7
```

in order to run the app as the current user.  Without this, Dbus can't connect to the running session.

Here's the Python file: http://gist.github.com/546779

PyMT installation instructions for Lucid: http://pymt.eu/wiki/DevGuide/InstallPymtUbuntu
PyMT configuration instructions for Ubuntu: https://wiki.ubuntu.com/Multitouch/PyMT

----------


## davim

Cool  :Smile:  thanks Twiggy

----------


## sriram.venkataramani

> I had the same problem. "magicmouse-kernel-source" is not longer update. I installed "multitouch-kernel-source" and now works fine.
> 
> Run the following to install:
> 
> $ sudo add-apt-repository ppa:chasedouglas/multitouch
> $ sudo apt-get update
> $ sudo apt-get install multitouch-kernel-source
> 
> More info: https://launchpad.net/~chasedouglas/+archive/multitouch
> ...


Just wanted to let everyone know that I tried this and it worked perfectly. I had to go back to the mouse settings and adjust the mouse sensitivities but I have the following working:

1. Left Click: Used to work everywhere on the mouse before I did this, but now works only on the LHS.sentivity
2. Right Click: Works on the RHS. (I am a right handed user.)
3. Middle Click (?): Clicking anywhere else works as a middle click. How can I adjust the settings for the click?
4. Vertical Scroll: Increased mouse sensitivity and now works great.
4. Tab Scroll: Same way as Vertical scroll on tabs will rotate between tabs of any window.
5. Increase font: Ctrl + Mouse Vertical Scroll does the trick.

Thanks albertoi!

----------


## Jamie White

I know this is a little old now, but I can't seem to find a more relevant place.

My Magic Mouse worked perfectly out of the box, but I still don't get the forward/back gesture by swiping left or right. Any ideas?

I can survive without this until someone fixes the Magic Mouse completely. Whereas the Apple Wireless Keyboard is turning into a nightmare for me.

----------


## nutznboltz

> Than open "debian.master/rules.d/amd64.mk" and change
> 
> 
> ```
> flavours  = generic server
> ```
> 
> to
> 
> ...


Why don't people realize they can put "skipabi=true" and "skipmodule=true" in amd64.mk (and i386.mk) instead of on the command line?

I see this being done all over.

----------


## zolkin

Hi!

I'm probably too late here, but, occasionally, does anybody tried to install it for:


```
$ uname -r
2.6.32-38-generic
```

Also, after reading this long thread (probably I missed something) it isn't clear for me - *can I install drivers on such a new kernel?*
and also, Which recipe is better and preferable *#20 by Jay2Cee* or *#110 by amd-64*.

Help is greatly appreciated.

Some info:
My Magic mouse works fine except the Scrolling and multitouch.

P.S.Question

If method *#20 by Jay2Cee* is correct - how should I modify the following lines


```
git checkout Ubuntu-2.6.31-19.56

#AND#

getall amd64 generic server
getall i386 generic generic-pae 386
```

They are not clear for me... (I know - dumb (( )

----------

