Bug 208965
Summary: | not working bluetooth mouse low energy rtl8822ce | ||
---|---|---|---|
Product: | Drivers | Reporter: | fakecop (fakecop) |
Component: | Bluetooth | Assignee: | linux-bluetooth (linux-bluetooth) |
Status: | NEW --- | ||
Severity: | high | CC: | beluckydaf, david.zakarias, edwardvear, forum.viennet, francois, funtoos, gravelandmp3, julian, kernel, komar.jonathan, lcarmona, niklas97.nf, p.horta, richi11.r, vzhik83, waffen03 |
Priority: | P1 | ||
Hardware: | x86-64 | ||
OS: | Linux | ||
Kernel Version: | 5.8.1-arch1-1 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: | journalctl |
Description
fakecop
2020-08-19 20:53:14 UTC
I have similar problem. Laptop is a Huawei D14 2020 R5 with RTL8822CE. Modules loaded rtw88 and btrtl. Cannot connect to Huawei Bluetooth mouse. The ID last digits are random (:0F or :0E). I don't know if it's suppose to do that. I cannot test another mouse. I tested Bluetooth audio and in spite of working, sound break a lot, even very close to the laptop. I also managed to send files from another computer, but had trouble sending from a mobile phone. In summary, bluetooh is working but with flaws. Thanks in advance. (In reply to Paulo Horta from comment #1) > I have similar problem. Laptop is a Huawei D14 2020 R5 with RTL8822CE. > Modules loaded rtw88 and btrtl. > > Cannot connect to Huawei Bluetooth mouse. The ID last digits are random (:0F > or :0E). I don't know if it's suppose to do that. I cannot test another > mouse. > > I tested Bluetooth audio and in spite of working, sound break a lot, even > very close to the laptop. > > I also managed to send files from another computer, but had trouble sending > from a mobile phone. > > In summary, bluetooh is working but with flaws. > > Thanks in advance. Forgot to mention that I'm using kernel version 5.4.0.47 in Ubuntu and I also tested with 5.8.9. Problem persisted. This problem is affecting multiple users on ubuntu: https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/1887968 Huawei Matebook 13 2020 AMD running the 5.8.13-zen1-2-zen kernel on Arch Linux. Same problem. I added myself to the mailing list. RTL8822CE 802.11ac PCIe Wireless Network Adapter Got the same issue on Huawei Matebook 14 D 2020 AMD running 5.4.0-7642-generic on Pop_OS. Same problem here on Redmibook 16, RTL8822CE, with Microsoft Modern Mobile Mouse. On my machine (Huawei Matebook 13 2020 AMD), the btrtl driver does not seem to be used at all (btusb is used instead). The bluetooth device seem to use the 1358:c123 USB identifiers which are not listed in the blacklist table of drivers/bluetooth/btusb.c. Could this be the problem ? Note that other RTL8822CE devices with different USB vendor/device IDs are present in the blacklist table. I've patched my kernel to add the missing USB identifier and that seem to have solved the issue. I can now properly pair with a bluetooth mouse. My dmesg now shows firmware files being loaded for the device: [ 5.909847] Bluetooth: hci0: RTL: examining hci_ver=0a hci_rev=000c lmp_ver=0 a lmp_subver=8822 [ 5.912751] Bluetooth: hci0: RTL: rom_version status=0 version=3 [ 5.912754] Bluetooth: hci0: RTL: loading rtl_bt/rtl8822cu_fw.bin [ 5.918147] Bluetooth: hci0: RTL: loading rtl_bt/rtl8822cu_config.bin [ 5.918282] Bluetooth: hci0: RTL: cfg_sz 6, total sz 31422 What's the right way to go about this ? Should I submit my patch upstream ? My device ID as shown by lsusb: Bus 001 Device 002: ID 0cb5:c547 Realtek Bluetooth Radio Both btusb and btrtl is loaded but I do not see the rtl8822 firmware being loaded in the dmesg output. The wifi part of the chip works fine. I’ve submitted this patch to the linux-bluetooth mailing list: https://patchwork.kernel.org/project/bluetooth/patch/20201023231748.56519-1-julian@pidancet.net/ David, i suggest you try to apply the same patch to your system, changing the USB IDs to what you’re seeing, and see if that solves your issue. (In reply to julian from comment #11) > I’ve submitted this patch to the linux-bluetooth mailing list: > https://patchwork.kernel.org/project/bluetooth/patch/20201023231748.56519-1- > julian@pidancet.net/ > > David, i suggest you try to apply the same patch to your system, changing > the USB IDs to what you’re seeing, and see if that solves your issue. This is indeed the solution. Thanks. I tried what Julian did, but things do not work. hciconfig hci0 shows: hci0: Type: Primary Bus: USB BD Address: 80:30:49:1B:82:2C ACL MTU: 1021:6 SCO MTU: 255:12 DOWN RX bytes:2068 acl:0 sco:0 events:189 errors:0 TX bytes:32660 acl:0 sco:0 commands:189 errors:0 If I start btmon, and do sudo hciconfig hci0 up, there's a huge amount of output, and an error at the end: < HCI Command: LE Clear White List (0x08|0x0010) plen 0 #59 [hci0] 38.597768 > HCI Event: Command Complete (0x0e) plen 4 #60 [hci0] 38.599898 LE Clear White List (0x08|0x0010) ncmd 2 Status: Success (0x00) < HCI Command: LE Set Resolvable P.. (0x08|0x002e) plen 2 #61 [hci0] 38.600001 Timeout: 900 seconds > HCI Event: Command Complete (0x0e) plen 4 #62 [hci0] 38.601954 LE Set Resolvable Private Address Timeout (0x08|0x002e) ncmd 2 Status: Unsupported Remote Feature / Unsupported LMP Feature (0x1a) I'm stuck, any ideas? (In reply to david.zakarias from comment #13) > I tried what Julian did, but things do not work. Julian's solution adds a device with id 1358:c123. As I can see from your previous message yours is 0cb5:c547. Did you change the patch? Yes I did. Also, in a sense the patch worked, as the firmware is now loaded on boot. But that's the only positive thing about it, as no (remote) devices are visible and it's impossible to bring hci0 up because of the error above. Without the patch, the firmware is not loaded, remote devices ARE visible, but when I try connecting, it disconnects instantly, same org.bluez.Error.AuthenticationCanceled error as what OP is seeing. (In reply to julian from comment #11) > I’ve submitted this patch to the linux-bluetooth mailing list: > https://patchwork.kernel.org/project/bluetooth/patch/20201023231748.56519-1- > julian@pidancet.net/ > > David, i suggest you try to apply the same patch to your system, changing > the USB IDs to what you’re seeing, and see if that solves your issue. Hi, Julian, help me pls, how to apply your patch? (In reply to fakecop from comment #17) > > Hi, Julian, help me pls, how to apply your patch? I don’t think i’ll be able to help you there. Please refer to your distro’s documentation to rebuild and install a modified kernel on your system. (In reply to david.zakarias from comment #13) > I tried what Julian did, but things do not work. > > hciconfig hci0 shows: > > hci0: Type: Primary Bus: USB > BD Address: 80:30:49:1B:82:2C ACL MTU: 1021:6 SCO MTU: 255:12 > DOWN > RX bytes:2068 acl:0 sco:0 events:189 errors:0 > TX bytes:32660 acl:0 sco:0 commands:189 errors:0 > > If I start btmon, and do sudo hciconfig hci0 up, there's a huge amount of > output, and an error at the end: > > < HCI Command: LE Clear White List (0x08|0x0010) plen 0 #59 [hci0] > 38.597768 > > HCI Event: Command Complete (0x0e) plen 4 #60 [hci0] > 38.599898 > LE Clear White List (0x08|0x0010) ncmd 2 > Status: Success (0x00) > < HCI Command: LE Set Resolvable P.. (0x08|0x002e) plen 2 #61 [hci0] > 38.600001 > Timeout: 900 seconds > > HCI Event: Command Complete (0x0e) plen 4 #62 [hci0] > 38.601954 > LE Set Resolvable Private Address Timeout (0x08|0x002e) ncmd 2 > Status: Unsupported Remote Feature / Unsupported LMP Feature (0x1a) > > > I'm stuck, any ideas? Hi, I got a similar error. I have a Huawei Matebook 14 2020 with Ryzen 4600H and the same RTL8822CE. lsusb shows the following: Bus 003 Device 002: ID 1358:c123 Realtek Bluetooth Radio I applied Julians Kernel patch and can see that the firmware is loaded during boot, but bluez does not detect the controller. dmesg | grep -i bluetooth: [ 1.720939] usb 3-3: Product: Bluetooth Radio [ 3.962354] Bluetooth: Core ver 2.22 [ 3.962376] Bluetooth: HCI device and connection manager initialized [ 3.962380] Bluetooth: HCI socket layer initialized [ 3.962382] Bluetooth: L2CAP socket layer initialized [ 3.962385] Bluetooth: SCO socket layer initialized [ 4.091974] Bluetooth: hci0: RTL: examining hci_ver=0a hci_rev=000c lmp_ver=0a lmp_subver=8822 [ 4.093982] Bluetooth: hci0: RTL: rom_version status=0 version=3 [ 4.093985] Bluetooth: hci0: RTL: loading rtl_bt/rtl8822cu_fw.bin [ 4.094858] Bluetooth: hci0: RTL: loading rtl_bt/rtl8822cu_config.bin [ 4.094926] Bluetooth: hci0: RTL: cfg_sz 6, total sz 31422 [ 4.196048] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 4.196051] Bluetooth: BNEP filters: protocol multicast [ 4.196057] Bluetooth: BNEP socket layer initialized [ 4.371968] Bluetooth: hci0: RTL: fw version 0x09993aa1 Trying to bring the device up via 'hciconfig hci0 up' gives me the following error message: Can't init device hci0: Protocol not supported (93)` Does anyone have any Ideas what I can do to get this working? Is it possible that a newer firmware fixes the problem? I also have version 0x09993aa1. Julian what version do you have? Sounds reasonable. How would I update to a newer firmware version? Bluetooth: hci0: RTL: fw version 0x09993aa1 Same version here. Too bad.. As you, Julian, are the one who has been able to fix the problem for at least some people, do you have any Idea what David and I might try out to get Bluetooth working for our devices as well? I must admit I am clueless... We should probably start by comparing Laptop models and distro used to see if a pattern emerges. I’m running Ubuntu 20.04 on a Huawei Matebook 13 AMD 2020 laptop. I’ve applied my patch on top of the 5.4.0 Ubuntu kernel (linux-image-unsigned-5.4.0-52-generic). I’m happy to share the .deb files if someone wants to give it a try. (In reply to david.zakarias from comment #20) > Is it possible that a newer firmware fixes the problem? I also have version > 0x09993aa1. > Julian what version do you have? Hi David, I ran into the same Set Resolvable Private Address error with my adapter, an rtl8761b. I submitted a patch here with my understanding of the issue: https://marc.info/?l=linux-bluetooth&m=160378222632366&w=2. Could you check to see if that patch helps? I don't believe it is related to the original issue seen in this thread though. Edward, many thanks! This patch solved the issue for me, my RTL8822CE and my BT mouse now works. I'll create a oneliner patch like Julian's with my device ID. Btw this is on kernel 3.9.1. I've sent the patch, see here: https://marc.info/?l=linux-bluetooth&m=160383198717911&w=2 (In reply to Edward Vear from comment #25) > (In reply to david.zakarias from comment #20) > > Is it possible that a newer firmware fixes the problem? I also have version > > 0x09993aa1. > > Julian what version do you have? > > Hi David, > > I ran into the same Set Resolvable Private Address error with my adapter, an > rtl8761b. I submitted a patch here with my understanding of the issue: > https://marc.info/?l=linux-bluetooth&m=160378222632366&w=2. Could you check > to see if that patch helps? > > I don't believe it is related to the original issue seen in this thread > though. I had the same problem, patch worked for me. Thank you! Can confirm it now works on 5.9.1. (In reply to Edward Vear from comment #25) > (In reply to david.zakarias from comment #20) > > Is it possible that a newer firmware fixes the problem? I also have version > > 0x09993aa1. > > Julian what version do you have? > > Hi David, > > I ran into the same Set Resolvable Private Address error with my adapter, an > rtl8761b. I submitted a patch here with my understanding of the issue: > https://marc.info/?l=linux-bluetooth&m=160378222632366&w=2. Could you check > to see if that patch helps? > > I don't believe it is related to the original issue seen in this thread > though. Thanks alot! I am now able to connect to my Bluetooth mouse! Although I notice that the bluetooth adapter still behaves weird. It sometimes simply stops working and I have to unload and load the `btusb` kernel module to get the adapter working again. As for Distro/Kernel Version: I am using Manjaro and I have applied the patches on top of Kernel 5.9.3 (In reply to Niklas Frank from comment #29) > (In reply to Edward Vear from comment #25) > > (In reply to david.zakarias from comment #20) > > > Is it possible that a newer firmware fixes the problem? I also have > version > > > 0x09993aa1. > > > Julian what version do you have? > > > > Hi David, > > > > I ran into the same Set Resolvable Private Address error with my adapter, > an > > rtl8761b. I submitted a patch here with my understanding of the issue: > > https://marc.info/?l=linux-bluetooth&m=160378222632366&w=2. Could you check > > to see if that patch helps? > > > > I don't believe it is related to the original issue seen in this thread > > though. > > Thanks alot! I am now able to connect to my Bluetooth mouse! > > Although I notice that the bluetooth adapter still behaves weird. It > sometimes simply stops working and I have to unload and load the `btusb` > kernel module to get the adapter working again. > > As for Distro/Kernel Version: I am using Manjaro and I have applied the > patches on top of Kernel 5.9.3 Hi, please tell me how you managed to apply the patch?? Thanks (In reply to fakecop from comment #30) > (In reply to Niklas Frank from comment #29) > > (In reply to Edward Vear from comment #25) > > > (In reply to david.zakarias from comment #20) > > > > Is it possible that a newer firmware fixes the problem? I also have > > version > > > > 0x09993aa1. > > > > Julian what version do you have? > > > > > > Hi David, > > > > > > I ran into the same Set Resolvable Private Address error with my adapter, > > an > > > rtl8761b. I submitted a patch here with my understanding of the issue: > > > https://marc.info/?l=linux-bluetooth&m=160378222632366&w=2. Could you > check > > > to see if that patch helps? > > > > > > I don't believe it is related to the original issue seen in this thread > > > though. > > > > Thanks alot! I am now able to connect to my Bluetooth mouse! > > > > Although I notice that the bluetooth adapter still behaves weird. It > > sometimes simply stops working and I have to unload and load the `btusb` > > kernel module to get the adapter working again. > > > > As for Distro/Kernel Version: I am using Manjaro and I have applied the > > patches on top of Kernel 5.9.3 > > Hi, please tell me how you managed to apply the patch?? > Thanks You need the source code to compile a modified kernel. If you have it you could just go in and edit the file in question manually (net/bluetooth/hci_core.c) or apply the patch with the patch command if you find it easier. (In reply to fakecop from comment #30) > (In reply to Niklas Frank from comment #29) > > (In reply to Edward Vear from comment #25) > > > (In reply to david.zakarias from comment #20) > > > > Is it possible that a newer firmware fixes the problem? I also have > > version > > > > 0x09993aa1. > > > > Julian what version do you have? > > > > > > Hi David, > > > > > > I ran into the same Set Resolvable Private Address error with my adapter, > > an > > > rtl8761b. I submitted a patch here with my understanding of the issue: > > > https://marc.info/?l=linux-bluetooth&m=160378222632366&w=2. Could you > check > > > to see if that patch helps? > > > > > > I don't believe it is related to the original issue seen in this thread > > > though. > > > > Thanks alot! I am now able to connect to my Bluetooth mouse! > > > > Although I notice that the bluetooth adapter still behaves weird. It > > sometimes simply stops working and I have to unload and load the `btusb` > > kernel module to get the adapter working again. > > > > As for Distro/Kernel Version: I am using Manjaro and I have applied the > > patches on top of Kernel 5.9.3 > > Hi, please tell me how you managed to apply the patch?? > Thanks Hi, are you on Manjaro as well? As Julian already said, there is information available online on how to compile your specific distros kernel. Just do a quick google search, read the instructions, make sure you understand what the commands are doing, and follow the steps. If you are on manjaro as well, have a look at the following forum post: https://forum.manjaro.org/t/how-to-compile-patch-kernel-with-custom-alsa-driver/20326 Can confirm Edward's patch working. Realtek 8822CU on HP Probook 440 G7. Thanks :) Thanks very match, sorry my bad English. I am used arch linux and my mouse work now!! 1). I'm download source code linux (version 5.9.6) 2). Insert in PKGBUILD two patchs: onw from julian and two from Edward (thanks guys, good job) 3). Build kernel and install. (In reply to julian from comment #24) > I must admit I am clueless... > > We should probably start by comparing Laptop models and distro used to see > if a pattern emerges. > > I’m running Ubuntu 20.04 on a Huawei Matebook 13 AMD 2020 laptop. I’ve > applied my patch on top of the 5.4.0 Ubuntu kernel > (linux-image-unsigned-5.4.0-52-generic). I’m happy to share the .deb files > if someone wants to give it a try. Hi, please share .deb package. Thank you! :* Can someone please try to suspend and resume their system to see if the bluetooth keeps working for them after resume? I am running into: https://bugzilla.kernel.org/show_bug.cgi?id=210141 Hello, I've resent a patch for 1358:c123 because the previous one did not apply cleanly. The patch eventually made it into bluetooth-next. I've got no idea when it's supposed to get into mainline. (In reply to julian from comment #24) > I must admit I am clueless... > > We should probably start by comparing Laptop models and distro used to see > if a pattern emerges. > > I’m running Ubuntu 20.04 on a Huawei Matebook 13 AMD 2020 laptop. I’ve > applied my patch on top of the 5.4.0 Ubuntu kernel > (linux-image-unsigned-5.4.0-52-generic). I’m happy to share the .deb files > if someone wants to give it a try. It could be great if you can share your deb file. Thanks a lot :) Also confirming that the patch works for the realtek 8761b usb bluetooth adaptor, on all 5.9.x kernels I've patched and tested, including some fedora kernels, cd ~/rpmbuild/BUILD/kernel-5.9.fc32/linux-5.9.8-100.fc32.x86_64/net/bluetooth/ $ diff -u hci_core.c~ hci_core.c --- hci_core.c~ 2020-11-17 16:36:11.387834274 -0500 +++ hci_core.c 2020-11-26 06:35:22.422411928 -0500 @@ -763,7 +763,7 @@ hci_req_add(req, HCI_OP_LE_CLEAR_RESOLV_LIST, 0, NULL); } - if (hdev->commands[35] & 0x40) { + if (hdev->commands[35] & 0x04) { __le16 rpa_timeout = cpu_to_le16(hdev->rpa_timeout); /* Set RPA timeout */ (In reply to Steeve McCauley from comment #39) > Also confirming that the patch works for the realtek 8761b usb bluetooth > adaptor, on all 5.9.x kernels I've patched and tested, including some fedora > kernels, > > cd > ~/rpmbuild/BUILD/kernel-5.9.fc32/linux-5.9.8-100.fc32.x86_64/net/bluetooth/ > $ diff -u hci_core.c~ hci_core.c > --- hci_core.c~ 2020-11-17 16:36:11.387834274 -0500 > +++ hci_core.c 2020-11-26 06:35:22.422411928 -0500 > @@ -763,7 +763,7 @@ > hci_req_add(req, HCI_OP_LE_CLEAR_RESOLV_LIST, 0, NULL); > } > > - if (hdev->commands[35] & 0x40) { > + if (hdev->commands[35] & 0x04) { > __le16 rpa_timeout = cpu_to_le16(hdev->rpa_timeout); > > /* Set RPA timeout */ This patch does not resolve the issue of suspend/resume cycle leading to disconnected USB device and hence requiring reboot to get the bluetooth adapter back. https://bugzilla.kernel.org/show_bug.cgi?id=210141 Bug affects rtl8822cu too (and not only rtl8822ce) meloli@Asus-A17:~$ lsusb Bus 005 Device 002: ID 13d3:3548 IMC Networks Bluetooth Radio Bug report for this device here : https://bugzilla.kernel.org/show_bug.cgi?id=210453 I have the same problem with the rtl8822ce. The patch does not solve the problem completely, there remains bug after hibernation. I checked on kernel 5.9.12 Ubuntu 20.04 Huawei amd D13, problem not solved I'm happy for you and your rtl8822ce firmware... But still bluetooth not working for rtl8822cu in 5.9.12. Confirmed that worked mixing julian@blk9.net and Edward Vear patches. I have a Matebook D15 with Elementary OS and kernel 5.9.12 (now patched). Thanks a lot for all the efforts. Spent several days searching for the solution. Regards, LC @Luis: do the patches make it work with suspend-resume cycle? Are you able to see your bluetooth devices after resuming from suspend? Is it necessary to apply the patch myself ? How to do this (exact steeps) ? Thank you? I bisected the bug on the rtl8822ce here : https://bugzilla.kernel.org/show_bug.cgi?id=210453 It seems to bee the same problem linked to "rpa". meloli@Asus-A17:~/Bureau/meloli/GITBISECT/linux$ git bisect bad b2cc23398e8166b38f8715026273503b081c2a7a is the first bad commit commit b2cc23398e8166b38f8715026273503b081c2a7a Author: Sathish Narasimman <nsathish41@gmail.com> 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 <sathish.narasimman@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> include/net/bluetooth/hci.h | 2 ++ net/bluetooth/hci_core.c | 8 ++++++++ 2 files changed, 10 insertions(+) $ git checkout b2cc23398e8166b38f8715026273503b081c2a7a # give a bad kernel $ git checkout b2cc23398e8166b38f8715026273503b081c2a7a^ # give a good kernel I would say rtl8822cu (In reply to devsk from comment #46) > @Luis: do the patches make it work with suspend-resume cycle? Are you able > to see your bluetooth devices after resuming from suspend? Yes, it works with suspend and resume. So far the only details that keeps bothering a little, it is sometimes the mouse (Microsoft Modern Mobile Mouse Low Energy) stays frozen for a second or two, and then gets back to work. Happens 3 or 4 times a day, but haven't been able to cathc any error message in syslog yet. Also tested wit other two devices connected simultaneously, the mouse itself, bluetooth B&O speaker and cell phone Huawei P40 pro. That's all I've checked this last 2 weeks. Regards, Not solved in 5.10.3 Will be solved in 5.11 as said here : https://bugzilla.kernel.org/show_bug.cgi?id=210453#c10 Solved in 5.11.0-rc2 Solved in 5.10.6 (installed and tried today). Bug can be marked as solved. Olivier, Are you sure the problem is really gone in 5.10.6 ? I don't see my patch anywhere on the 5.10 branch. Yes I'm sure. meloli@Asus-A17:~$ uname -a Linux Asus-A17 5.10.6-051006-generic #202101091334 SMP Sat Jan 9 13:40:22 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux And bluetooth working. I couldn't find a corresponding change in the diffs too. Here https://bugzilla.kernel.org/show_bug.cgi?id=210279#c14 Paul Wise said : "Sudip Mukherjee requested inclusion in stable, so it will likely get into v5.10.6". And here https://bugzilla.kernel.org/show_bug.cgi?id=210279#c11 "The fix that got into bluetooth-next got into Linxu mainline: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a31489d2a368d2f9225ed6a6f595c63bc7d10de8" Olivier, This ticket is about Bluetooth not working on certain laptop models using a RTL8822CE device because the firmware does not get loaded. The fix for this bug is there: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/bluetooth/btusb.c?id=f496297e76a69db7b52257898570bd38b8b9c92b The change you refer to is a fix for a different bug that some of the users experienced while testing the patch above. OK. Sorry for the mistake. :) |