我刚买了一台新笔记本电脑(联想 ThinkBook 14s Yoga)并安装了 Ubuntu 21.04。我的蓝牙耳机连接并正常工作了几分钟,但随后它们断开连接并在 HSP/HFP 模式下重新连接。我不需要使用麦克风,所以我希望它们始终处于 A2DP 状态,断开连接变得非常烦人。
我尝试过几种不同的方法来禁用此模式:
- 在
/etc/bluetooth/audio.conf
,我补充说
[General]
Disable=Headset
- 在同一个文件中我也尝试过
[General]
Disable=Source
[Headset]
MaxConnected=0
我也尝试在 中添加 和 部分
Disable=Headset
。[General]
这只会导致系统日志中出现警告。[Policy]
/etc/bluetooth/main.conf
我已尝试过此设置
/etc/pulse/default.pa
:
.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy auto_switch=false
.endif
syslog 中的 bluetoothd 条目看起来就像是在更改配置文件后启动和停止服务时产生的。
Jun 2 01:41:35 shiva bluetoothd[438895]: src/profile.c:ext_io_disconnected() Unable to get io data for Headset Voice gateway: getpeername: Transport endpoint is not connected (107)
Jun 2 01:41:41 shiva bluetoothd[438895]: src/profile.c:record_cb() Unable to get Headset Voice gateway SDP record: Host is down
Jun 2 01:41:42 shiva bluetoothd[438895]: profiles/audio/a2dp.c:a2dp_select_capabilities() Unable to select SEP
Jun 2 01:41:43 shiva bluetoothd[438895]: src/service.c:btd_service_connect() a2dp-sink profile connect failed for 00:02:5B:02:17:44: Device or resource busy
Jun 2 01:41:43 shiva bluetoothd[438895]: plugins/policy.c:reconnect_timeout() Reconnecting services failed: Device or resource busy (16)
Jun 2 01:41:53 shiva bluetoothd[438895]: Terminating
Jun 2 01:41:53 shiva bluetoothd[438895]: src/profile.c:ext_io_disconnected() Unable to get io data for Headset Voice gateway: getpeername: Transport endpoint is not connected (107)
Jun 2 01:41:53 shiva bluetoothd[438895]: Endpoint unregistered: sender=:1.486 path=/MediaEndpoint/A2DPSink/sbc
Jun 2 01:41:53 shiva bluetoothd[438895]: Endpoint unregistered: sender=:1.486 path=/MediaEndpoint/A2DPSource/sbc
Jun 2 01:41:53 shiva bluetoothd[438895]: Stopping SDP server
Jun 2 01:41:53 shiva bluetoothd[438895]: Exit
Jun 2 01:41:53 shiva bluetoothd[440635]: Bluetooth daemon 5.56
Jun 2 01:41:53 shiva bluetoothd[440635]: src/main.c:check_options() Unknown key Disable for group General in /etc/bluetooth/main.conf
Jun 2 01:41:53 shiva bluetoothd[440635]: src/main.c:check_options() Unknown key Disable for group Policy in /etc/bluetooth/main.conf
Jun 2 01:41:53 shiva bluetoothd[440635]: Starting SDP server
Jun 2 01:41:53 shiva dbus-daemon[698]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.955' (uid=0 pid=440635 comm="/usr/lib/bluetooth/bluetoothd " label="unconfined")
Jun 2 01:41:53 shiva bluetoothd[440635]: Bluetooth management interface 1.19 initialized
Jun 2 01:41:53 shiva bluetoothd[440635]: Endpoint registered: sender=:1.486 path=/MediaEndpoint/A2DPSink/sbc
Jun 2 01:41:53 shiva bluetoothd[440635]: Endpoint registered: sender=:1.486 path=/MediaEndpoint/A2DPSource/sbc
Jun 2 01:42:04 shiva bluetoothd[440635]: /org/bluez/hci0/dev_00_02_5B_02_17_44/sep1/fd0: fd(41) ready
Jun 2 01:55:27 shiva bluetoothd[440635]: profiles/audio/avdtp.c:handle_unanswered_req() No reply to Start request
Jun 2 01:55:27 shiva bluetoothd[440635]: src/profile.c:ext_io_disconnected() Unable to get io data for Headset Voice gateway: getpeername: Transport endpoint is not connected (107)
到目前为止,这些方法都不起作用,而且我在搜索中也没有找到其他方法。还有其他建议吗?
答案1
这可能与英特尔 AX200/AX201/AX210 蓝牙模块的固件问题有关。这个问题现在可能已经在 Fedora 34 中得到解决,但在 Ubuntu 上还没有解决。您可能应该将“intel”子文件夹的内容复制到“/lib/firmware/intel”中以获取 BT 部分。以“ibt-xx”开头的文件适用于英特尔蓝牙...
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1155
答案2
快速命令行版本:
wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/snapshot/linux-firmware-20210511.tar.gz
tar xfvz linux-firmware-20210511.tar.gz
cd linux-firmware-20210511
sudo cp intel/ibt-* /lib/firmware/intel/