Does the Surface Keyboard work with Ubuntu? Yes, but only with Ubuntu 18 onwards

11th Apr 2019

The other keyboard that I've recently purchased as well as the Cherry KC 6000 is the Microsoft Surface Keyboard. After reading a few reviews online and watching a few videos, I decided on getting this bluetooth keyboard for my home setup.

My main concern however, was whether this keyboard would work with my Xubuntu laptop. Some googling revealed mixed answers - someone running Linux Mint, which is based on Ubuntu, had no luck. Whereas a separate thread on Reddit seemed to indicate that it worked without any problems.

After purchasing the keyboard and using it, here is what I found: In order to successfully pair the keyboard with any PC, the keyboard will ask the PC to present the user with a passcode challenge. On Windows, when pairing, a dialogue will pop up that contains a 6 digit number. It will prompt you to enter a 6 digit passcode on the keyboard. Once this is entered on the Surface Keyboard, it will be paired and will work as expected. When pairing the keyboard with my Xubuntu laptop, here's what I found:

The Surface Keyboard will not work with Ubuntu 16 or any derivatives

This is because of a few bugs in the bluetooth stack in Ubuntu 16. The passcode dialogue will never appear, meaning that you will not be able to successfully pair the keyboard to a machine running Ubuntu 16 or below. This problem also happens when attempting to pair in the terminal using bluetoothctl.

The Surface Keyboard will work with Ubuntu 18 upwards

Luckily, I have a spare laptop, and was able to use that to test out the pairing on Ubuntu 18 before committing myself to upgrading my main work laptop. Using the spare, I was able to successfully pair on Ubuntu 18.04 through the bluetooth gui as the passcode prompt was now appearing. I took the plunge and updated my main Xubuntu laptop and can confirm that the pairing with the Surface Book keyboard fully works on Ubuntu 18.04 and any derivatives.