Bluetooth : No device found (rtl8822cu)

Bug #1906515 reported by Olivier V
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linux
Unknown
Unknown
linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Hi,

The bluetooth with device rtl8822cu does not work with 5.9.12 mainline kernel (and all 5.9 kernel).

Before it worked fine with 5.8.0 mainline kernel.

A similar problem was solved for rl8822ce in 5.9.11 kernel by arch.
Discussion here : https://bbs.archlinux.org/viewtopic.php?pid=1940003#p1940003

meloli@Asus-A17:~$ sudo dmesg | grep -i bluetooth
[ 1.476073] usb 5-1: Product: Bluetooth Radio
[ 3.977975] Bluetooth: Core ver 2.22
[ 3.978022] Bluetooth: HCI device and connection manager initialized
[ 3.978030] Bluetooth: HCI socket layer initialized
[ 3.978035] Bluetooth: L2CAP socket layer initialized
[ 3.978043] Bluetooth: SCO socket layer initialized
[ 4.002039] Bluetooth: hci0: RTL: examining hci_ver=0a hci_rev=000c lmp_ver=0a lmp_subver=8822
[ 4.003996] Bluetooth: hci0: RTL: rom_version status=0 version=3
[ 4.004001] Bluetooth: hci0: RTL: loading rtl_bt/rtl8822cu_fw.bin
[ 4.006885] Bluetooth: hci0: RTL: loading rtl_bt/rtl8822cu_config.bin
[ 4.007705] Bluetooth: hci0: RTL: cfg_sz 6, total sz 31422
[ 4.283989] Bluetooth: hci0: RTL: fw version 0x09993aa1
[ 4.933204] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 4.933207] Bluetooth: BNEP filters: protocol multicast
[ 4.933214] Bluetooth: BNEP socket layer initialized
[ 1422.650815] Bluetooth: hci0: RTL: examining hci_ver=0a hci_rev=000c lmp_ver=0a lmp_subver=8822
[ 1422.652695] Bluetooth: hci0: RTL: rom_version status=0 version=3
[ 1422.652725] Bluetooth: hci0: RTL: loading rtl_bt/rtl8822cu_fw.bin
[ 1422.652877] Bluetooth: hci0: RTL: loading rtl_bt/rtl8822cu_config.bin
[ 1422.653058] Bluetooth: hci0: RTL: cfg_sz 6, total sz 31422
[ 1422.931399] Bluetooth: hci0: RTL: fw version 0x09993aa1
[ 1632.862056] Bluetooth: hci0: RTL: examining hci_ver=0a hci_rev=0999 lmp_ver=0a lmp_subver=3aa1
[ 1632.862064] Bluetooth: hci0: RTL: unknown IC info, lmp subver 3aa1, hci rev 0999, hci ver 000a
[ 1632.862065] Bluetooth: hci0: RTL: assuming no firmware upload needed
meloli@Asus-A17:~$ lsmod|grep blue
bluetooth 647168 12 btrtl,btintel,btbcm,bnep,btusb
ecdh_generic 16384 1 bluetooth

meloli@Asus-A17:~$ lsusb
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 002: ID 13d3:3548 IMC Networks Bluetooth Radio
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 0951:1666 Kingston Technology DataTraveler 100 G3/G4/SE9 G2
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 13d3:56a2 IMC Networks USB2.0 HD UVC WebCam
Bus 003 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

meloli@Asus-A17:~$ rfkill list all
1: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no
3: hci0: Bluetooth
        Soft blocked: no
        Hard blocked: no
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu27.13
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: KDE
DistroRelease: Ubuntu 20.04
InstallationDate: Installed on 2020-09-18 (75 days ago)
InstallationMedia: Kubuntu 20.04.1 LTS "Focal Fossa" - Release amd64 (20200731)
NonfreeKernelModules: nvidia_modeset nvidia
Package: linux (not installed)
Tags: focal
Uname: Linux 5.9.12-050912-generic x86_64
UnreportableReason: The running kernel is not an Ubuntu kernel
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lp lpadmin lxd plugdev sambashare sudo vboxusers
_MarkForUpload: True

Revision history for this message
Olivier V (forum-viennet) wrote :
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1906515

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Olivier V (forum-viennet) wrote : ProcCpuinfoMinimal.txt

apport information

tags: added: apport-collected focal
description: updated
Revision history for this message
Olivier V (forum-viennet) wrote : ProcEnviron.txt

apport information

Revision history for this message
Olivier V (forum-viennet) wrote :

As asked by the automatic bug report, I opened a bug report on bugzilla :
https://bugzilla.kernel.org/show_bug.cgi?id=203429

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Olivier V (forum-viennet) wrote :

Something about patches here :
http://patchwork.ozlabs.org/project/ubuntu-kernel/list/?series=138556

But I don't understand how to do something with this.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :
Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Olivier V (forum-viennet) wrote :

Always the same problem with 5.10-rc6 : "No Bluetooth found. Plug in a dongle to use Bluetooth."

Here some log where is seems to be better but always the same problem.

meloli@Asus-A17:~$ uname -a
Linux Asus-A17 5.10.0-051000rc6-generic #202011291930 SMP Mon Nov 30 00:36:46 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
meloli@Asus-A17:~$ sudo dmesg | grep -i bluetooth
[sudo] Mot de passe de meloli :
[ 1.427049] usb 5-1: Product: Bluetooth Radio
[ 4.311930] Bluetooth: Core ver 2.22
[ 4.311977] Bluetooth: HCI device and connection manager initialized
[ 4.311986] Bluetooth: HCI socket layer initialized
[ 4.311991] Bluetooth: L2CAP socket layer initialized
[ 4.311999] Bluetooth: SCO socket layer initialized
[ 4.449104] Bluetooth: hci0: RTL: examining hci_ver=0a hci_rev=000c lmp_ver=0a lmp_subver=8822
[ 4.451088] Bluetooth: hci0: RTL: rom_version status=0 version=3
[ 4.451095] Bluetooth: hci0: RTL: loading rtl_bt/rtl8822cu_fw.bin
[ 4.452278] Bluetooth: hci0: RTL: loading rtl_bt/rtl8822cu_config.bin
[ 4.452444] Bluetooth: hci0: RTL: cfg_sz 6, total sz 31422
[ 4.730160] Bluetooth: hci0: RTL: fw version 0x09993aa1
[ 5.552103] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 5.552105] Bluetooth: BNEP filters: protocol multicast
[ 5.552110] Bluetooth: BNEP socket layer initialized

Revision history for this message
Olivier V (forum-viennet) wrote :

And as I say in the first post it always works with 5.8 kernel, so it necessary a kernel/software problem.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Can you please do a kernel bisect and find the regression commit?

Revision history for this message
Olivier V (forum-viennet) wrote :

I'm happy to help but what you ask is beyond my knowledge.
Can you explain exactly what I should do ?

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Would it be possible for you to do a kernel bisection?

First, find the last -rc kernel works and the first -rc kernel doesn’t work from http://kernel.ubuntu.com/~kernel-ppa/mainline/

Then,
$ sudo apt build-dep linux
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
$ cd linux
$ git bisect start
$ git bisect good $(the working version you found)
$ git bisect bad $(the non-working version found)
$ make localmodconfig
$ make -j`nproc` deb-pkg
Install the newly built kernel, then reboot with it.
If it still have the same issue,
$ git bisect bad
Otherwise,
$ git bisect good
Repeat to "make -j`nproc` deb-pkg" until you find the offending commit.

Revision history for this message
Olivier V (forum-viennet) wrote :

The last working kernel is in the 5.8.* family.
I will search which version exactly and do this this afternoon.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Please just try -rc* kernel.

Suppose v5.8 is good and v5.9-rc1 is bad:
$ git bisect good v5.8
$ git bisect bad v5.9-rc1

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Please only test -rc kernel and use them as target version.

Revision history for this message
Olivier V (forum-viennet) wrote :

Ok with the latest 5.8-rc7 it works. I need to try this kernel... and come back...

meloli@Asus-A17:~/linux$ git bisect good v5.8-rc7

Revision history for this message
Olivier V (forum-viennet) wrote :

I've tried again and I don't have this question again...

meloli@Asus-A17:~/GITBISECT/linux$ git bisect start
meloli@Asus-A17:~/GITBISECT/linux$ git bisect bad v5.10-rc6
meloli@Asus-A17:~/GITBISECT/linux$ git bisect good v5.8-rc7
Bissection : 16604 révisions à tester après ceci (à peu près 14 étapes)
[033e4040d453f1f7111e5957a54f3019eb089cc6] ALSA: hda - Fix the return value if cb func is already registered

I now continue the process...

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

No that makes the range too large.

Please just try v5.8-rc7 and v5.9-rc1.

Revision history for this message
Olivier V (forum-viennet) wrote :

I tried again from fresh git clone.
First kernel build works fine and give me a "good" bisect.

But second compilation give many errors.
What is wrong ?

Below the steps :

meloli@Asus-A17:~/GITBISECT$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
...
meloli@Asus-A17:~/GITBISECT$ cd linux
meloli@Asus-A17:~/GITBISECT/linux$ git bisect start
meloli@Asus-A17:~/GITBISECT/linux$ git bisect good v5.8-rc7
meloli@Asus-A17:~/GITBISECT/linux$ git bisect bad v5.9-rc1
Bissection : 7733 révisions à tester après ceci (à peu près 13 étapes)
[8186749621ed6b8fc42644c399e8c755a2b6f630] Merge tag 'drm-next-2020-08-06' of git://anongit.freedesktop.org/drm/drm
meloli@Asus-A17:~/GITBISECT/linux$ make localmodconfig

---> Some questions here... I only give "Enter" for response on the keyboard.

meloli@Asus-A17:~/GITBISECT/linux$ make -j`nproc` deb-pkg

---> Install the new kernel and reboot on it. Bluetooth OK so :

meloli@Asus-A17:~/GITBISECT/linux$ git bisect good

---> Some questions here... I only give "Enter" for response on the keyboard.

meloli@Asus-A17:~/GITBISECT/linux$ make -j`nproc` deb-pkg

---> Many compilations errors

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

What error? Can you please paste it here?

Revision history for this message
Olivier V (forum-viennet) wrote :

I finished the process after 13 kernel compilation.

Here is the last output.

What should I do now ?

meloli@Asus-A17:~/Bureau/meloli/GITBISECT/linux$ git bisect bad
b2cc23398e8166b38f8715026273503b081c2a7a is the first bad commit
commit b2cc23398e8166b38f8715026273503b081c2a7a
Author: Sathish Narasimman <email address hidden>
Date: Thu Jul 23 18:09:02 2020 +0530

    Bluetooth: Enable RPA Timeout

    Enable RPA timeout during bluetooth initialization.
    The RPA timeout value is used from hdev, which initialized from
    debug_fs

    Signed-off-by: Sathish Narasimman <email address hidden>
    Signed-off-by: Marcel Holtmann <email address hidden>

 include/net/bluetooth/hci.h | 2 ++
 net/bluetooth/hci_core.c | 8 ++++++++
 2 files changed, 10 insertions(+)

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

$ git checkout b2cc23398e8166b38f8715026273503b081c2a7a
# build kernel and test, make sure it's bad

$ git checkout b2cc23398e8166b38f8715026273503b081c2a7a^
# build kernel and test, make sure it's good

If we are sure b2cc23398e8166b38f8715026273503b081c2a7a is the offending commit, let's report back to upstream.

Revision history for this message
Olivier V (forum-viennet) wrote :

I have built the 2 kernels and can confirm that b2cc23398e8166b38f8715026273503b081c2a7a is the offending commit.

I have already opened a bug report here :
https://bugzilla.kernel.org/show_bug.cgi?id=210453

Is this the good way ?
What should I add more ?

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Well, it should be good enough. Using the mailing list may have better awareness though.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Olivier V (forum-viennet) wrote :

I compiled 5.10 kernel downloaded here git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
and applied the patch given here https://marc.info/?l=linux-bluetooth&m=160378222632366&w=2.

I works perfectly, with suspend and resume too.

This bug is duplicate from :
https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/1887968
https://bugzilla.kernel.org/show_bug.cgi?id=210279

To solve the bug it is only necessary to add the patch to the next kernel.

Revision history for this message
Olivier V (forum-viennet) wrote :

Solved in 5.11.0-rc2

Revision history for this message
Olivier V (forum-viennet) wrote :

Solved in 5.10.6 (installed and tried today).

Bug can be marked as solved.

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.