最近,蓝牙在 18.04.5 LTS(我已更新至最新版)中出现了很多问题,特别是当我唤醒笔记本电脑时(我没有安装 TLP)。我更新了 bluez,但没有任何变化。即使重新启动服务后,蓝牙仍无法连接,似乎也无法开机。
status
当我检查蓝牙时,我发现红色上有这些错误restart
:
Version mismatch for sixaxis
Loading LTKs timed out for hci0
Failed to set mode: Failed (0x03)
当Failed to set power on: org.bluez.Error.Failed
我尝试power on
bluetoothctl
日志
$ sudo service bluetooth restart
$ sudo service bluetooth status
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2021-01-10 14:12:22 CET; 18s ago
Docs: man:bluetoothd(8)
Main PID: 13873 (bluetoothd)
Status: "Running"
Tasks: 1 (limit: 4915)
CGroup: /system.slice/bluetooth.service
└─13873 /usr/lib/bluetooth/bluetoothd
Jan 10 14:12:22 toshiba systemd[1]: Starting Bluetooth service...
Jan 10 14:12:22 toshiba bluetoothd[13873]: Bluetooth daemon 5.50
Jan 10 14:12:22 toshiba systemd[1]: Started Bluetooth service.
Jan 10 14:12:22 toshiba bluetoothd[13873]: Starting SDP server
Jan 10 14:12:22 toshiba bluetoothd[13873]: Version mismatch for sixaxis
Jan 10 14:12:22 toshiba bluetoothd[13873]: Bluetooth management interface 1.14 initialized
Jan 10 14:12:22 toshiba bluetoothd[13873]: Endpoint registered: sender=:1.91 path=/MediaEndpoint/A2DPSource
Jan 10 14:12:22 toshiba bluetoothd[13873]: Endpoint registered: sender=:1.91 path=/MediaEndpoint/A2DPSink
Jan 10 14:12:24 toshiba bluetoothd[13873]: Loading LTKs timed out for hci0
Jan 10 14:12:32 toshiba bluetoothd[13873]: Failed to set mode: Failed (0x03)
$ sudo bluetoothctl
Agent registered
[bluetooth]# power on
Failed to set power on: org.bluez.Error.Failed
*-usb:0
description: Bluetooth wireless interface
vendor: Intel Corp.
physical id: 2
bus info: usb@1:1.2
version: 0.01
capabilities: bluetooth usb-2.00
configuration: driver=btusb maxpower=100mA speed=12Mbit/s
笔记
为了让它再次工作,我需要重新启动或重新启动蓝牙
rfkill block bluetooth
rfkill unblock bluetooth
这真的很烦人,因为我将它用作蓝牙键盘,每次连接失败时,我都必须切换到笔记本电脑的内置键盘。
输出lsusb; dmesg | grep -i blue
$ lsusb; dmesg | grep -i blue
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 004: ID 04f2:b448 Chicony Electronics Co., Ltd
Bus 001 Device 003: ID 8087:07dc Intel Corp.
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 005: ID 043e:9a39 LG Electronics USA, Inc.
Bus 003 Device 007: ID 0bda:8153 Realtek Semiconductor Corp.
Bus 003 Device 006: ID 046d:c52f Logitech, Inc. Unifying Receiver
Bus 003 Device 004: ID 0bda:5411 Realtek Semiconductor Corp.
Bus 003 Device 003: ID 0451:ace1 Texas Instruments, Inc.
Bus 003 Device 002: ID 0451:8142 Texas Instruments, Inc. TUSB8041 4-Port Hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[ 2.908829] toshiba_bluetooth: Toshiba ACPI Bluetooth device driver
[ 2.977750] Bluetooth: Core ver 2.22
[ 2.977769] Bluetooth: HCI device and connection manager initialized
[ 2.977772] Bluetooth: HCI socket layer initialized
[ 2.977774] Bluetooth: L2CAP socket layer initialized
[ 2.977777] Bluetooth: SCO socket layer initialized
[ 3.076056] Bluetooth: hci0: read Intel version: 3707100100012d0d27
[ 3.076057] Bluetooth: hci0: Intel device is already patched. patch num: 27
[ 4.525995] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 4.525997] Bluetooth: BNEP filters: protocol multicast
[ 4.526002] Bluetooth: BNEP socket layer initialized
[ 21.781694] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[ 21.781703] Bluetooth: HIDP socket layer initialized
[ 21.783380] input: Matias Wireless Keyboard (ISO) Keyboard as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/bluetooth/hci0/hci0:256/0005:05AC:0250.0005/input/input26
[ 21.783901] input: Matias Wireless Keyboard (ISO) Consumer Control as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/bluetooth/hci0/hci0:256/0005:05AC:0250.0005/input/input27
[ 21.784070] input: Matias Wireless Keyboard (ISO) System Control as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.2/1-1.2:1.0/bluetooth/hci0/hci0:256/0005:05AC:0250.0005/input/input28
[ 21.784238] hid-generic 0005:05AC:0250.0005: input,hidraw4: BLUETOOTH HID v0.03 Keyboard [Matias Wireless Keyboard (ISO)] on 34:de:1a:7f:93:1e
[ 36.751358] Bluetooth: RFCOMM TTY layer initialized
[ 36.751364] Bluetooth: RFCOMM socket layer initialized
[ 36.751369] Bluetooth: RFCOMM ver 1.11
[ 7147.255880] Bluetooth: hci0: command 0x0804 tx timeout
[ 7369.683801] Bluetooth: hci0: command 0x1405 tx timeout
[ 7371.699689] Bluetooth: hci0: command 0x1403 tx timeout
[ 7373.715640] Bluetooth: hci0: command 0x0c2d tx timeout
[ 7375.731641] Bluetooth: hci0: command 0x1405 tx timeout
[ 7375.731645] Bluetooth: hci0: No way to reset. Ignoring and continuing
[ 7377.747576] Bluetooth: hci0: command 0x1403 tx timeout
[ 7377.747583] Bluetooth: hci0: No way to reset. Ignoring and continuing
[ 7379.763562] Bluetooth: hci0: command 0x0c2d tx timeout
[ 7379.763566] Bluetooth: hci0: No way to reset. Ignoring and continuing
[ 7381.779558] Bluetooth: hci0: command 0x1405 tx timeout
[ 7381.779564] Bluetooth: hci0: No way to reset. Ignoring and continuing
[ 7383.795496] Bluetooth: hci0: command 0x1403 tx timeout
[ 7383.795501] Bluetooth: hci0: No way to reset. Ignoring and continuing
[ 7385.811505] Bluetooth: hci0: command 0x0c2d tx timeout
[ 7385.811514] Bluetooth: hci0: No way to reset. Ignoring and continuing
[ 7387.827417] Bluetooth: hci0: command 0x1405 tx timeout
[ 7387.827426] Bluetooth: hci0: No way to reset. Ignoring and continuing
[ 7389.843348] Bluetooth: hci0: command 0x1403 tx timeout
[ 7389.843353] Bluetooth: hci0: No way to reset. Ignoring and continuing
[ 7391.859270] Bluetooth: hci0: command 0x0c2d tx timeout
[ 7391.859275] Bluetooth: hci0: No way to reset. Ignoring and continuing
[ 7393.875274] Bluetooth: hci0: command 0x1405 tx timeout
[ 7393.875280] Bluetooth: hci0: No way to reset. Ignoring and continuing
[ 7395.891263] Bluetooth: hci0: command 0x1403 tx timeout
[ 7395.891267] Bluetooth: hci0: No way to reset. Ignoring and continuing
[ 7397.907255] Bluetooth: hci0: command 0x0c2d tx timeout
[ 7397.907262] Bluetooth: hci0: No way to reset. Ignoring and continuing
[ 7399.923137] Bluetooth: hci0: command 0x1405 tx timeout
[ 7399.923142] Bluetooth: hci0: No way to reset. Ignoring and continuing
[ 7401.939191] Bluetooth: hci0: command 0x1403 tx timeout
[ 7401.939199] Bluetooth: hci0: No way to reset. Ignoring and continuing
[ 7403.955137] Bluetooth: hci0: command 0x0c2d tx timeout
[ 7403.955144] Bluetooth: hci0: No way to reset. Ignoring and continuing
[ 7405.971021] Bluetooth: hci0: command 0x1405 tx timeout
[ 7405.971026] Bluetooth: hci0: No way to reset. Ignoring and continuing
[ 7407.990996] Bluetooth: hci0: command 0x1403 tx timeout
[ 7407.991005] Bluetooth: hci0: No way to reset. Ignoring and continuing
[ 7410.003001] Bluetooth: hci0: command 0x0c2d tx timeout
[ 7410.003006] Bluetooth: hci0: No way to reset. Ignoring and continuing
[ 7412.018986] Bluetooth: hci0: command 0x1405 tx timeout
[ 7412.018994] Bluetooth: hci0: No way to reset. Ignoring and continuing
[ 7414.038911] Bluetooth: hci0: command 0x1403 tx timeout
[ 7414.038916] Bluetooth: hci0: No way to reset. Ignoring and continuing
[ 7416.050860] Bluetooth: hci0: command 0x0c2d tx timeout
[ 7416.050863] Bluetooth: hci0: No way to reset. Ignoring and continuing
答案1
删除和加载btusb
模块在某些情况下会有所帮助:
sudo rmmod btusb
sudo modprobe btusb