linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bug 214823] New: RTL8821CE Bluetooth adapter randomly stopped working, only suspend then resume can reset it
@ 2021-10-26  9:08 bugzilla-daemon
  2021-11-06 15:29 ` [Bug 214823] " bugzilla-daemon
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: bugzilla-daemon @ 2021-10-26  9:08 UTC (permalink / raw)
  To: linux-bluetooth

https://bugzilla.kernel.org/show_bug.cgi?id=214823

            Bug ID: 214823
           Summary: RTL8821CE Bluetooth adapter randomly stopped working,
                    only suspend then resume can reset it
           Product: Drivers
           Version: 2.5
    Kernel Version: 5.14.14
          Hardware: All
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: high
          Priority: P1
         Component: Bluetooth
          Assignee: linux-bluetooth@vger.kernel.org
          Reporter: thanhdatwarriorok@gmail.com
        Regression: No

Tried to downgrade rtl8821c version, bluetooth adapter still randomly stop
working

The only fix I found was to suspend then resume, restarting doesn't help

~ > sudo dmesg | grep 'Bluetooth: hci'
[sudo] password for nellowly:
[   32.269597] Bluetooth: hci0: RTL: examining hci_ver=08 hci_rev=000c
lmp_ver=08 lmp_subver=8821
[   32.272590] Bluetooth: hci0: RTL: rom_version status=0 version=1
[   32.272595] Bluetooth: hci0: RTL: loading rtl_bt/rtl8821c_fw.bin
[   32.272611] Bluetooth: hci0: RTL: loading rtl_bt/rtl8821c_config.bin
[   32.272626] Bluetooth: hci0: RTL: cfg_sz 10, total sz 21678
[   32.858653] Bluetooth: hci0: RTL: fw version 0x826ca99e
[11324.989363] Bluetooth: hci0: command 0x2005 tx timeout
[11327.038375] Bluetooth: hci0: command 0x200b tx timeout
[11329.085367] Bluetooth: hci0: command 0x200c tx timeout
[11331.133356] Bluetooth: hci0: command 0x0401 tx timeout
[11337.968450] Bluetooth: hci0: link tx timeout
[11337.968455] Bluetooth: hci0: killing stalled connection 94:db:56:17:9e:c2
[11340.030351] Bluetooth: hci0: command 0x041f tx timeout
[11340.030362] Bluetooth: hci0: No gpio to reset Realtek device, ignoring
[11342.078353] Bluetooth: hci0: command 0x0406 tx timeout
[11342.078362] Bluetooth: hci0: No gpio to reset Realtek device, ignoring
[11348.001581] Bluetooth: hci0: link tx timeout
[11348.001591] Bluetooth: hci0: killing stalled connection 94:db:56:17:9e:c2
[11348.003695] Bluetooth: hci0: link tx timeout
[11348.003703] Bluetooth: hci0: killing stalled connection 94:db:56:17:9e:c2
[11348.004799] Bluetooth: hci0: link tx timeout
[11348.004807] Bluetooth: hci0: killing stalled connection 94:db:56:17:9e:c2
[11348.017537] Bluetooth: hci0: link tx timeout
[11348.017545] Bluetooth: hci0: killing stalled connection 94:db:56:17:9e:c2
[11349.001714] Bluetooth: hci0: link tx timeout
[11349.001719] Bluetooth: hci0: killing stalled connection 94:db:56:17:9e:c2
[11350.077371] Bluetooth: hci0: command 0x0c24 tx timeout
[11350.077383] Bluetooth: hci0: No gpio to reset Realtek device, ignoring
[11352.125366] Bluetooth: hci0: command 0x0c52 tx timeout
[11352.125371] Bluetooth: hci0: No gpio to reset Realtek device, ignoring
[11354.173357] Bluetooth: hci0: command 0x0405 tx timeout
[11354.173365] Bluetooth: hci0: No gpio to reset Realtek device, ignoring
[11356.221372] Bluetooth: hci0: command 0x0408 tx timeout
[11356.221377] Bluetooth: hci0: No gpio to reset Realtek device, ignoring
[11370.557366] Bluetooth: hci0: link tx timeout
[11370.557376] Bluetooth: hci0: killing stalled connection 94:db:56:17:9e:c2
[11372.605355] Bluetooth: hci0: command 0x0408 tx timeout
[11372.605359] Bluetooth: hci0: No gpio to reset Realtek device, ignoring
[12701.885371] Bluetooth: hci0: Timed out waiting for suspend events
[12701.885380] Bluetooth: hci0: Suspend timeout bit: 6
[12701.885388] Bluetooth: hci0: command 0x0408 tx timeout
[12701.885394] Bluetooth: hci0: No gpio to reset Realtek device, ignoring
[12701.885406] Bluetooth: hci0: Suspend notifier action (3) failed: -110

I am not familiar with kernel's source but there is this part I found that
seems revelant for at least a work around (can fast reset bluetooth adapter
when it stops working). I just don't know how to patch kernel so...

drivers/bluetooth/hci_h5.c

/* Suspend/resume support. On many devices the RTL BT device loses power during
 * suspend/resume, causing it to lose its firmware and all state. So we simply
 * turn it off on suspend and reprobe on resume.  This mirrors how RTL devices
 * are handled in the USB driver, where the USB_QUIRK_RESET_RESUME is used
which
 * also causes a reprobe on resume.
 */
static int h5_btrtl_suspend(struct h5 *h5)
{
    serdev_device_set_flow_control(h5->hu->serdev, false);
    gpiod_set_value_cansleep(h5->device_wake_gpio, 0);
    gpiod_set_value_cansleep(h5->enable_gpio, 0);
    return 0;
}

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug 214823] RTL8821CE Bluetooth adapter randomly stopped working, only suspend then resume can reset it
  2021-10-26  9:08 [Bug 214823] New: RTL8821CE Bluetooth adapter randomly stopped working, only suspend then resume can reset it bugzilla-daemon
@ 2021-11-06 15:29 ` bugzilla-daemon
  2021-11-08 16:36 ` bugzilla-daemon
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2021-11-06 15:29 UTC (permalink / raw)
  To: linux-bluetooth

https://bugzilla.kernel.org/show_bug.cgi?id=214823

--- Comment #2 from thanhdatwarriorok@gmail.com ---
Alright, since no one on the team is responding anytime soon, I even reported
to https://github.com/lwfinger/rtw88/issues/72 also with no respond

I will leave my workaround here:

Add blacklist rtw88_8821ce to /etc/modprobe.d/blacklist.conf

Install https://github.com/tomaspinho/rtl8821ce

modprobe rtw88_8821ce before suspend
modprobe -r rtw88_8821ce after resume

To do this automatically see
https://wiki.archlinux.org/title/Power_management#Sleep_hooks

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug 214823] RTL8821CE Bluetooth adapter randomly stopped working, only suspend then resume can reset it
  2021-10-26  9:08 [Bug 214823] New: RTL8821CE Bluetooth adapter randomly stopped working, only suspend then resume can reset it bugzilla-daemon
  2021-11-06 15:29 ` [Bug 214823] " bugzilla-daemon
@ 2021-11-08 16:36 ` bugzilla-daemon
  2021-11-10  8:35 ` bugzilla-daemon
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2021-11-08 16:36 UTC (permalink / raw)
  To: linux-bluetooth

https://bugzilla.kernel.org/show_bug.cgi?id=214823

--- Comment #3 from thanhdatwarriorok@gmail.com ---
That workaround only works for 5.10 kernel

For a better workaround see https://github.com/lwfinger/rtw88/issues/72

In case the link die for whatever reason, quote:

Add usbcore.autosuspend=0 to kernel parameter or blacklist only bluetooth
adapter using https://wiki.archlinux.org/title/Power_management#USB_autosuspend

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug 214823] RTL8821CE Bluetooth adapter randomly stopped working, only suspend then resume can reset it
  2021-10-26  9:08 [Bug 214823] New: RTL8821CE Bluetooth adapter randomly stopped working, only suspend then resume can reset it bugzilla-daemon
  2021-11-06 15:29 ` [Bug 214823] " bugzilla-daemon
  2021-11-08 16:36 ` bugzilla-daemon
@ 2021-11-10  8:35 ` bugzilla-daemon
  2022-03-07 15:31 ` bugzilla-daemon
  2023-11-08  9:40 ` bugzilla-daemon
  4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2021-11-10  8:35 UTC (permalink / raw)
  To: linux-bluetooth

https://bugzilla.kernel.org/show_bug.cgi?id=214823

--- Comment #5 from thanhdatwarriorok@gmail.com ---
Here is an updated log on 5.14.16 kernel

> sudo dmesg | grep 'hci'

[ 3489.447794] Bluetooth: hci0: RTL: examining hci_ver=08 hci_rev=000c
lmp_ver=08 lmp_subver=8821
[ 3489.450797] Bluetooth: hci0: RTL: rom_version status=0 version=1
[ 3489.450803] Bluetooth: hci0: RTL: loading rtl_bt/rtl8821c_fw.bin
[ 3489.450817] Bluetooth: hci0: RTL: loading rtl_bt/rtl8821c_config.bin
[ 3489.450829] Bluetooth: hci0: RTL: cfg_sz 10, total sz 31990
[ 3490.156772] Bluetooth: hci0: RTL: fw version 0x829a7644
[16782.570629] usb 1-2: new full-speed USB device number 5 using xhci_hcd

(suspend then resume event)

[26765.726605] Bluetooth: hci0: command 0x041f tx timeout
[26765.726616] Bluetooth: hci0: Timed out waiting for suspend events
[26765.726623] Bluetooth: hci0: Suspend timeout bit: 6
[26765.726646] Bluetooth: hci0: Suspend notifier action (3) failed: -110
[26766.591682] usb 3-1: reset full-speed USB device number 2 using xhci_hcd
[26766.605552] usb 1-4: reset high-speed USB device number 4 using xhci_hcd
[26766.796709] Bluetooth: hci0: RTL: examining hci_ver=08 hci_rev=000c
lmp_ver=08 lmp_subver=8821
[26766.799656] Bluetooth: hci0: RTL: rom_version status=0 version=1
[26766.799662] Bluetooth: hci0: RTL: loading rtl_bt/rtl8821c_fw.bin
[26766.805135] Bluetooth: hci0: RTL: loading rtl_bt/rtl8821c_config.bin
[26766.805399] Bluetooth: hci0: RTL: cfg_sz 10, total sz 31990
[26767.513646] Bluetooth: hci0: RTL: fw version 0x829a7644

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug 214823] RTL8821CE Bluetooth adapter randomly stopped working, only suspend then resume can reset it
  2021-10-26  9:08 [Bug 214823] New: RTL8821CE Bluetooth adapter randomly stopped working, only suspend then resume can reset it bugzilla-daemon
                   ` (2 preceding siblings ...)
  2021-11-10  8:35 ` bugzilla-daemon
@ 2022-03-07 15:31 ` bugzilla-daemon
  2023-11-08  9:40 ` bugzilla-daemon
  4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2022-03-07 15:31 UTC (permalink / raw)
  To: linux-bluetooth

https://bugzilla.kernel.org/show_bug.cgi?id=214823

tuwuna (thanhdatwarriorok@gmail.com) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WILL_NOT_FIX

--- Comment #6 from tuwuna (thanhdatwarriorok@gmail.com) ---
To anyone hoping for a fix just buy a AX200 because these guy don't fucking
care about linux users.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug 214823] RTL8821CE Bluetooth adapter randomly stopped working, only suspend then resume can reset it
  2021-10-26  9:08 [Bug 214823] New: RTL8821CE Bluetooth adapter randomly stopped working, only suspend then resume can reset it bugzilla-daemon
                   ` (3 preceding siblings ...)
  2022-03-07 15:31 ` bugzilla-daemon
@ 2023-11-08  9:40 ` bugzilla-daemon
  4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2023-11-08  9:40 UTC (permalink / raw)
  To: linux-bluetooth

https://bugzilla.kernel.org/show_bug.cgi?id=214823

Javier Crosby (murphyde835@gmail.com) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |murphyde835@gmail.com

--- Comment #7 from Javier Crosby (murphyde835@gmail.com) ---
I will leave my workaround here:

Add boycott rtw88_8821ce to/and so forth/modprobe.d/blacklist.conf

Introduce https://github.com/tomaspinho/rtl8821ce
https://basketballstarsgame.io

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-11-08  9:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-26  9:08 [Bug 214823] New: RTL8821CE Bluetooth adapter randomly stopped working, only suspend then resume can reset it bugzilla-daemon
2021-11-06 15:29 ` [Bug 214823] " bugzilla-daemon
2021-11-08 16:36 ` bugzilla-daemon
2021-11-10  8:35 ` bugzilla-daemon
2022-03-07 15:31 ` bugzilla-daemon
2023-11-08  9:40 ` bugzilla-daemon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).