Pairing authentication of a bluetooth keyboard fails

When I try to pair a bluetooth keyboard with my computer in Gnome Settings, after few seconds it prints Not Set Up. I also tried to connect it using bluetoothctl, but to no avail. It
ends up with priting that authentication failed. My Fedora 39 install is fairly new, maybe week old. I also tried restarting my system and updating packages, but it didn’t help either. To rule out a hardware problem I booted to a Ubuntu 22.04 live environment and I managed to connect the keyboard without any issues.

Journalctl log becomes quite polluted at some point because I enabled bluetoothd debug flag -d to see, if I can find something useful with it. Unfortunately it was to big to post is here or pastebin, but you can download it from this link: https://file.io/KczLWzEHXT4o. If you know a better way how can I share it let me know.

Hardware:

  • Lenovo IdeaPad 5 Pro 16ARH7
  • Logitech K380 Bluetooth keyboard
$ dnf list --installed | grep -E 'bluetooth|bluez'
NetworkManager-bluetooth.x86_64                      1:1.44.2-1.fc39                     @updates              
bluez.x86_64                                         5.70-3.fc39                         @updates              
bluez-cups.x86_64                                    5.70-3.fc39                         @updates              
bluez-deprecated.x86_64                              5.70-3.fc39                         @updates              
bluez-hid2hci.x86_64                                 5.70-3.fc39                         @updates              
bluez-libs.x86_64                                    5.70-3.fc39                         @updates              
bluez-obexd.x86_64                                   5.70-3.fc39                         @updates              
gnome-bluetooth.x86_64                               1:42.7-1.fc39                       @updates              
gnome-bluetooth-libs.x86_64                          1:42.7-1.fc39                       @updates
[bluetooth]# pair F4:73:35:11:2B:56
Attempting to pair with F4:73:35:11:2B:56
[CHG] Device F4:73:35:11:2B:56 Connected: yes
[Keyboard K380]# connect F4:73:35:11:2B:56 
Attempting to connect to F4:73:35:11:2B:56
[CHG] Device F4:73:35:11:2B:56 Connected: no
Failed to pair: org.bluez.Error.AuthenticationCanceled
[CHG] Device F4:73:35:11:2B:56 Connected: yes
[CHG] Device F4:73:35:11:2B:56 Modalias: usb:v046DpB342d4201
[CHG] Device F4:73:35:11:2B:56 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
[CHG] Device F4:73:35:11:2B:56 ServicesResolved: yes
Failed to connect: org.bluez.Error.NotAvailable br-connection-profile-unavailable
$ lsmod | grep bluetooth
bluetooth            1052672  44 btrtl,btmtk,btintel,btbcm,bnep,btusb,rfcomm
rfkill                 40960  8 bluetooth,ideapad_laptop,cfg80211
$ rfkill 
ID TYPE      DEVICE                 SOFT      HARD
 0 wlan      ideapad_wlan      unblocked unblocked
 1 bluetooth ideapad_bluetooth unblocked unblocked
 3 wlan      phy0              unblocked unblocked
 6 bluetooth hci0              unblocked unblocked

$ hciconfig -a
hci0:	Type: Primary  Bus: USB
	BD Address: F4:6A:DD:76:4F:16  ACL MTU: 1021:6  SCO MTU: 255:12
	UP RUNNING 
	RX bytes:22613 acl:97 sco:0 events:601 errors:0
	TX bytes:66132 acl:55 sco:0 commands:388 errors:0
	Features: 0xff 0xff 0xff 0xfe 0xdb 0xfd 0x7b 0x87
	Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 
	Link policy: RSWITCH HOLD SNIFF PARK 
	Link mode: PERIPHERAL ACCEPT 
	Name: 'fedoram'
	Class: 0x7c010c
	Service Classes: Rendering, Capturing, Object Transfer, Audio, Telephony
	Device Class: Computer, Laptop
	HCI Version:  (0xc)  Revision: 0xdbc6
	LMP Version:  (0xc)  Subversion: 0xb20f
	Manufacturer: Realtek Semiconductor Corporation (93)

The debug file has entries for many BT devices. You need to trimi it down to just the problematic device.

Arch Linux Bluetooth Documentation is an excellent reference for troubleshooting bluetooth.