lwfinger / rtw89-BT

Out-of-kernel driver for Realtek BT devices found in rtw89 devides.
67 stars 9 forks source link

8852BE Bluetooth not working after BIOS update #12

Open kovadam69 opened 1 year ago

kovadam69 commented 1 year ago

Hi

Connected to the other issue on the wifi driver I managed to get further, at least now the BT driver is loaded and prints some info into dmesg. I discovered, that the BT product ID has been changed to b85c which was NOT present in the btusb.c. I now added it and now the lines starting with ** appeared, so the btrtl.ko is loaded now, but then it fails.

[ 24.126755] usb 1-3: new full-speed USB device number 15 using xhci_hcd [ 24.169045] usb 1-3: New USB device found, idVendor=0bda, idProduct=b85c, bcdDevice= 0.00 [ 24.169051] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 24.169053] usb 1-3: Product: Bluetooth Radio [ 24.169054] usb 1-3: Manufacturer: Realtek [ 24.169055] usb 1-3: SerialNumber: 00e04c000001 [ 24.179062] ** Entering btusb_probe, driver_info 0x0 [ 24.179066] **** output of usb_match_id 000000003893a4d1 [ 24.179068] ** driver_info 0x210000 [ 24.179074] ** configuring Realtek callbacks [ 24.194313] Entering btrtl_setup_realtek [ 24.201148] Bluetooth: hci0: RTL: HCI_OP_READ_LOCAL_VERSION failed (-71) [ 24.201155] **** btrtl_initialize failed with error -71

And because of this failure the USB ports 1-3 are restarted continuously.

Please tell me if I should try diverse things or provide additional information.

this is my lspci output

00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14b5 (rev 01) 00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Device 14b6 00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14b7 (rev 01) 00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14b7 (rev 01) 00:02.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 14ba 00:02.4 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 14ba 00:03.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14b7 (rev 01) 00:03.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 14cd 00:04.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14b7 (rev 01) 00:04.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 14cd 00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 14b7 (rev 01) 00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 14b9 (rev 10) 00:08.3 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 14b9 (rev 10) 00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 71) 00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51) 00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 1679 00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 167a 00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 167b 00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 167c 00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 167d 00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 167e 00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 167f 00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Device 1680 01:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device b852 02:00.0 Non-Volatile memory controller: Sandisk Corp WD PC SN810 / Black SN850 NVMe SSD (rev 01) 63:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Rembrandt (rev d4) 63:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Device 1640 63:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] VanGogh PSP/CCP 63:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Device 161d 63:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Device 161e 63:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor (rev 60) 63:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) HD Audio Controller 64:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] Device 161f 64:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Device 15d6 64:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Device 15d7 64:00.5 USB controller: Advanced Micro Devices, Inc. [AMD] Device 162e 64:00.6 USB controller: Advanced Micro Devices, Inc. [AMD] Device 162f

kovadam69 commented 1 year ago

For some reason with kernel 5.15.0-52 it is working without any problem:

[ 2.933741] Bluetooth: HCI device and connection manager initialized [ 2.933744] Bluetooth: HCI socket layer initialized [ 2.933746] Bluetooth: L2CAP socket layer initialized [ 2.933750] Bluetooth: SCO socket layer initialized [ 2.937563] AVX2 version of gcm_enc/dec engaged. [ 2.937607] AES CTR mode by8 optimization enabled [ 2.941730] ** Entering btusb_probe, driver_info 0x0 [ 2.941734] **** output of usb_match_id 00000000a8ad2ade [ 2.941736] ** driver_info 0x10000 [ 2.941743] ** configuring Realtek callbacks [ 2.941923] usbcore: registered new interface driver btusb [ 2.943730] Entering btrtl_setup_realtek [ 2.945544] Bluetooth: hci0: RTL: examining hci_ver=0b hci_rev=000b lmp_ver=0b lmp_subver=8852 [ 2.948455] Bluetooth: hci0: RTL: rom_version status=0 version=1 [ 2.948459] Bluetooth: hci0: RTL: loading rtl_bt/rtl8852bu_fw.bin [ 2.948955] Bluetooth: hci0: RTL: loading rtl_bt/rtl8852bu_config.bin [ 2.949065] Bluetooth: hci0: RTL: cfg_sz 14, total sz 33515 [ 2.956797] rtw8852be driver loaded [ 2.956818] rtl8852be 0000:01:00.0: enabling device (0000 -> 0003) ... [ 3.300371] rtl8852be 0000:01:00.0 wlp1s0: renamed from wlan0 [ 3.419504] Bluetooth: hci0: RTL: fw version 0xd9b744d8 [ 3.419514] **** Back from btrtl_download_firmware with ret = 0

Strange, that the "output of usb_match_id" is different with the two kernels, and the "driver_info" is also different.

ohquait commented 1 year ago

one thing let me struggle, you wrote 8852BE - this is a driver for chip/device on pcie-bus, now you will use BTusb driver - this is for chips on usb-bus, not on pci, you have added b85c to btrtl.ko, that can or should work but not in btusb.ko.... i think the IC which have the 8852be includes also the BT-part as coexisted chip - but i am unsafe now

you have to add the ID b85c on btrtl,... not btusb ?

lwfinger commented 1 year ago

The RTW8852BE is a package that contains a wifi part on the PCI bus, and a BT part that is on the USB bus. The Vendor Number for the two parts are different; however, the Device Number might be the same.

Updating the BIOS would not have changed either the PCI Id for the wifi part, nor the USB Id for the BT part. Please post the output of lsusb.

The way that the BT driver works is that btusb does ALL the device recognition, and then uses one of the parameters to determine which vendor-specific part to call. Your log output above shows it working just as it should. Drivers btusb/btrtl run the BT part.

ohquait commented 1 year ago

@lwfinger Thank You, that's make sense now for me!