19.04 蓝牙适配器在睡眠后丢失

19.04 蓝牙适配器在睡眠后丢失

问题总结:

19.04 版蓝牙从“睡眠”状态恢复后停止工作(使用最新的 bluez 版本现在可以使用了)

硬件软件:

Description:    Ubuntu 19.04


% dpkg --status bluez | grep '^Version:'
Version: 5.50-0ubuntu2


% lsmod | grep -i blue
bluetooth             557056  23 btrtl,btintel,btbcm,bnep,btusb,rfcomm
ecdh_generic           28672  1 bluetooth


% lspci -k
06:00.0 Network controller: Intel Corporation Wireless 8265 / 8275 (rev 78)
    Subsystem: Intel Corporation Dual Band Wireless-AC 8265
    Kernel driver in use: iwlwifi
    Kernel modules: iwlwifi


% lsusb
Bus 001 Device 004: ID 8087:0a2b Intel Corp. 


% usb-devices
T:  Bus=01 Lev=01 Prnt=01 Port=08 Cnt=06 Dev#=  4 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=8087 ProdID=0a2b Rev=00.10
C:  #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
I:  If#=0x0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
I:  If#=0x1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb

观察结果:

dmesg 显示超时

% dmesg | grep -i blue
[    8.854203] Bluetooth: Core ver 2.22
[    8.854213] Bluetooth: HCI device and connection manager initialized
[    8.854215] Bluetooth: HCI socket layer initialized
[    8.854216] Bluetooth: L2CAP socket layer initialized
[    8.854217] Bluetooth: SCO socket layer initialized
[    8.887056] Bluetooth: hci0: Firmware revision 0.1 build 43 week 1 2019
[    9.791115] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    9.791117] Bluetooth: BNEP filters: protocol multicast
[    9.791120] Bluetooth: BNEP socket layer initialized
[   22.415492] Bluetooth: RFCOMM TTY layer initialized
[   22.415498] Bluetooth: RFCOMM socket layer initialized
[   22.415502] Bluetooth: RFCOMM ver 1.11
[   35.357910] hid-generic 0005:046D:B01D.0005: input,hidraw4: BLUETOOTH HID v0.16 Mouse [MX Ergo] on C0:B6:F9:70:BC:27
[350513.404651] Bluetooth: hci0: Firmware revision 0.1 build 43 week 1 2019
[389661.535751] hid-generic 0005:046D:B01D.0009: input,hidraw4: BLUETOOTH HID v0.16 Mouse [MX Ergo] on C0:B6:F9:70:BC:27
[404929.368630] Bluetooth: hci0: SCO packet for unknown connection handle 0
[404929.368636] Bluetooth: hci0: SCO packet for unknown connection handle 0
[404929.378628] Bluetooth: hci0: SCO packet for unknown connection handle 0
[404929.378630] Bluetooth: hci0: SCO packet for unknown connection handle 0
[404929.378631] Bluetooth: hci0: SCO packet for unknown connection handle 0
[404929.388647] Bluetooth: hci0: SCO packet for unknown connection handle 0
[404940.041477] Bluetooth: hci0: SCO packet for unknown connection handle 260
[404940.041484] Bluetooth: hci0: SCO packet for unknown connection handle 260
[404940.041487] Bluetooth: hci0: SCO packet for unknown connection handle 260
[431287.519594] Bluetooth: hci0: last event is not cmd complete (0x00)
[431287.519604] Bluetooth: hci0: last event is not cmd complete (0x00)
[431287.519640] Bluetooth: hci0: Reading Intel version information failed (-61)
[431289.423079] Bluetooth: hci0: command tx timeout

bluetoothctl 无法看到蓝牙适配器

% sudo bluetoothctl
Agent registered
[bluetooth]# power off
No default controller available

其他帖子提到了 rfkill 列表,我的没有被屏蔽

% rfkill list
0: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no
3: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no

hcitool 没有显示任何设备。我认为这是一个问题

% hcitool dev
Devices:

hci0 已关闭

% hciconfig                                                                                   
hci0:   Type: Primary  Bus: USB
    BD Address: 00:00:00:00:00:00  ACL MTU: 0:0  SCO MTU: 0:0
    DOWN 
    RX bytes:76 acl:0 sco:0 events:2 errors:0
    TX bytes:3 acl:0 sco:0 commands:1 errors:0

我重置了,现在它显示为 UP

% sudo hciconfig hci0 reset


% hciconfig                
hci0:   Type: Primary  Bus: USB
    BD Address: C0:B6:F9:70:BC:27  ACL MTU: 1021:4  SCO MTU: 96:6
    UP RUNNING 
    RX bytes:901 acl:0 sco:0 events:56 errors:0
    TX bytes:454 acl:0 sco:0 commands:45 errors:0


% hcitool dev                                                                                 
Devices:
    hci0    C0:B6:F9:70:BC:27

然而 bluetoothctl 仍然报告没有可用的控制器

[bluetooth]# devices
No default controller available

仍然看到 hci0 报告问题读取英特尔信息

[481037.880552] Bluetooth: hci0: Reading Intel version information failed (-61)
[481039.889836] Bluetooth: hci0: command tx timeout
[481570.804750] Bluetooth: hci0: Firmware revision 0.1 build 43 week 1 2019

采取的故障排除步骤:

  • 重新启动bluetooh.service,但问题仍然存在。
  • 重新启动(或有时多次重新启动)将解决蓝牙问题。尽管它在随后的挂起后会再次出现(并非每次都会出现此问题)。

我发现这个开放的错误听起来很相似,但还没有测试我遇到了同样的问题(补丁可以尝试)。将它添加到这里以防其他人遇到同样的问题。 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1790454

解决方法:

  • 如果我“锁定/解锁”用户会话(而不是使用睡眠),则不会发生问题。使用此方法,正常运行时间为 27 天(并且还在增加)。

答案1

我看到了类似的错误信息Reading Intel version information failed (-110),在此错误之前,我没有进行任何系统配置更改。

来自提示ubuntu 的一个 bug 报告restart system with power plugged,我尝试了和等几种有关电源插头的操作,restart system with power unplugged问题终于消失了。

我同意该错误与有关power plug

相关内容