睡眠后蓝牙消失

睡眠后蓝牙消失

已发布根据 @ArtemS.Tashkinov 的建议,在 Bugzilla 上

在我的 HP 笔记本上,当运行 Linux 时,蓝牙适配器在睡眠后消失(总是),并在重新启动后重新出现(也总是),所以我想解决方案可能涉及在启动时对蓝牙进行任何操作。这种情况在 Ubuntu 和 Fedora 上都会发生,但在 Windows 上不会。我目前正在使用 Fedora,因此如果解决方案是特定于发行版的,则它需要适合该发行版。
我尝试过更新bluez、使用modprobe、重新启动bluetooth.service,但都不起作用。

规格: HP 笔记本 15-dy1751ms (更多的)
Linux 上的 Fedora 37 6.2.7-200.fc37.x86_64
Realtek RTL8821CE 802.11b/g/n/ac (1x1) Wi-Fi 和蓝牙 4.2 组合

以下2张是蓝牙工作时的情况(开机后、睡眠前)。当蓝牙不工作时,它不会显示在以下任一位置:

$ 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无论蓝牙是否工作,显示相同,除了一根线,在它中断(睡眠)后,
DevSta: CorrErr+ NonFatalErr- FatalErr- UnsupReq- AuxPwr+ TransPend-
变成
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

相关内容