从 ubuntu 14 升级到 16.04 后出现蓝牙问题

从 ubuntu 14 升级到 16.04 后出现蓝牙问题

升级到 ubuntu 16.04 后,我无法在笔记本电脑上打开蓝牙。尝试重新安装 bluez 和其他蓝牙应用程序(与 blueman 和蓝牙相同),但无法解决问题

服务蓝牙状态

● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2016-05-15 10:14:59 IRDT; 5h 40min ago
     Docs: man:bluetoothd(8)
 Main PID: 1104 (bluetoothd)
   Status: "Running"
    Tasks: 1 (limit: 512)
   CGroup: /system.slice/bluetooth.service
           └─1104 /usr/lib/bluetooth/bluetoothd

May 15 10:15:03 morteza-CX61-2PC bluetoothd[1104]: Not enough free handles to register service
May 15 10:15:03 morteza-CX61-2PC bluetoothd[1104]: Not enough free handles to register service
May 15 10:15:03 morteza-CX61-2PC bluetoothd[1104]: Sap driver initialization failed.
May 15 10:15:03 morteza-CX61-2PC bluetoothd[1104]: sap-server: Operation not permitted (1)
May 15 10:15:04 morteza-CX61-2PC bluetoothd[1104]: Loading LTKs timed out for hci0
May 15 10:15:41 morteza-CX61-2PC bluetoothd[1104]: Failed to set mode: Not Powered (0x0f)
May 15 10:15:41 morteza-CX61-2PC bluetoothd[1104]: Failed to get connections: Not Powered (0x0f)
May 15 10:16:52 morteza-CX61-2PC bluetoothd[1104]: Failed to set mode: Failed (0x03)
May 15 10:17:02 morteza-CX61-2PC bluetoothd[1104]: Failed to set mode: Failed (0x03)
May 15 14:13:45 morteza-CX61-2PC bluetoothd[1104]: Failed to set mode: Failed (0x03)

系统盘

Bus 002 Device 002: ID 8087:8000 Intel Corp. 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 004: ID 13d3:3394 IMC Networks Bluetooth
Bus 003 Device 003: ID 046d:c52f Logitech, Inc. Unifying Receiver
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

rfkill 列表

0: phy0: Wireless LAN
    Soft blocked: yes
    Hard blocked: no
1: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no 

当我进入设置并选择蓝牙时显示“未找到蓝牙”截图:http://storage6.static.itmages.com/i/16/0515/h_1463312053_7827113_7a4e2df260.png

dmesg | egrep -i 'blue|firm'

[    0.147244] [Firmware Bug]: ACPI: BIOS _OSI(Linux) query ignored
[    0.816454] [Firmware Bug]: ACPI(PEGP) defines _DOD but not _DOS
[    1.761166] usb 3-7: Product: RT Bluetooth Radio
[    1.776032] psmouse serio1: elantech: assuming hardware version 3 (with firmware version 0x550f00)
[   15.773162] Using firmware rtlwifi/rtl8723fw_B.bin
[   18.901441] Bluetooth: Core ver 2.21
[   18.901451] Bluetooth: HCI device and connection manager initialized
[   18.901454] Bluetooth: HCI socket layer initialized
[   18.901455] Bluetooth: L2CAP socket layer initialized
[   18.901459] Bluetooth: SCO socket layer initialized
[   19.093565] Bluetooth: hci0: rtl: examining hci_ver=06 hci_rev=000b lmp_ver=06 lmp_subver=1200
[   19.093568] Bluetooth: hci0: rtl: loading rtl_bt/rtl8723a_fw.bin
[   40.996583] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   40.996585] Bluetooth: BNEP filters: protocol multicast
[   40.996588] Bluetooth: BNEP socket layer initialized
[   41.247665] Bluetooth: RFCOMM TTY layer initialized
[   41.247670] Bluetooth: RFCOMM socket layer initialized
[   41.247673] Bluetooth: RFCOMM ver 1.11
[   42.998956] Bluetooth: hci0 command 0x0c56 tx timeout
[  102.826854] Bluetooth: hci0 urb ffff8800c6322d80 failed to resubmit (113)
[  112.790161] Bluetooth: hci0 urb ffff8800a66bf240 failed to resubmit (113)

当我尝试在 blueman 软件中搜索设备时收到此错误

Resource Not Ready
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/blueman/bluez/errors.py", line 146, in warp
    return func(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/blueman/bluez/Adapter.py", line 135, in start_discovery
    self.get_interface().StartDiscovery()
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.bluez.Error.NotReady: Resource Not Ready

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/blueman-manager", line 210, in inquiry
    self.List.DiscoverDevices()
  File "/usr/lib/python3/dist-packages/blueman/gui/DeviceList.py", line 401, in DiscoverDevices
    self.Adapter.start_discovery()
  File "/usr/lib/python3/dist-packages/blueman/bluez/errors.py", line 148, in warp
    raise parse_dbus_error(exception)
blueman.bluez.errors.DBusNotReadyError: Resource Not Ready

当我尝试从终端弹出错误消息重新启动蓝牙服务时,内容如下

Connection to BlueZ failed
Bluez daemon is not running, blueman-manager cannot continue.
This probably means that there were no Bluetooth adapters detected or Bluetooth daemon was not started.

答案1

您可以尝试重新安装蓝牙:

sudo apt-get purge bluetooth
sudo apt-get install bluetooth

这对我有用。

答案2

以下是对我有用的方法(从冷启动开始)

sudo hciconfig -a hci0
sudo hciconfig hci0 down
sudo hciconfig hci0 up
sudo hciconfig -a hci0

看起来 xenial 和 ubuntu 蓝牙很烂(至少与我妻子的 Windows 设置相比)。

使用 HP 17 30 秒到 2 分钟后,距离笔记本电脑不到 1 米的耳机仍会断开蓝牙连接。其他设备没有这个问题,但我已经将 m-pci-e 卡更换了两次,现在两个不同的硬件板都出现了同样的问题。

相关内容