I bought a CM749 UGREEN Bluetooth 5.4 USB adapter for my Nixos machine. It is recognized by lsusb
as ID 33fa:0010 USB2.0-BT
, but is not detected by KDE/Plasma's bluetooth daemon.
I dug deeper and found an Ubuntu bug report with the exact same problem and diagnosis as me. As of today, the last post links to an AskUbuntu post with a vexingly vague answer:
I patch my kernel source to cancel command
hci_read_local_ext_features
in thehci_init2[]
andhci_init3[]
in filehci_sync.c
. It worked.
So, I downloaded and unpacked the 6.15.7 kernel source from cdn.kernel.org, opened the corresponding file in Keta... and was lost like a lamb.
Question: What does it mean to "cancel" a command in the linux kernel and how can one do so?
Please, do tell me if my question is too vague or whether more information should be provided.
I made a patch from 6.15.7 with the answer from @tink, applied it to my kernel, left it to compile overnight and now the CM749 UGREEN Bluetooth adapter works without issue so far. It might also work for CM748.
cm749.patch
is identical to the following, or simply push the following to your own repo:diff -urpN linux-6.15.7.orig/net/bluetooth/hci_sync.c linux-6.15.7/net/bluetooth/hci_sync.c
--- linux-6.15.7.orig/net/bluetooth/hci_sync.c 2025-07-25 21:32:04.088796199 -0400
+++ linux-6.15.7/net/bluetooth/hci_sync.c 2025-07-26 00:03:09.827219049 -0400
@@ -3961,7 +3961,7 @@ static const struct hci_init_stage hci_i
/* HCI_OP_READ_INQ_RSP_TX_POWER */
HCI_INIT(hci_read_inq_rsp_tx_power_sync),
/* HCI_OP_READ_LOCAL_EXT_FEATURES */
- HCI_INIT(hci_read_local_ext_features_1_sync),
+ /* HCI_INIT(hci_read_local_ext_features_1_sync), */
/* HCI_OP_WRITE_AUTH_ENABLE */
HCI_INIT(hci_write_auth_enable_sync),
{}
sudo rvim /etc/nixos/configuration.nix
and add the following with the raw text url of the patch in the repo: # Bluetooth
hardware.bluetooth.enable = true; # enables support for Bluetooth
hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot
boot.kernelPatches = [{
name = "cm749-patch";
patch = builtins.fetchurl "https://raw.githubusercontent.com/Seven0492/kernel-patches/refs/heads/main/cm749.patch";
}];
sudo nixos-rebuild boot
and reboot with the new build.If anyone knows how to use boot.kernelPatches
with a local file, I'd be interested to know where to put it. Currently, absolute paths do not seem to work with it. This might be a Nix bug?
This probably wouldn't fly as an upstream patch as, according to the Bluetooth HCI specs, HCI_Read_Local_Extended_Features requests the extended features a Bluetooth adapter can have. Though, from the fact that my 26 CA$ 5.4 Bluetooth adapter does not support any of them, these are likely more geared towards Bluetooth LE devices, which are more enterprise focused. So, disabling the request entirely is unlikely to affect you at all unless you purchase an LE adapter, and then no patch will be needed.
Ideally, and what I am looking into, is disabling the request only for CM749 and CM748 (if someone who has it contributes) so that this patch can be pushed upstream, and then there is no need to recompile the kernel every system update or even look up the issue.
Further work on this topic is mostly outside the scope of this question so I submitted a new one to the Staging Ground, which I will link to when it will be publicly posted.
Here it is: How to exclude a USB adapter vendor and product ID from a Linux HCI command