Score:2

Autoconnect bluetooth keyboard

us flag

I have a bluetooth mouse and a bluetooth keyboard paired under Ubuntu 22.10. They work fine. When I boot the computer and both devices are switched on, the mouse is automatically activated; the keyboard has to be switched on by clicking on the bluetooth icon at the top of the screen, going to the "Bluetooth 3.0 Keyboard" entry that is shown and then clicking on the "Connect" button. So why does the mouse connect automatically, whilst the keyboard doesn't? How can I get the keyboard to connect automatically?

Score:2
us flag

I found the solution myself:

First, open bluetooth settings and note the bluetooth address of the device (6 pairs of hexadecimal digits separated by colons, e.g. 01:23:45:67:89:AB)

Then open a terminal e.g. with Ctrl+Alt+T

Enter bluetoothctl

Enter trust 01:23:45:67:89:AB (i.e. the device's bluetooth address)

When the system confirms that it now trusts the device, enter exit.

Next time you start, the device will connect automatically.

Pilot6 avatar
cn flag
You can set trust in Bluetooth settings without using a terminal.
Odd_N avatar
us flag
Where? All I see is a "Connect", "Connected", "Type" and "Address". Before i used the terminal to trust the keyboard, clicking on "connect" had no effect.
Pilot6 avatar
cn flag
It depends on DE. I don't have Ubuntu with Gnome on a real hardware, so I can't test it. In XFCE there is a "Trust" button in device properties. Try to right-click a device.
Odd_N avatar
us flag
Right clicking a device had no effect. I tried other flavours of Ubuntu (K/L/Xubuntu) but they were worse! I flagged this problem in 2014,when I started trying out Ubuntu, and it still hasn't been fixed. So I'll return to Windows that never had the problem!
Score:0
sb flag

For some reason the steps above weren't successful. I had to connect, set an alias and then it started to work properly

[bluetooth]# connect 50:E6:76:A6:88:65
Attempting to connect to 50:E6:76:A6:88:65
[CHG] Device 50:E6:76:A6:88:65 Connected: yes
Connection successful
[CHG] Device 50:E6:76:A6:88:65 ServicesResolved: yes
[Bluetooth Keyboard]# set-alias bkeyb
[CHG] Device 50:E6:76:A6:88:65 Alias: bkeyb
Changing bkeyb succeeded

And now in the logs I see that the device is connected automatically every time I switch it on.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.