rtl8761b usb bluetooth doesn't work following reboot until unplug/replug

Bug #1968604 reported by Olga
36
This bug affects 6 people
Affects Status Importance Assigned to Milestone
linux-firmware (Ubuntu)
Confirmed
Undecided
Unassigned
Jammy
Fix Released
Undecided
Unassigned
Kinetic
Fix Released
Undecided
Unassigned
Lunar
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

I have usb bluetooth 5.0 dongle which uses Realtek RTL8761B chip.
0bda:8771 Realtek Semiconductor Corp. Bluetooth Radio

USB adapter very often stops working, can't connect or find other bluetooth devices. The adapter can't work even after reboots.

The following entries appear in the log:
апр 11 13:47:14 desktop kernel: Bluetooth: hci0: command 0x2005 tx timeout
апр 11 13:47:16 desktop kernel: Bluetooth: hci0: command 0x2041 tx timeout
апр 11 13:47:18 desktop kernel: Bluetooth: hci0: command 0x2042 tx timeout

Firmware loaded correctly, but something is not working.
апр 11 13:46:54 desktop kernel: Bluetooth: hci0: RTL: examining hci_ver=0a hci_rev=000b lmp_ver=0a lmp_subver=8761
апр 11 13:46:54 desktop kernel: Bluetooth: hci0: RTL: rom_version status=0 version=1
апр 11 13:46:54 desktop kernel: Bluetooth: hci0: RTL: loading rtl_bt/rtl8761bu_fw.bin
апр 11 13:46:54 desktop kernel: Bluetooth: hci0: RTL: loading rtl_bt/rtl8761bu_config.bin
апр 11 13:46:54 desktop kernel: Bluetooth: hci0: RTL: cfg_sz 6, total sz 27814

1) I use:
Description: Ubuntu Jammy Jellyfish (development branch)
Release: 22.04
2) linux-firmware: 20220329.git681281e4-0ubuntu1
3) What you expected to happen? I expect a well working bluetooth adapter.
4) What happened instead? My bluetooth adapter may work, may not. The adapter may stop finding and connecting to other devices.

I've found the same bug https://bugzilla.kernel.org/show_bug.cgi?id=214111#c1
I've downloaded Windows's archive http://download.windowsupdate.com/d/msdownload/update/driver/drvs/2021/05/ca0e770c-6a5d-4de0-b37a-f4b91cccd8c3_7778831d2b9d721cf94d5a8d8c0676ff1b96c874.cab
I've unpacked file rtl8761b_mp_chip_bt40_fw_asic_rom_patch_new.dll and replaced /usr/lib/firmware/rtl_bt/rtl8761bu_fw.bin and deleted rtl8761bu_config.bin
After I changed firmware my usb dongle work fine.

Could you change firmware rtl8761bu_fw.bin rtl8761bu_config.bin to other correct version?
Could you move Realtek's rtl_bt firmware or RTL8761B's firmware into separate packages. I will remove the RTL8761B firmware package and put them manually.

bluetoothctl --version
bluetoothctl: 5.64

hci0: Type: Primary Bus: USB
        BD Address: 00:E0:4C:FC:E2:03 ACL MTU: 1021:6 SCO MTU: 255:12
        UP RUNNING
        RX bytes:5751 acl:49 sco:0 events:489 errors:0
        TX bytes:219114 acl:398 sco:0 commands:83 errors:0
        Features: 0xff 0xff 0xff 0xfe 0xdb 0xfd 0x7b 0x87
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy: RSWITCH HOLD SNIFF PARK
        Link mode: PERIPHERAL ACCEPT
        Name: 'desktop'
        Class: 0x7c0104
        Service Classes: Rendering, Capturing, Object Transfer, Audio, Telephony
        Device Class: Computer, Desktop workstation
        HCI Version: 5.1 (0xa) Revision: 0x97b
        LMP Version: 5.1 (0xa) Subversion: 0xec43
        Manufacturer: Realtek Semiconductor Corporation (93)

rfkill list
0: hci0: Bluetooth
        Soft blocked: no
        Hard blocked: no

Realtek's worker updated these bad firmware.
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=45dc5f0b8e2f2d43312d22511cb26658b9ee2c80

[Test Case]

Connect to and use a bluetooth device connected to a RTL8761B base USB BT controller.

[Fix]

Use latest rtl8761bu firmware blobs updates from linux-firmware.

[Where Problems Could Occur]

These firmwares are specific for the rtl8671b chips. So users of USB or UART BT controllers based on that chip could see problems when trying to connect to and use bluetooth devices.

Olga (xlnk)
description: updated
Juerg Haefliger (juergh)
tags: added: kern-2931
Revision history for this message
Bert RAM Aerts (bert.ram.aerts) wrote :

The firmware is NOT loaded correctly... the "bu" file is loaded instead of the "b"

I used to have Ubuntu 21.10 and my Bluetooth USB dongle was loading rtl8761b_fw.bin.
Last week I upgraded to Ubuntu 22.04 and since then I can not use my USB dongle, it connects my Sony headphones and immediately disconnects, connects, disconnects, ...
Using sudo dmesg | grep Bluetooth, I saw
[ 10.106036] Bluetooth: hci0: RTL: examining hci_ver=0a hci_rev=000b lmp_ver=0a lmp_subver=8761
[ 10.107035] Bluetooth: hci0: RTL: rom_version status=0 version=1
[ 10.107038] Bluetooth: hci0: RTL: loading rtl_bt/rtl8761bu_fw.bin
[ 10.108050] Bluetooth: hci0: RTL: loading rtl_bt/rtl8761bu_config.bin
[ 10.108170] Bluetooth: hci0: RTL: cfg_sz 6, total sz 27814
So kernel 5.15 loads different firmware rtl8761bu instead of rtl8761b used by kernel 5.13 in Ubuntu 21.10.
I guess this is a kernel bug.

As a workaround I made symbolic links and now my Bluetooth USB dongle works fine:
/lib/firmware/rtl_bt$ ls -al *8761*
lrwxrwxrwx 1 root root 19 Apr 10 06:32 rtl8761bu_config.bin -> rtl8761b_config.bin
lrwxrwxrwx 1 root root 15 Apr 10 06:32 rtl8761bu_fw.bin -> rtl8761b_fw.bin

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux-firmware (Ubuntu):
status: New → Confirmed
Revision history for this message
Juerg Haefliger (juergh) wrote :

There are two different chip versions: rtl8761btv and rtl8761buv. 'btv' is UART attached, 'buv' is USB attached. Kernel 5.15 is correct in that it loads the 'bu' firmware for your USB dongle. 5.13 is wrong. But might be that the firmware blobs are named incorrectly. Need to dig some more and probably get my hands on one of those dongles.

Revision history for this message
Bert RAM Aerts (bert.ram.aerts) wrote :

Update on Ubuntu 22.10 beta with kernel 5.19
Same issue as kernel 5.15 and same solution with symbolic links so that "bu" is in fact "b".

Revision history for this message
lendis (zakirovr90) wrote :

Same here, in Linux mint 21.3, @bert.ram.aerts thanks for workaround!

Revision history for this message
Jeffrey Walton (noloader) wrote :

Also see https://fosspost.org/fix-bluetooth-rtl8761b-problem-on-linux-ubuntu-22-04/. From the article:

<SNIP>
This happens because the rtl8761bu firmware is being requested, but the system should have loaded the rtl8761b firmware, not the rtl8761bu one. The latter may not even exist on your system.

To fix this issue, luckily we don’t need to install or download anything! We just need to create a simple symbolic link to link rtl8761bu driver firmware to rtl8761b one. In this way, any time our system requests the rtl8761bu files it will be instead served the correct rtl8761b ones.

We can do it by applying the following commands in the terminal:

cd /lib/firmware/rtl_bt
sudo ln -s rtl8761b_config.bin rtl8761bu_config.bin
sudo ln -s rtl8761b_fw.bin rtl8761bu_fw.bin

After it, just remove the Bluetooth 5.0 adapter from the computer and plug it again (no restart required), and this time, it should be working.
</SNIP>

Revision history for this message
Juerg Haefliger (juergh) wrote :

Even though all the documentation suggests otherwise, it does look like the driver loads the wrong firmware (or the firmware names as incorrect). I've contacted realtek, we'll see where that goes...

Revision history for this message
Juerg Haefliger (juergh) wrote :

Realtek promised to release new FW for RT8761 since what is currently in kernel.org linux-firmware is over 2 years old.

Juerg Haefliger (juergh)
Changed in linux-firmware (Ubuntu):
status: Confirmed → Incomplete
status: Incomplete → Confirmed
Revision history for this message
Bert RAM Aerts (bert.ram.aerts) wrote :

Update on Ubuntu 23.04 beta with kernel 6.2
Bluetooth works out of the box, no need for the earlier symbolic links anymore!
So the rtl8761bu is now used and works with my USB dongle.

Revision history for this message
Bert RAM Aerts (bert.ram.aerts) wrote :

New firmware available on
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/commit/?id=1de22a39246513ce431de0971a6376093a94c5c1
Release Version: 0xDFC6_D922
Again rtl8761bu is working fine with my USB dongle.

Juerg Haefliger (juergh)
no longer affects: linux-firmware (Ubuntu Focal)
Changed in linux-firmware (Ubuntu Jammy):
status: New → Confirmed
Changed in linux-firmware (Ubuntu Lunar):
status: New → Confirmed
no longer affects: linux-firmware (Ubuntu Mantic)
Juerg Haefliger (juergh)
description: updated
Juerg Haefliger (juergh)
Changed in linux-firmware (Ubuntu Jammy):
status: Confirmed → Fix Committed
Changed in linux-firmware (Ubuntu Kinetic):
status: New → Fix Committed
Changed in linux-firmware (Ubuntu Lunar):
status: Confirmed → Fix Committed
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Olga, or anyone else affected,

Accepted linux-firmware into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/linux-firmware/20220329.git681281e4-0ubuntu3.14 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello Olga, or anyone else affected,

Accepted linux-firmware into kinetic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/linux-firmware/20220923.gitf09bebf3-0ubuntu1.7 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-kinetic to verification-done-kinetic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-kinetic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello Olga, or anyone else affected,

Accepted linux-firmware into lunar-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/linux-firmware/20230323.gitbcdcfbcf-0ubuntu1.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-lunar to verification-done-lunar. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-lunar. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

hi, it's been a week, please test the update

Revision history for this message
Juerg Haefliger (juergh) wrote :

I've done some limited testing with a USB dongle that has that chip and was able to establish a BT connection.

tags: added: verification-done-jammy verification-done-kinetic verification-done-lunar
Revision history for this message
Robie Basak (racb) wrote :

Which package builds of linux-firmware did you test please? All three? Just one?

Revision history for this message
Juerg Haefliger (juergh) wrote :

Sorry, missed your comment/question.

I've tested Lunar (20230323.gitbcdcfbcf-0ubuntu1.2) and Jammy (20220329.git681281e4-0ubuntu3.14) and verified that I can establish a Bluetooth connection using the new firmware.

Revision history for this message
Juerg Haefliger (juergh) wrote :

I'm fairly certain I've run the test for kinetic (20220923.gitf09bebf3-0ubuntu1.7) as well but can't find my notes. Let me redo it.

Revision history for this message
Juerg Haefliger (juergh) wrote :

OK, verified that I can establish a bluetooth connection on Kinetic with 20220923.gitf09bebf3-0ubuntu1.7.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-firmware - 20230323.gitbcdcfbcf-0ubuntu1.2

---------------
linux-firmware (20230323.gitbcdcfbcf-0ubuntu1.2) lunar; urgency=medium

  * rtl8761b usb bluetooth doesn't work following reboot until unplug/replug (LP: #1968604)
    - rtl_bt: Update RTL8761B BT UART firmware to 0x9DC6_D922
    - rtl_bt: Update RTL8761B BT USB firmware to 0xDFC6_D922

 -- Juerg Haefliger <email address hidden> Mon, 05 Jun 2023 09:22:50 +0200

Changed in linux-firmware (Ubuntu Lunar):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for linux-firmware has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-firmware - 20220923.gitf09bebf3-0ubuntu1.7

---------------
linux-firmware (20220923.gitf09bebf3-0ubuntu1.7) kinetic; urgency=medium

  * rtl8761b usb bluetooth doesn't work following reboot until unplug/replug (LP: #1968604)
    - rtl_bt: Update RTL8761B BT UART firmware to 0x9DC6_D922
    - rtl_bt: Update RTL8761B BT USB firmware to 0xDFC6_D922

 -- Juerg Haefliger <email address hidden> Mon, 05 Jun 2023 09:29:22 +0200

Changed in linux-firmware (Ubuntu Kinetic):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-firmware - 20220329.git681281e4-0ubuntu3.14

---------------
linux-firmware (20220329.git681281e4-0ubuntu3.14) jammy; urgency=medium

  * rtl8761b usb bluetooth doesn't work following reboot until unplug/replug (LP: #1968604)
    - rtl_bt: Update RTL8761B BT UART firmware to 0x9DC6_D922
    - rtl_bt: Update RTL8761B BT USB firmware to 0xDFC6_D922

 -- Juerg Haefliger <email address hidden> Mon, 05 Jun 2023 09:32:37 +0200

Changed in linux-firmware (Ubuntu Jammy):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.