← Back to team overview

kernel-packages team mailing list archive

[Bug 1001825] Re: apple bluetooth keyboard and mouse: conflict between ubuntu and OS X

 

This bug nearly made me throw my mac through the window and move to
forest. None of the above works. After spending several days struggling
with this, searching the whole internets, I finally managed to get
bluetooth work while dual booting. And here's how it goes:

I've got late 2012 Imac with 3TB fusion drive. I've split the fusion
drive into separate SSD and HDD to gain full control of the disks and
clean installed Yosemite on one SSD partition and Linux Mint Debian on
the other SSD partition. HDD is solely for photos and stuff. I've got
refind installed too. But this has nothing to do with bluetooth! Just
little background.

I've got Apple bluetooth keyboard and bluetooh Apple Magic Mouse.  And
here's how you make them work with LINUX / OSX Yosemite dualboot system.

1. Pair the mouse and keyboard while on LINUX
2. Pair the mouse and keyboard while on OSX

then on OSX terminal run:
sudo defaults read /private/var/root/Library/Preferences/blued.plist

after typing your password, you'll get this:
-------------
{
    LinkKeys =     {
        "4b-8g-cd-43-22-g4" =         {
            "7c-21-aa-cd-33-4c" = <d2a3cd51 3af1247a 11020891 d2b3df83>;
            "e4-89-7a-dc-45-8b" = <35194ceb 8b0c9128 0fdfec7e e17f31e7>;
        };
    };
}

------------
The "4b-8g-cd-43-22-g4" is mac address of computer's bluetooth. 7c-21-aa-cd-33-4c and e4-89-7a-dc-45-8b are mac addresses of keyboard and magic mouse. Make sure the check which one is which!! You can check it from your mac's bluetooth settings for example. You can also check them after pairing them first time on LINUX at phase 1. 

Those long hex numbers d2a3cd51 3af1247a 11020891 d2b3df83 AND  35194ceb
8b0c9128 0fdfec7e e17f31e7 after the mac addresses are the pairing codes
! WRITE / COPY THEM DOWN! And under that, write down the pairing code in
REVERSED - PAIR - MANNER. WTF ?!

Like this:
original:                   d2a3cd513af1247a11020891d2b3df83
reversed in pairs: 83dfb3d2910802117a24f13a51cda3d2

3. Reboot to Linux, but DO NOT PAIR the keyboard nor the magic mouse, instead use usb keyboard and mouse !
4. Open your file system, go to /var/lib/bluetooth (you need to open it with root priviledges--> right click the folder and select "open as root")

There you'll find folder named after your computer's BLUETOOTH MAC
ADDRESS,  i.e. in my case "4b:8g:cd:43:22:g4" seen above. Open it (as
root of course).

Inside this folder, you'll find a file called LINKKEYS. It contains your
Linux bluetooth pairing codes for bluetooth keyboard and magic mouse.
Open it, and you'll see something familiar: The MAC addresses of your
keyboard and Magic Mouse followed by 16 HEX code, followed by "06" or
"04". The 06 means that the original pairing code was 6 digit figure,
and 04 means that it was four digit figure i.e. "0000" for magic mouse.
After the HEX conversion the pairing code is naturally something nearly
cryptical.

Now, replace the HEX figures with the reversed-in-pairs code you wrote
down (see above). Leave the "06" and "04" untouched. And MAKE SURE you
know which mac address is your mouse and which one is keyboard!

Save the file.  Do not pair anything yet.

Reboot and see the bluetooth magic work finally!

I've still got to figure out though how to make the damn keyboard work
during REFIND menu when rebooting after using linux. Ideas?

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to bluez in Ubuntu.
https://bugs.launchpad.net/bugs/1001825

Title:
  apple bluetooth keyboard and mouse: conflict between ubuntu and OS X

Status in bluez package in Ubuntu:
  Confirmed

Bug description:
  First of all, ubuntu 12.04(tested with mac specific iso and 64 bits)
  and grub 2(tested grub efi amd64 of course) do not acknowledge apple
  bluetooth keyboard(and mouse for ubuntu); installing blueman at ubuntu
  seems to be the only way to get both working on ubuntu, a very
  difficult process, which required an usb mouse because there are no
  working bluetooth apple devices; the issue is never fixed, only made
  less worse as shown below, please check these four threads for more
  information(the issue affect plenty of users, and has not been
  adressed properly since 2011?!):

  http://ubuntuforums.org/showthread.php?t=1980171

  http://ubuntuforums.org/showthread.php?t=1874245

  http://ubuntuforums.org/showthread.php?p=11949032#post11949032

  http://ubuntuforums.org/showthread.php?t=1980593

  If ubuntu gets control of mac keyboard and mouse, Os X lose it(and pre
  boot keyboard pairing cease to exist, no more pre boot hotkeys
  possible); if OS X have control of keyboard and mouse, ubuntu lose it;
  switching from one to another requires quite painfull keyboard and
  mouse redetection with blueman from ubuntu, or, at osx side, osx take
  quite some time to detect them again after an ubuntu login.

  The mac ubuntu community is quite insatisfied with this issue, and
  demands a fix; if any additional information is needed to help in this
  task, let us know.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/1001825/+subscriptions