Help understanding KDE's handling of Bluetooth on a protocol level

Hi! I’m trying to do the seemingly simple task where I want my Fedora box to act as a bluetooth speaker.

Everything works perfectly when I’m in the KDE session with Pipewire. However, since this is a server computer and KDE uses quite some RAM just sitting there, I did systemctl stop graphical.target and Fedora stopped accepting Bluetooth connections.

So, Bluedevil or something else in KDE is doing something that enables Bluetooth audio support… right?

Here’s the log(?) from bluetoothctl on running systemctl start graphical.target.

Waiting to connect to bluetoothd...
Agent registered
Controller F0:09:0D:41:67:30 UUIDs: 00001133-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001105-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 03b80e5a-ede8-4b33-a751-6ce34ec4c700
Controller F0:09:0D:41:67:30 UUIDs: 00001132-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001104-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00005005-0000-1000-8000-0002ee000001
Controller F0:09:0D:41:67:30 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001801-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000112f-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000180a-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001800-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000111f-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000110a-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001106-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
hci0 class of device changed: 0x500414
Controller F0:09:0D:41:67:30 Class: 0x00500414 (5243924)
Controller F0:09:0D:41:67:30 UUIDs: 00001133-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001105-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 03b80e5a-ede8-4b33-a751-6ce34ec4c700
Controller F0:09:0D:41:67:30 UUIDs: 00001132-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001104-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00005005-0000-1000-8000-0002ee000001
Controller F0:09:0D:41:67:30 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001801-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000112f-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000180a-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001800-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000111f-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000110a-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001106-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
hci0 class of device changed: 0x700414
Controller F0:09:0D:41:67:30 Class: 0x00700414 (7341076)
Controller F0:09:0D:41:67:30 UUIDs: 00001133-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001105-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 03b80e5a-ede8-4b33-a751-6ce34ec4c700
Controller F0:09:0D:41:67:30 UUIDs: 00001132-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001104-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00005005-0000-1000-8000-0002ee000001
Controller F0:09:0D:41:67:30 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001801-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000112f-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000180a-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001800-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000111f-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000110a-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001106-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
hci0 class of device changed: 0x780414
Controller F0:09:0D:41:67:30 Class: 0x00780414 (7865364)
Controller F0:09:0D:41:67:30 UUIDs: 00001133-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001105-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 03b80e5a-ede8-4b33-a751-6ce34ec4c700
Controller F0:09:0D:41:67:30 UUIDs: 00001132-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001104-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00005005-0000-1000-8000-0002ee000001
Controller F0:09:0D:41:67:30 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001801-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000112f-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000180a-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001800-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000111f-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000110a-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001106-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
hci0 class of device changed: 0x7c0414
Controller F0:09:0D:41:67:30 Class: 0x007c0414 (8127508)
Controller F0:09:0D:41:67:30 UUIDs: 00001133-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001105-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 03b80e5a-ede8-4b33-a751-6ce34ec4c700
Controller F0:09:0D:41:67:30 UUIDs: 00001132-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001104-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00005005-0000-1000-8000-0002ee000001
Controller F0:09:0D:41:67:30 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001801-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000112f-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000180a-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001800-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000111f-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000110a-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001106-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001133-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001105-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 03b80e5a-ede8-4b33-a751-6ce34ec4c700
Controller F0:09:0D:41:67:30 UUIDs: 00001132-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001104-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00005005-0000-1000-8000-0002ee000001
Controller F0:09:0D:41:67:30 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001801-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000112f-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000180a-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001800-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000111f-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000110a-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001106-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb

And here is what happens when I run systemctl stop graphical.target

hci0 class of device changed: 0x3c0414
Controller F0:09:0D:41:67:30 Class: 0x003c0414 (3933204)
Controller F0:09:0D:41:67:30 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001132-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001133-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001800-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000112f-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001801-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001106-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000180a-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001104-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 03b80e5a-ede8-4b33-a751-6ce34ec4c700
Controller F0:09:0D:41:67:30 UUIDs: 00001105-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00005005-0000-1000-8000-0002ee000001
hci0 class of device changed: 0x1c0414
Controller F0:09:0D:41:67:30 Class: 0x001c0414 (1836052)
Controller F0:09:0D:41:67:30 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001132-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001133-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001800-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000112f-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001801-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001106-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000180a-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001104-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 03b80e5a-ede8-4b33-a751-6ce34ec4c700
Controller F0:09:0D:41:67:30 UUIDs: 00001105-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00005005-0000-1000-8000-0002ee000001
hci0 class of device changed: 0x180414
Controller F0:09:0D:41:67:30 Class: 0x00180414 (1573908)
Controller F0:09:0D:41:67:30 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001132-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001133-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001800-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000112f-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001801-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001106-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000180a-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001104-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 03b80e5a-ede8-4b33-a751-6ce34ec4c700
Controller F0:09:0D:41:67:30 UUIDs: 00001105-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00005005-0000-1000-8000-0002ee000001
hci0 class of device changed: 0x100414
Controller F0:09:0D:41:67:30 Class: 0x00100414 (1049620)
Controller F0:09:0D:41:67:30 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001132-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001133-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001800-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000112f-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001801-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001106-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000180a-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001104-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 03b80e5a-ede8-4b33-a751-6ce34ec4c700
Controller F0:09:0D:41:67:30 UUIDs: 00001105-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00005005-0000-1000-8000-0002ee000001
Controller F0:09:0D:41:67:30 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001132-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001133-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001800-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000112f-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001801-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001106-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000180a-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001104-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001105-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00005005-0000-1000-8000-0002ee000001
Controller F0:09:0D:41:67:30 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001132-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001133-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001800-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000112f-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001801-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001106-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 0000180a-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001104-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00001105-0000-1000-8000-00805f9b34fb
Controller F0:09:0D:41:67:30 UUIDs: 00005005-0000-1000-8000-0002ee000001

I suppose it has got to do with the class changes, but I’m trying to figure out how to do it myself. I’ve ensured pipewire is running even when KDE is not, so the only difference is the presence/absence of KDE. Can someone point me to what KDE is doing that makes pipewire start talking to bluez?

I think you will need to find out how to make pipewire work outside of the desktop with bluetooth. Maybe you could work at the alsa layer, but I suspect it’s too low in the protocol stack.

Yeah, that’s too low in the stack. Pipewire controls the output node, and pipewire also talks with bluez. So, I don’t need ALSA at all. Just bluez (and bluetooothctl family of tools) and pipewire (and wireplumber etc).

What I’m trying to glean is where in the entire KDE codebase are they configuring these tools.

I know that KDE registers its own bluez pairing agent, and as shown in my output, it also does changes to bluez settings.