Bug 210279 - Bluetooth regression in kernel 5.9.x for Realtek RTL8822CE
Summary: Bluetooth regression in kernel 5.9.x for Realtek RTL8822CE
Status: NEW
Alias: None
Product: Networking
Classification: Unclassified
Component: Wireless (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: networking_wireless@kernel-bugs.osdl.org
URL:
Keywords:
: 210453 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-11-20 12:50 UTC by Mike Cloaked
Modified: 2021-04-06 12:55 UTC (History)
5 users (show)

See Also:
Kernel Version: 5.9.9-arch1-1
Subsystem:
Regression: No
Bisected commit-id:


Attachments
Journal log with realtek rtl8822ce bluetooth fail (389.64 KB, text/plain)
2020-11-22 21:33 UTC, Mike Cloaked
Details

Description Mike Cloaked 2020-11-20 12:50:09 UTC
Running arch linux, Bluetooth no longer works for the dual wireless/BT card:

01:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8822CE 802.11ac PCIe Wireless Network Adapter
        DeviceName: WLAN
        Subsystem: Hewlett-Packard Company Device 85f7
        Kernel driver in use: rtw_8822ce
        Kernel modules: rtw88_8822ce

$ sudo systemctl start bluetooth
[mike@ryzen1 ~]$ sudo systemctl status bluetooth
● bluetooth.service - Bluetooth service
     Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; disabled; vendor preset: disabled)
     Active: active (running) since Fri 2020-11-20 12:40:17 GMT; 8s ago
       Docs: man:bluetoothd(8)
   Main PID: 4049 (bluetoothd)
     Status: "Running"
      Tasks: 1 (limit: 18427)
     Memory: 1.8M
     CGroup: /system.slice/bluetooth.service
             └─4049 /usr/lib/bluetooth/bluetoothd

Nov 20 12:40:17 ryzen1 bluetoothd[4049]: src/main.c:parse_controller_config() Key file does not have key “LEScanWindowAdvMonitor” in group “Controller”
Nov 20 12:40:17 ryzen1 bluetoothd[4049]: src/main.c:parse_controller_config() Key file does not have key “LEScanIntervalConnect” in group “Controller”
Nov 20 12:40:17 ryzen1 bluetoothd[4049]: src/main.c:parse_controller_config() Key file does not have key “LEScanWindowConnect” in group “Controller”
Nov 20 12:40:17 ryzen1 bluetoothd[4049]: src/main.c:parse_controller_config() Key file does not have key “LEMinConnectionInterval” in group “Controller”
Nov 20 12:40:17 ryzen1 bluetoothd[4049]: src/main.c:parse_controller_config() Key file does not have key “LEMaxConnectionInterval” in group “Controller”
Nov 20 12:40:17 ryzen1 bluetoothd[4049]: src/main.c:parse_controller_config() Key file does not have key “LEConnectionLatency” in group “Controller”
Nov 20 12:40:17 ryzen1 bluetoothd[4049]: src/main.c:parse_controller_config() Key file does not have key “LEConnectionSupervisionTimeout” in group “Controller”
Nov 20 12:40:17 ryzen1 bluetoothd[4049]: src/main.c:parse_controller_config() Key file does not have key “LEAutoconnecttimeout” in group “Controller”
Nov 20 12:40:17 ryzen1 bluetoothd[4049]: Starting SDP server
Nov 20 12:40:17 ryzen1 bluetoothd[4049]: Bluetooth management interface 1.18 initialized

$ bluetoothctl
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# power on
No default controller available

$ lspci -knn | grep Net -A3
01:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8822CE 802.11ac PCIe Wireless Network Adapter [10ec:c822]
        DeviceName: WLAN
        Subsystem: Hewlett-Packard Company Device [103c:85f7]
        Kernel driver in use: rtw_8822ce

There is no apparent way to work around this in order to connect bluetooth devices.

and from lspci -knn

01:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8822CE 802.11ac PCIe Wireless Network Adapter [10ec:c822]
        DeviceName: WLAN
        Subsystem: Hewlett-Packard Company Device [103c:85f7]
        Kernel driver in use: rtw_8822ce
        Kernel modules: rtw88_8822ce
Comment 1 Mike Cloaked 2020-11-22 21:33:02 UTC
Created attachment 293781 [details]
Journal log with realtek rtl8822ce bluetooth fail
Comment 2 Mike Cloaked 2020-11-22 21:41:47 UTC
I saw that another user built a current kernel with the patch at https://marc.info/?l=linux-bluetooth&m=160378222632366&w=2 and has the same  Realtek chip now working for bluetooth.  Is it known which version of upcoming kernel will have this patch included?
Comment 3 Andy Green 2020-11-23 05:54:30 UTC
Also same issue on recent HP AMD laptop with this chipset, working on 5.8, broken on 5.9 through at least 5.10-rc4 (tried last week) on Fedora.

The patch on comment #2 was posted on linux-bluetooth end Oct and didn't seem to get any attention / replies on the ml.
Comment 4 Mike Cloaked 2020-11-23 09:08:40 UTC
One arch linux user has applied the patch in comment #2 and rebuilt his kernel which seems to have fixed it. See https://bbs.archlinux.org/viewtopic.php?pid=1939186#p1939186 so hopefully this patch will get into mainline before long since the bluetooth radio is completely inoperative until the kernel is patched for this chipset.
Comment 5 Mike Cloaked 2020-11-25 17:22:58 UTC
This patch has not been applied to bluetooth next tree - https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/
Comment 6 Andy Green 2020-11-25 17:55:58 UTC
Thanks for the tip... let's hope we don't have too long to wait... really it needs to go on kernel -stable too since it's broken all through 5.9 and to date on 5.10-rc
Comment 8 Mike Cloaked 2020-11-26 20:11:13 UTC
I have a kernel built with the patch included to test my Realtek rtl8822ce radio.

[mike@ryzen1 ~]$ uname -r
5.9.11-2-stable

Tested bluetooth with this kernel that includes the patch:

[mike@ryzen1 ~]$ sudo systemctl start bluetooth
[mike@ryzen1 ~]$ bluetoothctl
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# power on
[CHG] Controller xx:xx:xx:xx:xx:xx Class: 0x003c0000
Changing power on succeeded
[CHG] Controller xx:xx:xx:xx:xx:xx Powered: yes
[bluetooth]#

So the BT radio now powers on, where previously it would not. After that I was able to pair and connect the bluetooth ear buds, and they work normally with audio. If the patch was included in arch kernel builds until it reaches the upstream released kernel tree, that would help all users running the same chipset to have bluetooth working much earlier.

Hopefully the patch will have a short journey from bluetooth-next into mainline.
Comment 9 devsk 2020-11-28 19:03:50 UTC
Can someone who has applied the patch and has this adapter working, please suspend and resume, and see if the adapter disappears after resume? I am running into this after applying the patch:

https://bugzilla.kernel.org/show_bug.cgi?id=210141
Comment 10 Olivier V 2020-12-20 12:24:47 UTC
I had the same problem but on rtl8822cu device reported here https://bugzilla.kernel.org/show_bug.cgi?id=210453

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 on my rtl8822cu device, with suspend and resume too.

Please add the patch to next kernel.
Comment 11 Paul Wise 2021-01-04 15:54:23 UTC
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
Comment 12 Paul Wise 2021-01-04 15:55:00 UTC
Looks like 5.11 will be the first release containing the commit, unless someone requests adding it to stable.
Comment 13 Olivier V 2021-01-04 19:43:40 UTC
Solved in 5.11.0-rc2
Comment 14 Paul Wise 2021-01-05 01:33:02 UTC
Sudip Mukherjee requested inclusion in stable, so it will likely get into v5.10.6
Comment 15 Paul Wise 2021-01-07 02:16:07 UTC
Sudip mentioned it has been queued for Linux v5.10.6 too.
Comment 16 Olivier V 2021-01-10 08:07:37 UTC
Solved in 5.10.6 (installed and tried today).

Bug can be marked as solved.
Comment 17 Olivier V 2021-01-10 08:08:40 UTC
*** Bug 210453 has been marked as a duplicate of this bug. ***
Comment 18 Arsphl 2021-04-06 12:55:04 UTC
I have the same issue with v5.11.11

uname -r
5.11.11-100.fc32.x86_64

bluetoothctl
Agent registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# power on
No default controller available
[bluetooth]# exit

sudo lspci -knn | grep Net -A3
04:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8822BE 802.11a/b/g/n/ac WiFi adapter [10ec:b822]
	Subsystem: Lenovo Device [17aa:b024]
	Kernel driver in use: rtw_8822be
	Kernel modules: rtw88_8822be

Note You need to log in before you can comment on or make changes to this bug.