Apple Magic Keyboard 2 A1644

I’m having trouble connecting my Apple Magic Keyboard 2 A1644 to my Ubuntu 18.10 machine (it’s not mac/imac…).
I need your help to lay out for me the best practice of connecting it from the terminal on the current Ubuntu.

Now, the problem in connecting from the GUI, but the main one is when I boot the Ubuntu 18.04 machine and get stuck on the GDM since the keyboard won’t connect automatically so I cannot log into my user. And my question is, how do I make it connect automatically using some terminal utility or fix the GNOME Settings way of connecting?


So here’s the problem I run into:

When I go to “GNOME System Settings > Bluetooth” I can see that the “Magic Keyboard” is recognised.

When I try to connect I get the authentication popup window with passcode to type using the Magic Keyboard.

When I try to enter the passcode using the Magic Keyboard, nothing happens. To be exact, nothing I type in is recognised so I cannot get passed the bluetooth keyboard authentication.


Here’s my partial solution and I don’t know if this is the right way to go about it, maybe you know the way one can go about this without installing any other software or best practice for the current Ubuntu?

I installed bluez-tools

I used bt-device -l to list devices, surprisingly Magic Keyboard MAC address was there even tho I didn’t pass the bluetooth authentication in the GNOME Settings.

I ran bt-device --connect=[MAC address] and got an error, didn’t save it that time but it was related to the fact that it was saved in the database from wherever bt-device -l pulls the list from.

I ran bt-device --remove=[MAC]

I ran bt-device --connect=[MAC address] and connected to the device, it prompted me to bypass the passcode where I just wrote “yes” and it connected successfully. Every key worked as expected. I can now connect and disconnect Magic Keyboard right from the GNOME System Settings as long as the keyboard is remembered as authenticated one.


Now, the problem is when I boot the Ubuntu 18.04 machine and get stuck on the GDM since the keyboard won’t connect automatically. And my question is, how do I make it connect automatically using some terminal utility?

At this point I’ll settle for any solution that works but I started this thread mostly since I would like to know the best way to go about it. Is there an out of the box utility to do that? Do I need to install any other utility? Is making some Systemd unit the best way? As you can see, I got lost in the information I found from all the different distros and Ubuntu versions. Pls help :slight_smile:

Sorry you are having trouble. Since this seems like a support request instead of discussion and coordination of Ubuntu, I’ll refer you to https://community.ubuntu.com/t/finding-help/712 .

1 Like