- Shell 100%
| patch.sh | ||
| README.md | ||
btusb-csr8510-fix-fix
Fix for the Patch for the btusb kernel module to restore support for fake CSR8510 A10 Bluetooth dongles (10d7:b012) broken by an upstream kernel change that only accounted for the original CSR vendor/product ID (0a12:0001).
Problem
The script was broken with tab syntax.
A kernel fix for fake CSR Bluetooth adapters hardcodes checks for 0a12:0001 in three places within drivers/bluetooth/btusb.c. Other fake CSR clones like 10d7:b012 are not handled, causing them to malfunction or stop working entirely after the update.
What the patch does
Fixes the tab syntax in the script.
Adds device ID 10d7:b012 to the three relevant code paths in btusb.c:
quirks_table— Registers the device withBTUSB_CSRdriver info so it enters the CSR code path.- Interrupt transfer size — Uses
wMaxPacketSizeinstead ofHCI_MAX_EVENT_SIZE, matching the behavior required by fake CSR devices. - Setup function — Routes the device through
btusb_setup_csr()to handle broken HCI commands.
Requirements
- Fedora / Nobara (or any distro with
kernel-develpackages) kernel-develfor your running kernelgcc,make,curl,zstd
sudo dnf install kernel-devel gcc make curl zstd
Usage
git clone https://github.com/ewood/btusb-csr8510-fix.git
cd btusb-csr8510-fix
sudo ./patch.sh
The script will:
- Download
btusb.cand headers matching your running kernel - Apply the three patches
- Compile the module
- Back up the original module
- Install the patched module
- Reload
btusb
Reverting
sudo cp /lib/modules/$(uname -r)/kernel/drivers/bluetooth/btusb.ko.zst.bak \
/lib/modules/$(uname -r)/kernel/drivers/bluetooth/btusb.ko.zst
sudo rmmod btusb && sudo modprobe btusb
After kernel updates
The patch applies to the compiled module, not the kernel source. You need to re-run the script after every kernel update.
Verifying your device
Check if your adapter matches the affected device ID:
lsusb | grep -i 10d7
Expected output:
Bus XXX Device XXX: ID 10d7:b012 Majesty Internal ... CSR8510 A10
This was inspired by this comment: https://discussion.fedoraproject.org/t/bluetooth-not-working-on-fedora-41-csr8510-a10-linux-6-12-4-200-fc41-x86-64/139742/8
This patch modifies Linux kernel source code licensed under GPL-2.0.