Ubuntu 22.04 LTS下Edimax BT8500蓝牙适配器无法连接设备且D-Bus连接失败求助
Ubuntu 22.04 LTS下Edimax BT8500蓝牙适配器无法连接设备且D-Bus连接失败求助
大家好,我最近在Ubuntu 22.04 LTS系统上尝试连接蓝牙耳机,折腾了好几天还是没搞定,想请各位帮忙看看问题出在哪。
我买了一款Edimax的USB蓝牙适配器BT8500,芯片是rtl8761b,官方说明里说它支持的内核版本范围是2.6.32–5.3,看起来和我的系统应该兼容。我按照官方指引下载了驱动,把相关文件放到了/lib/firmware/目录下,然后重启了系统。
重启后运行hciconfig -a,能看到蓝牙适配器的信息,系统设置里也能显示蓝牙选项,但就是没办法连接任何蓝牙设备。我深入排查后发现,bluetoothd进程无法接入D-Bus,执行/usr/bin/snap run bluez时直接报错:
D-Bus setup failed: Failed to connect to socket /var/run/dbus/system_bus_socket: Permission denied
下面是我收集的一些系统信息,要是需要其他命令输出我也可以补充:
hciconfig -a输出
hci0: Type: Primary Bus: USB BD Address: 08:BE:AC:2F:A7:C7 ACL MTU: 1021:6 SCO MTU: 255:12 UP RUNNING RX bytes:810 acl:0 sco:0 events:64 errors:0 TX bytes:5338 acl:0 sco:0 commands:64 errors:0 Features: 0xff 0xff 0xff 0xfe 0xdb 0xfd 0x7b 0x87 Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3 Link policy: RSWITCH HOLD SNIFF PARK Link mode: PERIPHERAL ACCEPT Name: 'Edward' Class: 0x7c0104 Service Classes: Rendering, Capturing, Object Transfer, Audio, Telephony Device Class: Computer, Desktop workstation HCI Version: 5.1 (0xa) Revision: 0x9a9 LMP Version: 5.1 (0xa) Subversion: 0x8a6b Manufacturer: Realtek Semiconductor Corporation (93)
systemctl status snap.bluez.bluez.service输出
× snap.bluez.bluez.service - Service for snap application bluez.bluez Loaded: loaded (/etc/systemd/system/snap.bluez.bluez.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2023-02-08 19:28:26 NZDT; 20min ago Main PID: 1541 (code=exited, status=1/FAILURE) CPU: 32ms Feb 08 19:28:26 Edward systemd[1]: snap.bluez.bluez.service: Failed with result 'exit-code'. Feb 08 19:28:26 Edward bluetoothd[1541]: Unable to get on D-Bus Feb 08 19:28:26 Edward systemd[1]: snap.bluez.bluez.service: Scheduled restart job, restart counter is at 5. Feb 08 19:28:26 Edward systemd[1]: Stopped Service for snap application bluez.bluez. Feb 08 19:28:26 Edward systemd[1]: snap.bluez.bluez.service: Start request repeated too quickly. Feb 08 19:28:26 Edward systemd[1]: snap.bluez.bluez.service: Failed with result 'exit-code'. Feb 08 19:28:26 Edward systemd[1]: Failed to start Service for snap application bluez.bluez.
其他相关命令输出
neale@Edward:~$ sudo /usr/bin/snap run bluez D-Bus setup failed: Failed to connect to socket /var/run/dbus/system_bus_socket: Permission denied neale@Edward:~$ ls -la /var/run/dbus/ total 0 drwxr-xr-x 2 root root 60 Feb 7 22:06 . drwxr-xr-x 37 root root 960 Feb 8 16:29 .. srw-rw-rw- 1 root root 0 Feb 7 22:06 system_bus_socket neale@Edward:~$ ps ax|grep dbus 1020 ? Ss 0:10 @dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only 2207 ? Ss 0:01 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only 2428 ? S 0:00 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 11 --address=unix:path=/run/user/1000/at-spi/bus 11785 ? S 0:00 /usr/lib/cups/notifier/dbus dbus:// 11786 ? S 0:00 /usr/lib/cups/notifier/dbus dbus:// 85726 pts/0 S+ 0:00 grep --color=auto dbus neale@Edward:~$ lspci -knn | grep Net -A3; lsusb; dmesg | grep -i blue 00:19.0 Ethernet controller [0200]: Intel Corporation 82579LM Gigabit Network Connection (Lewisville) [8086:1502] (rev 06) DeviceName: Onboard LAN Subsystem: Gigabyte Technology Co., Ltd 82579LM Gigabit Network Connection (Lewisville) [1458:e000] Kernel driver in use: e1000e Kernel modules: e1000e 00:1a.0 USB controller [0c03]: Intel Corporation C600/X79 series chipset USB2 Enhanced Host Controller #2 [8086:1d2d] (rev 06) -- 04:00.0 Network controller [0280]: Qualcomm Atheros AR9462 Wireless Network Adapter [168c:0034] (rev 01) Subsystem: Lite-On Communications Inc AR9462 Wireless Network Adapter [11ad:6621] Kernel driver in use: ath9k Kernel modules: ath9k 05:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM204 [GeForce GTX 970] [10de:13c2] (rev a1) -- 06:00.0 Ethernet controller [0200]: Intel Corporation 82575EB Gigabit Network Connection [8086:10a7] (rev 02) Subsystem: Intel Corporation 82575EB Gigabit Network Connection [8086:0000] Kernel driver in use: igb Kernel modules: igb 06:00.1 Ethernet controller [0200]: Intel Corporation 82575EB Gigabit Network Connection [8086:10a7] (rev 02) Subsystem: Intel Corporation 82575EB Gigabit Network Connection [8086:0000] Kernel driver in use: igb Kernel modules: igb 08:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 06) Bus 002 Device 004: ID 1b1c:0c04 Corsair Link Cooling Node Bus 002 Device 003: ID 7392:c611 Edimax Technology Co., Ltd Edimax Bluetooth Adapter Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 005 Device 002: ID 2109:0811 VIA Labs, Inc. Hub Bus 005 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 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 004: ID 046d:c016 Logitech, Inc. Optical Wheel Mouse Bus 001 Device 003: ID 125f:a83a A-DATA Technology Co., Ltd. HD330 Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub dmesg: read kernel buffer failed: Operation not permitted
2023-02-15 更新
我尝试完全卸载了bluez,现在查看bluetooth.service状态如下,虽然服务显示正在运行,但还是有一些错误日志,依旧无法连接设备:
● bluetooth.service - Bluetooth service Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2023-02-15 18:35:44 NZDT; 1 day 2h ago Docs: man:bluetoothd(8) Main PID: 1034 (bluetoothd) Status: "Running" Tasks: 1 (limit: 38335) Memory: 2.2M CPU: 211ms CGroup: /system.slice/bluetooth.service └─1034 /usr/lib/bluetooth/bluetoothd Feb 16 20:33:23 Edward bluetoothd[1034]: Failed to set mode: Not Supported (0x0c) Feb 16 20:33:23 Edward bluetoothd[1034]: Endpoint registered: sender=:1.84 path=/MediaEndpoint/A2DPSink/sbc Feb 16 20:33:23 Edward bluetoothd[1034]: Endpoint registered: sender=:1.84 path=/MediaEndpoint/A2DPSource/sbc Feb 16 20:33:23 Edward bluetoothd[1034]: Endpoint registered: sender=:1.84 path=/MediaEndpoint/A2DPSink/sbc_xq_453 Feb 16 20:33:23 Edward bluetoothd[1034]: Endpoint registered: sender=:1.84 path=/MediaEndpoint/A2DPSource/sbc_xq_453 Feb 16 20:33:23 Edward bluetoothd[1034]: Endpoint registered: sender=:1.84 path=/MediaEndpoint/A2DPSink/sbc_xq_512 Feb 16 20:33:23 Edward bluetoothd[1034]: Endpoint registered: sender=:1.84 path=/MediaEndpoint/A2DPSource/sbc_xq_512 Feb 16 20:33:23 Edward bluetoothd[1034]: Endpoint registered: sender=:1.84 path=/MediaEndpoint/A2DPSink/sbc_xq_552 Feb 16 20:33:23 Edward bluetoothd[1034]: Endpoint registered: sender=:1.84 path=/MediaEndpoint/A2DPSource/sbc_xq_552 Feb 16 20:33:23 Edward bluetoothd[1034]: src/adv_monitor.c:btd_adv_monitor_power_down() Unexpected NULL btd_adv_monitor_manager object upon power down
备注:内容来源于stack exchange,提问作者Neale Graham
相关产品推荐
相关产品推荐

