WSL2: When loading the btUSB driver, the kernel reports an error and cannot find the firmware
- Dominant language
- C++
- Stars
- 33.7k
- Forks
- 1.8k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 116
Description
### Windows Version
Microsoft Windows [version 10.0.26200.8037]
### WSL Version
WSL version: 2.7.8.0
### Are you using WSL 1 or WSL 2?
- [x] WSL 2
- [ ] WSL 1
### Kernel Version
Linux version 6.18.35.2-microsoft-standard-WSL2+
### Distro Version
Ubuntu 26.04 TLS
### Other Software
_No response_
### Repro Steps
1. Use the usbipd tool to attach the Generic Bluetooth Adapter device from Windows to WSL2
2. modprobe btusb driver and bluetooth driver
### Expected Behavior
1. Expected Bluetooth devices can be used in WSL2
### Actual Behavior
1. There is firmware in my /lib/firmware/rtl-bt path,`/lib/firmware/rtl_bt/rtl8761bu_fw.bin`
2. The btusb driver failed to load, and the kernel prompts that the corresponding firmware file cannot be found
### Diagnostic Logs
My `/lib/firmware/rtl_bt` path content
``` shell
~$ ls /lib/firmware/rtl_bt/
rtl8192ee_fw.bin.zst rtl8723bs_config.bin.zst rtl8761b_config.bin.zst rtl8761cu_fw.bin.zst rtl8821cs_fw.bin.zst rtl8851bu_config.bin.zst rtl8852bu_fw.bin.zst
rtl8192eu_fw.bin.zst rtl8723bs_fw.bin.zst rtl8761b_fw.bin.zst rtl8812ae_fw.bin.zst rtl8822b_config.bin.zst rtl8851bu_fw.bin.zst rtl8852cu_config.bin.zst
rtl8723a_fw.bin.zst rtl8723cs_xx_config.bin.zst rtl8761bu_config.bin rtl8821a_config.bin.zst rtl8822b_fw.bin.zst rtl8852au_config.bin.zst rtl8852cu_fw.bin.zst
rtl8723b_config.bin.zst rtl8723cs_xx_fw.bin.zst rtl8761bu_config.bin.zst rtl8821a_fw.bin.zst rtl8822cs_config.bin.zst rtl8852au_fw.bin.zst rtl8852cu_fw_v2.bin.zst
rtl8723b_fw.bin.zst rtl8723d_config.bin.zst rtl8761bu_fw.bin rtl8821c_config.bin.zst rtl8822cs_fw.bin.zst rtl8852btu_config.bin.zst rtl8922au_config.bin.zst
rtl8723bs_config-OBDA0623.bin.zst rtl8723d_fw.bin.zst rtl8761bu_fw.bin.zst rtl8821c_fw.bin.zst rtl8822cu_config.bin.zst rtl8852btu_fw.bin.zst rtl8922au_fw.bin.zst
rtl8723bs_config-OBDA8723.bin.zst rtl8761a_fw.bin.zst rtl8761cu_config.bin.zst rtl8821cs_config.bin.zst rtl8822cu_fw.bin.zst rtl8852bu_config.bin.zst
```
kernel dmesg:
``` shell
[ 194.468757] usbcore: deregistering interface driver btusb
[ 199.495618] usbcore: registered new interface driver btusb
[ 199.501641] Bluetooth: hci0: RTL: examining hci_ver=0a hci_rev=000b lmp_ver=0a lmp_subver=8761
[ 199.504811] Bluetooth: hci0: RTL: rom_version status=0 version=1
[ 199.507502] Bluetooth: hci0: RTL: btrtl_initialize: key id 0
[ 199.507878] Bluetooth: hci0: RTL: loading rtl_bt/rtl8761bu_fw.bin
[ 199.508163] firmware_class: __allocate_fw_priv: fw-rtl_bt/rtl8761bu_fw.bin fw_priv=00000000ccb4a131
[ 199.508681] kernel_read_file_from_path_initns: initns open path='/lib/firmware/updates/6.18.35.2-microsoft-standard-WSL2+/rtl_bt/rtl8761bu_fw.bin' current='kworker/u33:0'[7418] root='/' root_sb=overlay:overlay init_mnt_ns=4026531832/4 current_mnt_ns=4026531832/4
[ 199.509812] kernel_read_file_from_path_initns: initns open path='/lib/firmware/updates/6.18.35.2-microsoft-standard-WSL2+/rtl_bt/rtl8761bu_fw.bin' failed: -2 root='/' root_sb=overlay:overlay
[ 199.510660] kernel_read_file_from_path_initns: currentns open path='/lib/firmware/updates/6.18.35.2-microsoft-standard-WSL2+/rtl_bt/rtl8761bu_fw.bin' failed: -2 current_mnt_ns=4026531832/4
[ 199.511471] bluetooth hci0: loading /lib/firmware/updates/6.18.35.2-microsoft-standard-WSL2+/rtl_bt/rtl8761bu_fw.bin failed for no such file or directory.
[ 199.512157] kernel_read_file_from_path_initns: initns open path='/lib/firmware/updates/rtl_bt/rtl8761bu_fw.bin' current='kworker/u33:0'[7418] root='/' root_sb=overlay:overlay init_mnt_ns=4026531832/4 current_mnt_ns=4026531832/4
[ 199.513065] kernel_read_file_from_path_initns: initns open path='/lib/firmware/updates/rtl_bt/rtl8761bu_fw.bin' failed: -2 root='/' root_sb=overlay:overlay
[ 199.513521] kernel_read_file_from_path_initns: currentns open path='/lib/firmware/updates/rtl_bt/rtl8761bu_fw.bin' failed: -2 current_mnt_ns=4026531832/4
[ 199.513917] bluetooth hci0: loading /lib/firmware/updates/rtl_bt/rtl8761bu_fw.bin failed for no such file or directory.
[ 199.514214] kernel_read_file_from_path_initns: initns open path='/lib/firmware/6.18.35.2-microsoft-standard-WSL2+/rtl_bt/rtl8761bu_fw.bin' current='kworker/u33:0'[7418] root='/' root_sb=overlay:overlay init_mnt_ns=4026531832/4 current_mnt_ns=4026531832/4
[ 199.514798] kernel_read_file_from_path_initns: initns open path='/lib/firmware/6.18.35.2-microsoft-standard-WSL2+/rtl_bt/rtl8761bu_fw.bin' failed: -2 root='/' root_sb=overlay:overlay
[ 199.515326] kernel_read_file_from_path_initns: currentns open path='/lib/firmware/6.18.35.2-microsoft-standard-WSL2+/rtl_bt/rtl8761bu_fw.bin' failed: -2 current_mnt_ns=4026531832/4
[ 199.515877] bluetooth hci0: loading /lib/firmware/6.18.35.2-microsoft-standard-WSL2+/rtl_bt/rtl8761bu_fw.bin failed for no such file or directory.
[ 199.516307] kernel_read_file_from_path_initns: initns open path='/lib/firmware/rtl_bt/rtl8761bu_fw.bin' current='kworker/u33:0'[7418] root='/' root_sb=overlay:overlay init_mnt_ns=4026531832/4 current_mnt_ns=4026531832/4
[ 199.517078] kernel_read_file_from_path_initns: initns open path='/lib/firmware/rtl_bt/rtl8761bu_fw.bin' failed: -2 root='/' root_sb=overlay:overlay
[ 199.517654] kernel_read_file_from_path_initns: currentns open path='/lib/firmware/rtl_bt/rtl8761bu_fw.bin' failed: -2 current_mnt_ns=4026531832/4
[ 199.518164] bluetooth hci0: loading /lib/firmware/rtl_bt/rtl8761bu_fw.bin failed for no such file or directory.
[ 199.518776] kernel_read_file_from_path_initns: initns open path='/lib/firmware/updates/6.18.35.2-microsoft-standard-WSL2+/rtl_bt/rtl8761bu_fw.bin.xz' current='kworker/u33:0'[7418] root='/' root_sb=overlay:overlay init_mnt_ns=4026531832/4 current_mnt_ns=4026531832/4
[ 199.519885] kernel_read_file_from_path_initns: initns open path='/lib/firmware/updates/6.18.35.2-microsoft-standard-WSL2+/rtl_bt/rtl8761bu_fw.bin.xz' failed: -2 root='/' root_sb=overlay:overlay
[ 199.520646] kernel_read_file_from_path_initns: currentns open path='/lib/firmware/updates/6.18.35.2-microsoft-standard-WSL2+/rtl_bt/rtl8761bu_fw.bin.xz' failed: -2 current_mnt_ns=4026531832/4
[ 199.521134] bluetooth hci0: loading /lib/firmware/updates/6.18.35.2-microsoft-standard-WSL2+/rtl_bt/rtl8761bu_fw.bin.xz failed for no such file or directory.
[ 199.522150] kernel_read_file_from_path_initns: initns open path='/lib/firmware/updates/rtl_bt/rtl8761bu_fw.bin.xz' current='kworker/u33:0'[7418] root='/' root_sb=overlay:overlay init_mnt_ns=4026531832/4 current_mnt_ns=4026531832/4
[ 199.522662] kernel_read_file_from_path_initns: initns open path='/lib/firmware/updates/rtl_bt/rtl8761bu_fw.bin.xz' failed: -2 root='/' root_sb=overlay:overlay
[ 199.523012] kernel_read_file_from_path_initns: currentns open path='/lib/firmware/updates/rtl_bt/rtl8761bu_fw.bin.xz' failed: -2 current_mnt_ns=4026531832/4
[ 199.523466] bluetooth hci0: loading /lib/firmware/updates/rtl_bt/rtl8761bu_fw.bin.xz failed for no such file or directory.
[ 199.523803] kernel_read_file_from_path_initns: initns open path='/lib/firmware/6.18.35.2-microsoft-standard-WSL2+/rtl_bt/rtl8761bu_fw.bin.xz' current='kworker/u33:0'[7418] root='/' root_sb=overlay:overlay init_mnt_ns=4026531832/4 current_mnt_ns=4026531832/4
[ 199.524405] kernel_read_file_from_path_initns: initns open path='/lib/firmware/6.18.35.2-microsoft-standard-WSL2+/rtl_bt/rtl8761bu_fw.bin.xz' failed: -2 root='/' root_sb=overlay:overlay
[ 199.524815] kernel_read_file_from_path_initns: currentns open path='/lib/firmware/6.18.35.2-microsoft-standard-WSL2+/rtl_bt/rtl8761bu_fw.bin.xz' failed: -2 current_mnt_ns=4026531832/4
[ 199.525220] bluetooth hci0: loading /lib/firmware/6.18.35.2-microsoft-standard-WSL2+/rtl_bt/rtl8761bu_fw.bin.xz failed for no such file or directory.
[ 199.525557] kernel_read_file_from_path_initns: initns open path='/lib/firmware/rtl_bt/rtl8761bu_fw.bin.xz' current='kworker/u33:0'[7418] root='/' root_sb=overlay:overlay init_mnt_ns=4026531832/4 current_mnt_ns=4026531832/4
[ 199.526063] kernel_read_file_from_path_initns: initns open path='/lib/firmware/rtl_bt/rtl8761bu_fw.bin.xz' failed: -2 root='/' root_sb=overlay:overlay
[ 199.526400] kernel_read_file_from_path_initns: currentns open path='/lib/firmware/rtl_bt/rtl8761bu_fw.bin.xz' failed: -2 current_mnt_ns=4026531832/4
[ 199.526736] bluetooth hci0: loading /lib/firmware/rtl_bt/rtl8761bu_fw.bin.xz failed for no such file or directory.
[ 199.527186] bluetooth hci0: Direct firmware load for rtl_bt/rtl8761bu_fw.bin failed with error -2
[ 199.527491] firmware_class: __free_fw_priv: fw-rtl_bt/rtl8761bu_fw.bin fw_priv=00000000ccb4a131 data=0000000000000000 size=0
[ 199.527839] Bluetooth: hci0: RTL: firmware file rtl_bt/rtl8761bu_fw not found
[ 199.531172] vhci_hcd: unlink->seqnum 37
[ 199.531374] vhci_hcd: urb->status -104
[ 199.531839] vhci_hcd: unlink->seqnum 38
[ 199.531981] vhci_hcd: urb->status -104
[ 199.534477] vhci_hcd: unlink->seqnum 39
[ 199.534621] vhci_hcd: urb->status -104
[ 600.964424] mini_init (120): drop_caches: 1
[ 990.925462] mini_init (120): drop_caches: 1
[ 1350.932284] mini_init (120): drop_caches: 1
[ 2221.084472] mini_init (120): drop_caches: 1
```
Contributor guide
Research direction
Reproduce the issue by attaching the Generic Bluetooth Adapter with usbipd in WSL2, then loading btusb and bluetooth with modprobe. Start from the btusb firmware-loading path shown in the dmesg output; done means rtl8761bu_fw.bin loads successfully and the Bluetooth device can be used in WSL2.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, ubuntu
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100