Bug 217256 - Bluetooth disappears after suspend
Summary: Bluetooth disappears after suspend
Status: NEW
Alias: None
Product: Drivers
Classification: Unclassified
Component: Bluetooth (show other bugs)
Hardware: Intel Linux
: P1 normal
Assignee: linux-bluetooth@vger.kernel.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-27 20:28 UTC by Yehuda Cohen
Modified: 2023-12-20 10:55 UTC (History)
2 users (show)

See Also:
Kernel Version: 6.2.7-200.fc37.x86_64
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Yehuda Cohen 2023-03-27 20:28:06 UTC
As posted here https://unix.stackexchange.com/q/740635/533209

On my HP notebook, when running Linux, the Bluetooth adapter disappears after sleep (always), and reappears after rebooting (also always), so I'd imagine the solution might involve doing whatever happens to Bluetooth at boot. This happens on both Ubuntu and Fedora, but not Windows.

I've tried updating `bluez`, using `modprobe`, restarting `bluetooth.service`, none worked.

Specs:
HP Notebook 15-dy1751ms (https://support.hp.com/us-en/product/hp-15-dy1000-laptop-pc-series/29322765/document/c06447661)  
Linux 6.1.18-200.fc37.x86_64  
Realtek RTL8821CE 802.11b/g/n/ac (1x1) Wi-Fi and Bluetooth 4.2 Combo

The following 2 are from when Bluetooth is working (after boot before sleep). When Bluetooth is not working, it doesn't show in either:
```
$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 04f3:2753 Elan Microelectronics Corp. Touchscreen
Bus 001 Device 003: ID 0408:5365 Quanta Computer, Inc. HP TrueVision HD Camera
Bus 001 Device 005: ID 0bda:b00a Realtek Semiconductor Corp. Realtek Bluetooth 4.2 Adapter
Bus 001 Device 002: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
```

```
$ rfkill list
0: hci0: Bluetooth
        Soft blocked: no
        Hard blocked: no
1: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no
```

`lspci -vvv` shows the same whether Bluetooth is working or not, except for one line:
before:
`DevSta: CorrErr+ NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-`  
after:  
`DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-`

```
01:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter
        DeviceName: Realtek Wireless LAN + BT
        Subsystem: Hewlett-Packard Company Device 831a
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin A routed to IRQ 138
        Region 0: I/O ports at 3000 [size=256]
        Region 2: Memory at 80500000 (64-bit, non-prefetchable) [size=64K]
        Capabilities: [40] Power Management version 3
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
                Address: 00000000fee00458  Data: 0000
        Capabilities: [70] Express (v2) Endpoint, MSI 00
                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <4us, L1 <64us
                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 10W
                DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
                        RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
                        MaxPayload 128 bytes, MaxReadReq 512 bytes
                DevSta: CorrErr+ NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-
                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <2us, L1 <64us
                        ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp-
                LnkCtl: ASPM L1 Enabled; RCB 64 bytes, Disabled- CommClk+
                        ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1
                        TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Not Supported, TimeoutDis+ NROPrPrP- LTR+
                         10BitTagComp- 10BitTagReq- OBFF Via message/WAKE#, ExtFmt- EETLPPrefix-
                         EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
                         FRS- TPHComp- ExtTPHComp-
                         AtomicOpsCap: 32bit- 64bit- 128bitCAS-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis+ LTR+ 10BitTagReq- OBFF Disabled,
                         AtomicOpsCtl: ReqEn-
                LnkCap2: Supported Link Speeds: 2.5GT/s, Crosslink- Retimer- 2Retimers- DRS-
                LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance- SpeedDis-
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance Preset/De-emphasis: -6dB de-emphasis, 0dB preshoot
                LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete- EqualizationPhase1-
                         EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
                         Retimer- 2Retimers- CrosslinkRes: unsupported
        Capabilities: [100 v2] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr+ BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
                AERCap: First Error Pointer: 00, ECRCGenCap+ ECRCGenEn- ECRCChkCap+ ECRCChkEn-
                        MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
                HeaderLog: 00000000 00000000 00000000 00000000
        Capabilities: [148 v1] Device Serial Number 00-e0-4c-ff-fe-c8-21-01
        Capabilities: [158 v1] Latency Tolerance Reporting
                Max snoop latency: 3145728ns
                Max no snoop latency: 3145728ns
        Capabilities: [160 v1] L1 PM Substates
                L1SubCap: PCI-PM_L1.2- PCI-PM_L1.1- ASPM_L1.2- ASPM_L1.1- L1_PM_Substates-
                L1SubCtl1: PCI-PM_L1.2- PCI-PM_L1.1- ASPM_L1.2- ASPM_L1.1-
                L1SubCtl2:
        Capabilities: [170 v1] Precision Time Measurement
                PTMCap: Requester:- Responder:+ Root:-
                PTMClockGranularity: Unimplemented
                PTMControl: Enabled:+ RootSelected:-
                PTMEffectiveGranularity: Unknown
        Capabilities: [17c v1] Vendor Specific Information: ID=0003 Rev=1 Len=054 <?>
        Kernel driver in use: rtw_8821ce
        Kernel modules: rtw88_8821ce
```

`dmesg`:
```
$ dmesg | grep -i blue
[    2.142933] usb 1-10: Product: Bluetooth Radio 
[   17.314811] Bluetooth: Core ver 2.22
[   17.314847] NET: Registered PF_BLUETOOTH protocol family
[   17.314849] Bluetooth: HCI device and connection manager initialized
[   17.314854] Bluetooth: HCI socket layer initialized
[   17.314857] Bluetooth: L2CAP socket layer initialized
[   17.314866] Bluetooth: SCO socket layer initialized
[   17.432626] Bluetooth: hci0: RTL: examining hci_ver=08 hci_rev=000c lmp_ver=08 lmp_subver=8821
[   17.433613] Bluetooth: hci0: RTL: rom_version status=0 version=1
[   17.433618] Bluetooth: hci0: RTL: loading rtl_bt/rtl8821c_fw.bin
[   17.441377] Bluetooth: hci0: RTL: loading rtl_bt/rtl8821c_config.bin
[   17.442234] Bluetooth: hci0: RTL: cfg_sz 10, total sz 34926
[   17.940640] Bluetooth: hci0: RTL: fw version 0x75b8f098
[   18.531332] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   18.531338] Bluetooth: BNEP filters: protocol multicast
[   18.531344] Bluetooth: BNEP socket layer initialized
[   18.533915] Bluetooth: MGMT ver 1.22
[   45.633522] Bluetooth: RFCOMM TTY layer initialized
[   45.633530] Bluetooth: RFCOMM socket layer initialized
[   45.633536] Bluetooth: RFCOMM ver 1.11
```
Comment 1 The Linux kernel's regression tracker (Thorsten Leemhuis) 2023-03-28 08:33:18 UTC
Did this work on earlier kernels? If so: which one?
Comment 2 Yehuda Cohen 2023-03-28 18:52:51 UTC
No. I have had this problem since I started using Linux a couple years ago
Thanks
Comment 3 Yehuda Cohen 2023-04-20 18:36:18 UTC
Has any progress been made on this? Is there other information I should supply?
Comment 4 The Linux kernel's regression tracker (Thorsten Leemhuis) 2023-04-21 08:59:59 UTC
FWIW, that's up to the bluetooth developers, as it's not a regression. Not sure if they have seen it here. I think they sometimes are active in bugzilla, but I'm not sure (participating is optional here, that's why https://docs.kernel.org/admin-guide/reporting-issues.html discourages the use, unless developers stated they participate). Using the mailing list would be the saver bet. But if you do, you want to mentioned it here; and you want to check if that problem still happens in mainline.
Comment 5 Franz 2023-12-20 10:55:51 UTC
Did you send an error report to the mailing list? I am facing the same problems with a Realtek RTL8852BE chipset.

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