[Apple MacBookPro6,2] Magic mouse looses connection

Bug #1036401 reported by Wolf Rogner
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Medium
Unassigned

Bug Description

Since upgrading to kernel 3.2.0-29 the Apple magic mouse looses connection again.

Similar symptoms as #821902 and previous. There seems to be a regression bug in the kernel (as the bluetooth stack was not updated recently).

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: bluez 4.98-2ubuntu7
ProcVersionSignature: Ubuntu 3.2.0-29.46-generic 3.2.24
Uname: Linux 3.2.0-29-generic x86_64
NonfreeKernelModules: nvidia wl
ApportVersion: 2.0.1-0ubuntu12
Architecture: amd64
Date: Mon Aug 13 23:17:17 2012
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64+mac (20111012)
InterestingModules: rfcomm bnep btusb bluetooth
MachineType: Apple Inc. MacBookPro6,2
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-29-generic root=UUID=2b39cb95-fdbb-4e6c-80f4-d27c4394529c ro quiet splash vt.handoff=7
SourcePackage: bluez
UpgradeStatus: Upgraded to precise on 2012-04-29 (106 days ago)
dmi.bios.date: 07/26/10
dmi.bios.vendor: Apple Inc.
dmi.bios.version: MBP61.88Z.0057.B0C.1007261552
dmi.board.asset.tag: Base Board Asset Tag#
dmi.board.name: Mac-F22586C8
dmi.board.vendor: Apple Inc.
dmi.board.version: MacBookPro6,2
dmi.chassis.type: 10
dmi.chassis.vendor: Apple Inc.
dmi.chassis.version: Mac-F22586C8
dmi.modalias: dmi:bvnAppleInc.:bvrMBP61.88Z.0057.B0C.1007261552:bd07/26/10:svnAppleInc.:pnMacBookPro6,2:pvr1.0:rvnAppleInc.:rnMac-F22586C8:rvrMacBookPro6,2:cvnAppleInc.:ct10:cvrMac-F22586C8:
dmi.product.name: MacBookPro6,2
dmi.product.version: 1.0
dmi.sys.vendor: Apple Inc.
hciconfig:
 hci0: Type: BR/EDR Bus: USB
  BD Address: C8:BC:C8:F0:43:3B ACL MTU: 1021:8 SCO MTU: 64:1
  UP RUNNING PSCAN
  RX bytes:11159 acl:16 sco:0 events:391 errors:4
  TX bytes:3428 acl:19 sco:0 commands:215 errors:0

Revision history for this message
Wolf Rogner (war-rsb) wrote :
Revision history for this message
Wolf Rogner (war-rsb) wrote :

Tried to delete mouse and reestablish pairing. Did not work.

The mouse can be seen in the bluetooth system panel but not in the bluetooth menu

syslog shows

Aug 14 09:26:15 mbp kernel: [ 759.168429] Bluetooth: hci0 corrupted ACL packet
Aug 14 09:26:15 mbp kernel: [ 759.168449] Bluetooth: hci0 ACL packet for unknown connection handle 12
Aug 14 09:26:37 mbp kernel: [ 780.671929] Bluetooth: hci0 corrupted ACL packet
Aug 14 09:26:37 mbp kernel: [ 780.671958] Bluetooth: hci0 ACL packet for unknown connection handle 11
Aug 14 09:26:37 mbp kernel: [ 780.671964] Bluetooth: Frame is too long (len 8, expected len 5)
Aug 14 09:26:46 mbp kernel: [ 789.782097] Bluetooth: hci0 corrupted ACL packet
Aug 14 09:26:46 mbp kernel: [ 789.782119] Bluetooth: hci0 ACL packet for unknown connection handle 12

Wolf Rogner (war-rsb)
affects: bluez (Ubuntu) → linux (Ubuntu)
Revision history for this message
Wolf Rogner (war-rsb) wrote :

I have changed the package to linux. I looked up previous versions of this bug and they all were related to the kernel.

#814250, #838926 and #849802 resp.

Unfortunately I never get a description of the solution. However, I can remember that in that in #814259 Julian Wiedmann pointed out that an erroneous patch was the cause of this. Handling of the input of the magic mouse was done to accurate and this caused the mouse to stop working.

maybe this helps locating the issue

Brad Figg (brad-figg)
Changed in linux (Ubuntu):
status: New → Confirmed
Changed in linux (Ubuntu):
importance: Undecided → Medium
tags: added: regression-update
Changed in linux (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Wolf Rogner (war-rsb) wrote :

Just to be particular:

#837206 dealt with the same issue.

Revision history for this message
Wolf Rogner (war-rsb) wrote :

uname -a
Linux mbp 3.2.0-30-generic #48-Ubuntu SMP Fri Aug 24 16:52:48 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Mouse gets paired but still does not react.

Sep 5 12:53:04 mbp bluetoothd[821]: 7C:6D:62:F7:A5:68: error updating services: Connection timed out (110)
Sep 5 12:53:11 mbp kernel: [ 112.757296] Bluetooth: hci0 corrupted ACL packet
Sep 5 12:53:11 mbp kernel: [ 112.757315] Bluetooth: hci0 ACL packet for unknown connection handle 11
Sep 5 12:53:11 mbp kernel: [ 112.757320] Bluetooth: hci0 ACL packet for unknown connection handle 8
Sep 5 12:55:55 mbp kernel: [ 276.181708] Bluetooth: hci0 corrupted ACL packet
Sep 5 12:55:55 mbp kernel: [ 276.181729] Bluetooth: hci0 ACL packet for unknown connection handle 12
Sep 5 12:56:03 mbp kernel: [ 284.806615] Bluetooth: hci0 corrupted ACL packet
Sep 5 12:56:03 mbp kernel: [ 284.806826] Bluetooth: hci0 ACL packet for unknown connection handle 12
Sep 5 12:56:17 mbp kernel: [ 297.874612] Bluetooth: hci0 corrupted ACL packet
Sep 5 12:56:17 mbp kernel: [ 297.874633] Bluetooth: Frame is too short (len 1)
Sep 5 12:56:25 mbp kernel: [ 306.067042] Bluetooth: hci0 corrupted ACL packet
Sep 5 12:56:25 mbp kernel: [ 306.067065] Bluetooth: Frame is too long (len 8, expected len 5)

nothing changed

Revision history for this message
Wolf Rogner (war-rsb) wrote :

On my MacBook Pro 6,2
uname -a
Linux mbp 3.2.0-31-generic #50-Ubuntu SMP Fri Sep 7 16:16:45 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Mouse works fine again.

I had to remove the mouse in the BT settings
Reboot
Enter the PIN
Grant access for the mouse
=> The mouse is seen in the BT menu in the top panel
=> can be connected and disconnected
=> mouse still does not move
=> no error messages in syslog about wrong frame length

Reboot
=> mouse works after login (not on the logon screen though)

Reboot
=> mouse works fine even on the logon screen

Now I believe it fixed.

Question:

Where does the kernel for Macs differ to a plain vanilla kernel? On my HP I never had an issue with this mouse (well a second one).

Suggestions:

Someone contributing to the kernel still has a broken set of libraries. This problem keeps reappearing over and over again.
Find this person an get them to use the latest libs.

But: Thanks

Revision history for this message
Bert Voegele (bertvoegele-deactivatedaccount) wrote :

Issue appears again on a fresh installed 12.10, after updating from 3.5.0-13-generic to 3.5.0-15-generic. Even the usual workarounds (use of BlueMan, deleting and adding the device) don't work this time.

tags: added: quantal
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Just to clarify, this bug is now fixed in Precise(12.04), but it exists in Quantal(12.10)?

Changed in linux (Ubuntu):
status: Triaged → Confirmed
Revision history for this message
Bert Voegele (bertvoegele-deactivatedaccount) wrote :

@jsalisbury):
Short answer : Yes.

Long answer :
Yes, I had a running Precise (12.04) until last week and the mouse worked just fine with minor tweaks (module options regarding scroll-speed and scroll-acceleration).
I did a fresh install of Quantal (12.10) which included kernel 3.5.0-13-generic and the mouse worked flawlessly, even without the above mentioned tweaks. Along came an update of linux-image to version 3.5.0-15-generic and after rebooting I was unable to get the mouse working again - even with all the usual workarounds (see #7), which worked in earlier versions of Ubuntu.

I didn't had the time yet to re-install 3.5.0-13 to confirm. If it helps I could add an hcidump of the connection attempts, but IIRC as soon as the properties (device name, capabilities, etc.) are read, for whatever reason the host (master) sends a disconnect request.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v3.6 kernel[0] (Not a kernel in the daily directory) and install both the linux-image and linux-image-extra .deb packages.

Once you've tested the upstream kernel, please remove the 'needs-upstream-testing' tag. Please only remove that one tag and leave the other tags. This can be done by clicking on the yellow pencil icon next to the tag located at the bottom of the bug description and deleting the 'needs-upstream-testing' text.

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

If you are unable to test the mainline kernel, for example it will not boot, please add the tag: 'kernel-unable-to-test-upstream'.
Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.6-rc7-quantal/

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

After testing the mainline kernel, I can perform a kernel bisect to identify the commit that caused this regression in 3.5.0-15

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
tags: added: needs-upstream-testing
Revision history for this message
Wolf Rogner (war-rsb) wrote :

Joseph,

I previously suggested it and will do it again: Please try to find the committer who has the broken libraries and inform him to update.

This issue is permanently recuring since 10.10. Every second kernel (basically) is broken.

The consequence of this will be that users of Apple hardware will revert to Apple software.

If you search through Launchpad you will find my name attached to this issue at least 5 times. So this is systematic.
From a user perspective a system with a systematic error is unusable.

I rest my hope on you to solve this issue once and for all (not technically but organisationally).

tags: added: kernel-fixed-upstream
removed: needs-upstream-testing
Revision history for this message
Bert Voegele (bertvoegele-deactivatedaccount) wrote :

I followed the instructions from #10:

* installed mainline & reboot
* mouse works without any further actions (in particular : no re-pair needed)
* removed tag 'needs-upstream-testing'
* added tag 'kernel-fixed-upstream'
* added tag 'i386' (for obvious reasons)

I just saw the tag 'running-unity' and want to add, that this issue isn't limited to Unity, it also happens with XFCE and Gnome3.

tags: added: i386
Revision history for this message
Bert Voegele (bertvoegele-deactivatedaccount) wrote :

I can't say this issue is in "... every second kernel ...", but it keeps popping up every now and then, IIRC even before 10.10 (had the Magic Mouse before). It's like a zombie - can't be killed.

@Wolf:
Just out of curiosity : what do you mean by "... broken libraries ..."? Do you have a particular lib or set of libs you suspect to be broken?

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

@Wolf,

Can you also test the mainline kernel, and confirm if it fixes the bug or not? If it does, I can perform a reverse bisect to find the commit that fixes this issue.

Revision history for this message
Wolf Rogner (war-rsb) wrote :

@Bert: Before filing this bug I ran through the history of any magic mouse not working. Found it reoccured regularly.
From my former experience in programming: Every time an issue like this arose, some committer had an old, outdated library. They usually deny the fact until proven wrong (no, I check out the whole branch). Afterwards they always have an explanation (my machine is to slow to check out every day).

This happened for years over and over again.

I would be surprised if this time, different people reinvent the same error at different times.

Thus: Some committer has a broken lib.

I don't know who, nore do I have time or skills to look into the kernel code. Thats why I asked Joseph to make sure it gets fixed.
And: It is no technical problem. It is an organisational problem.

@Joseph:
Currently I'm that busy that I don't know when to do it. I put it on my agenda but won't promise soon.

I have another question: Does the mainline kernel (plain vanilla) support Macbooks out of the box (if so, why do I have to use a special CD still?)

This might make the experiment less likely to succeed.

Revision history for this message
Bert Voegele (bertvoegele-deactivatedaccount) wrote :

Just to let you know: with 3.5.0-17-generic the mouse works again as expected.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

@Wolf

Can you update to the latest Quantal updates and see if the 3.5.0-17 kernel also fixes this bug for you? If it does, please mark the bug as "Fix Released".

Thanks

Revision history for this message
Miguel Negrao (miguel-negrao) wrote :

Hi

I have a magic mouse, running ubuntu 13.04 and I can't connect to it. I managed to pair it, but in the bluetooth preferences I can't turn it on. It worked at some point for some minutes, but never managed to get it working again.

Linux 3.8.0-14-lowlatency #9-Ubuntu SMP PREEMPT Mon Mar 25 10:49:31 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

best,
miguel

Revision history for this message
thet (thet) wrote :

Same here.

I have Ubuntu 13.04 on a MacBook Air Mid 2011 and a Apple Magic Mouse - which worked just fine a few days ago. But I couldn't connect after today's reboot and get instead one of this error messages in the system log:

First this one (from dmesg):
[ 543.486570] Bluetooth: hci0 corrupted ACL packet

And after
- Bluetook off/on,
- a "sudo service stop acpid" (suggested here: http://forums.gentoo.org/viewtopic-t-922488-start-0.html)
- and a "sudo hciconfig hci0 reset"
- via "sudo tail -f /var/log/{messages,kernel,dmesg,syslog}":

bluetoothd[1009]: Adapter /org/bluez/1009/hci0 has been enabled
bluetoothd[1009]: Discovery session 0x7fbe45ef39c0 with :1.76 activated
bluetoothd[1009]: Stopping discovery
kernel: [ 1210.502817] Bluetooth: hci0 ACL packet for unknown connection handle 16

Revision history for this message
thet (thet) wrote :

after another reboot some time later it kept working again.

Revision history for this message
penalvch (penalvch) wrote :

Wolf Rogner, could you please confirm this issue exists with the latest development release of Ubuntu? ISO images are available from http://cdimage.ubuntu.com/daily-live/current/ . If the issue remains, could you please run the following command in the development release from a Terminal (Applications->Accessories->Terminal), as it will automatically gather and attach updated debug information to this report:

apport-collect -p linux <replace-with-bug-number>

Also, could you please test the latest upstream kernel available following https://wiki.ubuntu.com/KernelMainlineBuilds ? It will allow additional upstream developers to examine the issue. Please do not test the daily folder, but the one all the way at the bottom. Once you've tested the upstream kernel, please comment on which kernel version specifically you tested. If this bug is fixed in the mainline kernel, please add the following tags:
kernel-fixed-upstream
kernel-fixed-upstream-VERSION-NUMBER

where VERSION-NUMBER is the version number of the kernel you tested. For example:
kernel-fixed-upstream-v3.11-rc4

This can be done by clicking on the yellow circle with a black pencil icon next to the word Tags located at the bottom of the bug description. As well, please remove the tag:
needs-upstream-testing

If the mainline kernel does not fix this bug, please add the following tags:
kernel-bug-exists-upstream
kernel-bug-exists-upstream-VERSION-NUMBER

As well, please remove the tag:
needs-upstream-testing

If you are unable to test the mainline kernel, please comment as to why specifically you were unable to test it and add the following tags:
kernel-unable-to-test-upstream
kernel-unable-to-test-upstream-VERSION-NUMBER

Once testing of the upstream kernel is complete, please mark this bug's Status as Confirmed. Please let us know your results. Thank you for your understanding.

tags: added: needs-upstream-testing
removed: kernel-fixed-upstream
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
summary: - Apple magic mouse looses connection
+ [Apple MacBookPro6,2] Magic mouse looses connection
Revision history for this message
Wolf Rogner (war-rsb) wrote :

I can confirm the issue pertaining in the current version on any combination of hardware.

It starts with an error from the powerd. The mouse battery reading turns to 0 (indicated by red outlined battery symbol in the top bar)

Then the mouse stops and after some frantic gesturing, the powerd reads the battery again and the mouse works. Sometimes this procedure takes about 5 minutes (frantic gesturing I mean).

Haven't tested any upstream kernel yet, because I see no fixes that would make sense to me.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.