Login with bluetooth keyboard SDDM / KDE Plasma

I have a bluetooth keyboard which works great in KDE Plasma. The only issue that I have is when trying to login because the keyboard only starts working after I login into KDE Plasma. If I logout afterwards, I can log back in using the bluetooth keyboard. So it’s just the first time after starting the computer that the keyboard is not connected.

Is there anyway that I can get the bluetooth keyboard connection to work at login (in SDDM) ?

Thanks

Hmmm is the keyboard working with the BIOS at first start??? ie can you get into the UEFI/BIOS at boot???

No, it doesn’t work in BIOS. It only starts working after I login in KDE.

Not a solution but can you check if Bluetooth is started using systemd

sudo systemctl status bluetooth.service

If so, the solution is likely to somehow get this services started earlier in the boot process.

Thank you for the idea. Before logging in to KDE / X I checked and the the ‘bluetooth.service’ is started already. I checked by doing CTRL+ALT+F1 to get a console, logging in through the console and running the ‘systemctl’ command.

So the bluetooth service is running even before but I can only use the bluetooth keyboard after logging in.

I also did a ‘dmesg | grep -i bluetooth’ and got


    7.202362] **Bluetooth**: Core ver 2.22
    7.203777] **Bluetooth**: HCI device and connection manager initialized
    7.204462] **Bluetooth**: HCI socket layer initialized
    7.205136] **Bluetooth**: L2CAP socket layer initialized
    7.205815] **Bluetooth**: SCO socket layer initialized
    7.291214] **Bluetooth**: hci0: Firmware revision 0.0 build 121 week 7 2021
    7.520155] **Bluetooth**: BNEP (Ethernet Emulation) ver 1.3
    7.523373] **Bluetooth**: BNEP filters: protocol multicast
    7.523391] **Bluetooth**: BNEP socket layer initialized
   35.060438] **Bluetooth**: RFCOMM TTY layer initialized
   35.060510] **Bluetooth**: RFCOMM socket layer initialized
   35.060559] **Bluetooth**: RFCOMM ver 1.11
  115.730802] **Bluetooth**: HIDP (Human Interface Emulation) ver 1.2
  115.730813] **Bluetooth**: HIDP socket layer initialized
  115.732083] input: TBSS Keyboard as /devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-4/1-4.4/1-4.4:1.0/**bluetooth**/hci0/hci0:256/0005:04E8:7021.0005/input/input22
  115.732274] input: TBSS Consumer Control as /devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-4/1-4.4/1-4.4:1.0/**bluetooth**/hci0/hci0:256/0005:04E8:7021.0005/input/input23
  115.732352] input: TBSS System Control as /devices/pci0000:00/0000:00:08.1/0000:04:00.3/usb1/1-4/1-4.4/1-4.4:1.0/**bluetooth**/hci0/hci0:256/0005:04E8:7021.0005/input/input24
  115.732430] hid-generic 0005:04E8:7021.0005: input,hidraw4: **BLUETOOTH** HID v0.01 Keyboard [TBSS] on e0:d4:e8:09:c6:84

I wonder if this line: “* 115.730802] Bluetooth*[FONT=courier new]: HIDP (Human Interface Emulation) ver 1.2” [/FONT]isn’t important ? I’m not sure if I interpret it correctly but I think it’s when the ‘hidp’ module is loaded. And I can see that immediately after that the keyboard is also recognized. Both of these seem to happen after I login judging from the timestamp.

Good idea to start a parallel console.

Using that console, can you also check if the keyboard is connected, for my BT headset:

> bt-device -l     
Added devices: 
Philips SHB9000 (00:1E:7C:60:A3:6D) 
> bt-device -i 00:1E:7C:60:A3:6D 
[00:1E:7C:60:A3:6D] 
  Name: Philips SHB9000 
  Alias: Philips SHB9000 [rw] 
  Address: 00:1E:7C:60:A3:6D 
  Icon: audio-card 
  Class: 0x240404 
  Paired: 1 
  Trusted: 1 [rw] 
  Blocked: 0 [rw] 
  Connected: 1 
  UUIDs: [Headset, AudioSink, AVRemoteControlTarget, AdvancedAudioDistribution, AVRemoteControl, Handsfree]

Change the MAC address to the MAC address of the keyboard you find with the first command and check the “Paired:” and “Connected:” lines.

I ran the following command, BEFORE logging in to KDE.


bt-device -i 15:43:00:13:C3:40
[15:43:00:13:C3:40]
  Name: TBSS
  Alias: TBSS [rw]
  Address: 15:43:00:13:C3:40
  Icon: input-keyboard
  Class: 0x540
  Paired: 1
  Trusted: 1 [rw]
  Blocked: 0 [rw]
  Connected: 0
  UUIDs: [ServiceDiscoveryServer, HumanInterfaceDevice, PnPInformation]

So the keyboard is not connected yet.
After I log in to KDE / X and I run the same command I get the same output with the exception that it shows as connected: ‘Connected: 1

Okay, paired but not connected.

That is not a Opensuse specific problem it seems: Reddit - Dive into anything

Are you using the keyboard also for another system? In that case you might need Dual boot pairing

On Bluetooth keyboard I read:

To automatically connect the keyboard after a reboot, see Bluetooth#Auto power-on after boot.

But I see Tumbleweed does not have /etc/bluetooth/main.conf, but something like that is needed.

Maybe you can can just created /etc/bluetooth/main.conf with the contents mention on the web page.

“man bluetoothd” clearly indicates:

FILES
/etc/bluetooth/main.conf
Location of the global configuration file.

That actually worked well !

I’ve created a file in /etc/bluetooth/main.conf based on the contents from the Arch wiki page that you mentioned. More precisely:


[Policy]
AutoEnable=true

Now I can use the bluetooth keyboard to login to KDE. I just need to wait a few seconds for the connection to be established.

@marel Thanks a lot!