Bluetooth Controller Disappeared

➜  ~ uname -srm
Linux 6.9.1 x86_64

➜  ~ sudo nix-channel --list
home-manager https://github.com/nix-community/home-manager/archive/release-23.11.tar.gz
nixos https://nixos.org/channels/nixos-23.11

The bluetooth controller disappeared a few days ago without making any change to the system except automatic upgrades (system.autoUpgrade.enable = true):

➜  ~ bluetoothctl
Agent registered
[bluetooth]# list
[bluetooth]# scan on
No default controller available

How can I get back my bluetooth controller?

Here some output which might help:

➜  ~ rfkill list
0: hci0: Bluetooth
        Soft blocked: no
        Hard blocked: no
1: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no
➜  ~ systemctl status bluetooth
● bluetooth.service - Bluetooth service
     Loaded: loaded (/etc/systemd/system/bluetooth.service; enabled; preset: enabled)
    Drop-In: /nix/store/9n9kyxy7jd6mc4p76jh5j21ypmhr6522-system-units/bluetooth.service.d
             └─overrides.conf
     Active: active (running) since Mon 2024-05-20 12:42:08 CEST; 12min ago
       Docs: man:bluetoothd(8)
   Main PID: 1087 (bluetoothd)
     Status: "Running"
         IP: 0B in, 0B out
         IO: 3.9M read, 0B written
      Tasks: 1 (limit: 154454)
     Memory: 2.8M
        CPU: 317ms
     CGroup: /system.slice/bluetooth.service
             └─1087 /nix/store/h5z7lwsr57mrbkqxrw6m2gqpl7dc2a9f-bluez-5.70/libexec/bluetooth/bluetoothd -f /etc/bluetooth/main.conf

Mai 20 12:42:08 maxiTower bluetoothd[1087]: Starting SDP server
Mai 20 12:42:08 maxiTower bluetoothd[1087]: src/plugin.c:plugin_init() System does not support csip plugin
Mai 20 12:42:08 maxiTower bluetoothd[1087]: profiles/audio/micp.c:micp_init() D-Bus experimental not enabled
Mai 20 12:42:08 maxiTower bluetoothd[1087]: src/plugin.c:plugin_init() System does not support micp plugin
Mai 20 12:42:08 maxiTower bluetoothd[1087]: src/plugin.c:plugin_init() System does not support vcp plugin
Mai 20 12:42:08 maxiTower bluetoothd[1087]: src/plugin.c:plugin_init() System does not support mcp plugin
Mai 20 12:42:08 maxiTower bluetoothd[1087]: src/plugin.c:plugin_init() System does not support bass plugin
Mai 20 12:42:08 maxiTower bluetoothd[1087]: src/plugin.c:plugin_init() System does not support bap plugin
Mai 20 12:42:08 maxiTower bluetoothd[1087]: Bluetooth management interface 1.22 initialized
Mai 20 12:42:08 maxiTower systemd[1]: Started Bluetooth service.
➜  ~ dmesg -k | egrep -i blue
[   14.622952] Bluetooth: Core ver 2.22
[   14.622971] NET: Registered PF_BLUETOOTH protocol family
[   14.622972] Bluetooth: HCI device and connection manager initialized
[   14.622976] Bluetooth: HCI socket layer initialized
[   14.622978] Bluetooth: L2CAP socket layer initialized
[   14.622983] Bluetooth: SCO socket layer initialized
[   14.673421] bluetooth hci0: Direct firmware load for mediatek/BT_RAM_CODE_MT7961_1a_2_hdr.bin failed with error -2
[   14.673425] Bluetooth: hci0: Failed to load firmware file (-2)
[   14.673714] Bluetooth: hci0: Failed to set up firmware (-2)
[   14.673993] Bluetooth: hci0: HCI Enhanced Setup Synchronous Connection command is advertised, but not supported.
[   16.066789] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   16.066793] Bluetooth: BNEP socket layer initialized

When I roll back to a generation with Kernel 6.8 than my bluetooth works fine:

➜  ~ nixos-rebuild list-generations

Generation   Build-date           NixOS version            Kernel  Configuration Revision  Specialisation
160          2024-05-20 12:06:04  23.11.7202.e7cc61784ddf  6.9.1                           *
159          2024-05-17 12:31:10  23.11.7122.9ddcaffecdf0  6.9.0                           *
158 current  2024-05-10 10:34:28  23.11.7042.9a9960b98418  6.8.9                           *
157          2024-05-08 11:22:46  23.11.6981.27c13997bf45  6.8.9                           *
➜  ~ systemctl status bluetooth
● bluetooth.service - Bluetooth service
     Loaded: loaded (/etc/systemd/system/bluetooth.service; enabled; preset: enabled)
    Drop-In: /nix/store/rrsnlsp0vk9272igap1i5v8r98rk0f5p-system-units/bluetooth.service.d
             └─overrides.conf
     Active: active (running) since Mon 2024-05-20 14:08:11 CEST; 14min ago
       Docs: man:bluetoothd(8)
   Main PID: 1042 (bluetoothd)
     Status: "Running"
         IP: 0B in, 0B out
         IO: 5.0M read, 8.0K written
      Tasks: 1 (limit: 154448)
     Memory: 3.5M
        CPU: 37ms
     CGroup: /system.slice/bluetooth.service
             └─1042 /nix/store/h5z7lwsr57mrbkqxrw6m2gqpl7dc2a9f-bluez-5.70/libexec/bluetooth/bluetoothd -f /etc/bluetooth/main.conf

Mai 20 14:18:58 maxiTower bluetoothd[1042]: Endpoint registered: sender=:1.54 path=/MediaEndpoint/A2DPSource/aptx_ll_1
Mai 20 14:18:58 maxiTower bluetoothd[1042]: Endpoint registered: sender=:1.54 path=/MediaEndpoint/A2DPSource/aptx_ll_0
Mai 20 14:18:58 maxiTower bluetoothd[1042]: Endpoint registered: sender=:1.54 path=/MediaEndpoint/A2DPSource/aptx_ll_duplex_1
Mai 20 14:18:58 maxiTower bluetoothd[1042]: Endpoint registered: sender=:1.54 path=/MediaEndpoint/A2DPSource/aptx_ll_duplex_0
Mai 20 14:18:58 maxiTower bluetoothd[1042]: Endpoint registered: sender=:1.54 path=/MediaEndpoint/A2DPSource/faststream
Mai 20 14:18:58 maxiTower bluetoothd[1042]: Endpoint registered: sender=:1.54 path=/MediaEndpoint/A2DPSource/faststream_duplex
Mai 20 14:18:58 maxiTower bluetoothd[1042]: Endpoint registered: sender=:1.54 path=/MediaEndpoint/A2DPSink/opus_05
Mai 20 14:18:58 maxiTower bluetoothd[1042]: Endpoint registered: sender=:1.54 path=/MediaEndpoint/A2DPSource/opus_05
Mai 20 14:18:58 maxiTower bluetoothd[1042]: Endpoint registered: sender=:1.54 path=/MediaEndpoint/A2DPSink/opus_05_duplex
Mai 20 14:18:58 maxiTower bluetoothd[1042]: Endpoint registered: sender=:1.54 path=/MediaEndpoint/A2DPSource/opus_05_duplex

I do not see anymore the errors System does not support … plugin like with kernel 6.9:

Mai 20 12:42:08 maxiTower bluetoothd[1087]: src/plugin.c:plugin_init() System does not support csip plugin

But maybe that is not due to the kernel version.

The kernel version 6.9 has a bug which breaks my AMD bluetooth controler.
Fixing the kernel verion for the time being helped:

boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_8;
1 Like

I believe I’m experiencing this bug as well in 6.9.3, and on an AMD Ryzen device.