Bluetooth Keyboard in Linux

puci2020

New Member
Credits
58
I bought Microsoft Bluetooth Keyboard and with Windows 10 works perfectly. But I installed Linux Ubuntu 18.04 and 20.04 because I want learn this system. So, in technical specification this Keyboard works only with Windows and MacOS. But i was try connect this device in Ubuntu and works. The issue is that when I write something suddenly keyboard disconnects with system and I have to clicks in any button few times until the device connect again. For new connection I have to wait 5-10 seconds and it is annoying.

So, maybe someone has this same problem with similar devices and with Linux and exist any solution?
 


puci2020

New Member
Credits
58
Thanks for fast answer! I checked it and idle timeout value was 30 and i changed it to 0. Now I am waiting for results :D
 

puci2020

New Member
Credits
58
Unfortunately your solution doesn't work :( The issue is that Keyboard is parring with notebook and still connected.When I am writing something it works but suddenly device disconnect or it looks like reset of bluetooth or something, I don't know :( With Windows 10 works perfectly.
 

puci2020

New Member
Credits
58
Of course I removed the # sign so in this file I think everything is correctly. Additionally i was try enabled HID mode but this didn't help
 

KGIII

Super Moderator
Staff member
Gold Supporter
Credits
16,097
Well, I've gotta ask. I suppose you also remembered to restart the bluetooth service?

The only other place I can think of to check is /etc/bluetooth/main.conf where there is a pairable timeout.

Hopefully someone else will come along with more options for you to try.
 

puci2020

New Member
Credits
58
Yes, I restarted the bluetooth. In main.conf file I find the pairable timeout but is set default to 0.

Maybe not without reason The Microsoft written that this keyboard works only on Windows and MacOS.

But thank you for try to help :D
 

KGIII

Super Moderator
Staff member
Gold Supporter
Credits
16,097
Some more digging says you can also look one last place. It'll vary based on your hardware.

/var/lib/bluetooth/{BT MAC]/{keyboard MAC}/info

It should contain info like:

Code:
[ConnectionParameters]
MinInterval=6
MaxInterval=9
Latency=44
Timeout=216
After that, I'm plum out of ideas!
 

puci2020

New Member
Credits
58
I have this file and it looks that:

Code:
[General]
Name=Microsoft Bluetooth Keyboard
Appearance=0x03c1
AddressType=static
SupportedTechnologies=LE;
Trusted=true
Blocked=false
Services=00001800-0000-1000-8000-00805f9b34fb;00001801-0000-1000-8000-00805f9b34fb;0000180a-0000-1000-8000-00805f9b34fb;0000180f-0000-1000-8000-00805f9b34fb;00001812-0000-1000-8000-00805f9b34fb;

[SlaveLongTermKey]
Key=1D17D2E9F4F3897751B9DC5D37BAD15B
Authenticated=3
EncSize=16
EDiv=0
Rand=0

[DeviceID]
Source=2
Vendor=1118
Product=2096
Version=276

[ConnectionParameters]
MinInterval=6
MaxInterval=6
Latency=66
Timeout=300
 

KGIII

Super Moderator
Staff member
Gold Supporter
Credits
16,097
That timeout may be in seconds. So, 300 seconds is five minutes.

Toss a few zeros at the end, save it, restart the bluetooth service, and see if that does the trick?

I also read that setting the PIN to 0000 helped some people with mice/keyboards, but that doesn't make a lot of sense and sounds more coincidental.
 

KGIII

Super Moderator
Staff member
Gold Supporter
Credits
16,097
Hmm... I am completely drained of ideas. I have no idea why that'd return to 300.

Well, you could try changing it and *not* restarting the Bluetooth service - but that just doesn't sound right to me. If you're not doing anything better, you might as well try it.

I'd say don't give up hope - it could EASILY be something I'm overlooking or don't know. Someone else may come along with more ideas - or even have the same device. I've used a ton of Microsoft hardware and never had an issue - but I've used exactly zero Microsoft bluetooth devices.

So, keep an eye on the thread (or your inbox, if you get notifications by email) and let's hope someone else comes along. It's a weekend, during the day, and people here span the globe - so there's still plenty of time for other people to chime in.

Sorry that I could not get it sorted for you.
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Members online


Top