本周刚开始使用 Kubuntu (24.04),并尝试设置好一切,我发现蓝牙检测不到任何设备(我尝试过将多个设备置于配对模式,这些设备在其他操作系统和我的 Android 手机上运行)。我已经找到了如何检查蓝牙服务的状态、获取设备信息的方法,一切似乎都很正常,驱动程序也正确,但我无法发现任何设备。任何有关尝试的建议都将不胜感激。
以下输出使我认为蓝牙服务和设备已启动并正在运行......
codys@lilKalu:~$ service bluetooth status
● bluetooth.service - Bluetooth service
Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; preset: enabled)
Active: active (running) since Sun 2024-06-16 09:41:07 CDT; 17min ago
Docs: man:bluetoothd(8)
Main PID: 869 (bluetoothd)
Status: "Running"
Tasks: 1 (limit: 18647)
Memory: 3.1M (peak: 4.0M)
CPU: 84ms
CGroup: /system.slice/bluetooth.service
└─869 /usr/libexec/bluetooth/bluetoothd
Jun 16 09:41:14 lilKalu bluetoothd[869]: Endpoint registered: sender=:1.54 path=/MediaEndpoint/A2DPSource/aptx_ll_1
Jun 16 09:41:14 lilKalu bluetoothd[869]: Endpoint registered: sender=:1.54 path=/MediaEndpoint/A2DPSource/aptx_ll_0
Jun 16 09:41:14 lilKalu bluetoothd[869]: Endpoint registered: sender=:1.54 path=/MediaEndpoint/A2DPSource/aptx_ll_duplex_1
Jun 16 09:41:14 lilKalu bluetoothd[869]: Endpoint registered: sender=:1.54 path=/MediaEndpoint/A2DPSource/aptx_ll_duplex_0
Jun 16 09:41:14 lilKalu bluetoothd[869]: Endpoint registered: sender=:1.54 path=/MediaEndpoint/A2DPSource/faststream
Jun 16 09:41:14 lilKalu bluetoothd[869]: Endpoint registered: sender=:1.54 path=/MediaEndpoint/A2DPSource/faststream_duplex
Jun 16 09:41:14 lilKalu bluetoothd[869]: Endpoint registered: sender=:1.54 path=/MediaEndpoint/A2DPSink/opus_05
Jun 16 09:41:14 lilKalu bluetoothd[869]: Endpoint registered: sender=:1.54 path=/MediaEndpoint/A2DPSource/opus_05
Jun 16 09:41:14 lilKalu bluetoothd[869]: Endpoint registered: sender=:1.54 path=/MediaEndpoint/A2DPSink/opus_05_duplex
Jun 16 09:41:14 lilKalu bluetoothd[869]: Endpoint registered: sender=:1.54 path=/MediaEndpoint/A2DPSource/opus_05_duplex
codys@lilKalu:~$ hciconfig
hci0: Type: Primary Bus: USB
BD Address: E8:65:38:29:C4:04 ACL MTU: 1021:8 SCO MTU: 255:12
UP RUNNING
RX bytes:1459 acl:0 sco:0 events:174 errors:0
TX bytes:7219 acl:0 sco:0 commands:162 errors:0
codys@lilKalu:~$ bluetoothctl
Waiting to connect to bluetoothd...[bluetooth]# Agent registered
[bluetooth]# power on
[bluetooth]# Changing power on succeeded
[bluetooth]# scan on
[bluetooth]# SetDiscoveryFilter success
[bluetooth]# Discovery started
[bluetooth]# [CHG] Controller E8:65:38:29:C4:04 Discovering: yes
[bluetooth]#
但在本教程的这一步,他们的蓝牙开始发现设备,而我的却没有。它也没有发现任何带有内置蓝牙 GUI 或 blueman 的设备。
输出sudo dmesg | grep -i 'blue'
:
[ 2.113319] usb 1-10: Product: Bluetooth Radio
[ 2.941515] Bluetooth: Core ver 2.22
[ 2.941734] NET: Registered PF_BLUETOOTH protocol family
[ 2.941737] Bluetooth: HCI device and connection manager initialized
[ 2.941742] Bluetooth: HCI socket layer initialized
[ 2.941744] Bluetooth: L2CAP socket layer initialized
[ 2.941750] Bluetooth: SCO socket layer initialized
[ 4.083360] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 4.083364] Bluetooth: BNEP filters: protocol multicast
[ 4.083369] Bluetooth: BNEP socket layer initialized
[ 4.085207] Bluetooth: MGMT ver 1.22
[ 6.504663] Bluetooth: RFCOMM TTY layer initialized
[ 6.504674] Bluetooth: RFCOMM socket layer initialized
[ 6.504683] Bluetooth: RFCOMM ver 1.11
输出uname -a; lspci -nnk | grep -iA2 net; lsusb | grep -i 'blue'; sudo dmesg | grep -i firmware; lsmod | grep bluetooth
:
Linux lilKalu 6.8.0-35-generic #35-Ubuntu SMP PREEMPT_DYNAMIC Mon May 20 15:51:52 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
0000:01:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:b851]
Subsystem: Foxconn International, Inc. Device [105b:e100]
Kernel driver in use: rtw89_8851be
Bus 001 Device 004: ID 0489:e112 Foxconn / Hon Hai Bluetooth Radio
[ 3.622527] rtw89_8851be 0000:01:00.0: loaded firmware rtw89/rtw8851b_fw.bin
[ 3.626746] rtw89_8851be 0000:01:00.0: Firmware version 0.29.41.3 (65cefb31), cmd version 0, type 5
[ 3.626758] rtw89_8851be 0000:01:00.0: Firmware version 0.29.41.3 (65cefb31), cmd version 0, type 3
bluetooth 1032192 44 btrtl,btmtk,btintel,btbcm,bnep,btusb,rfcomm
ecdh_generic 16384 2 bluetooth
并且lspci -nnk | grep -iA2 net
由于在类似的问题中专门要求输出这一点:
0000:01:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:b851]
Subsystem: Foxconn International, Inc. Device [105b:e100]
Kernel driver in use: rtw89_8851be
对我来说,这看起来像是设备正在工作、被发现、有驱动程序并且正确连接到蓝牙服务,而且我知道它在 Windows 上测试过后可以正常工作,但有些东西阻止它发现任何设备。任何建议都将不胜感激!
(注意:我不知道这是否相关,但正如所提到的,该系统与 Windows 是双启动的。作为解决 wifi 问题的一部分,我已经在 Windows 中禁用了快速启动。)
在终端中检查
mokutil --sb
,因为必须禁用安全启动,因为此内核模块不会被签名。然后在终端中重启
我在内核 6.8 中的 btusb 源代码中添加了以下代码 https://github.com/jeremyb31/bluetooth-6.8/commit/0f3b823eea66adf1fbabc865f89484ea486f6e65