因此,我尝试使用我的无线耳机,但发现 Ubuntu 21.04 有一个错误:
● bluetooth.service - Bluetooth service
Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2021-05-26 07:40:51 MSK; 53min ago
Docs: man:bluetoothd(8)
Main PID: 822 (bluetoothd)
Status: "Running"
Tasks: 1 (limit: 8566)
Memory: 1.8M
CGroup: /system.slice/bluetooth.service
└─822 /usr/lib/bluetooth/bluetoothd
May 26 07:40:47 UbuntuLinux bluetoothd[822]: Bluetooth daemon 5.56
May 26 07:40:47 UbuntuLinux systemd[1]: Starting Bluetooth service...
May 26 07:40:51 UbuntuLinux bluetoothd[822]: Starting SDP server
May 26 07:40:51 UbuntuLinux systemd[1]: Started Bluetooth service.
May 26 07:40:53 UbuntuLinux bluetoothd[822]: Bluetooth management interface 1.19 initialized
May 26 07:40:53 UbuntuLinux bluetoothd[822]: Failed to set mode: Blocked through rfkill (0x12)
May 26 07:41:24 UbuntuLinux bluetoothd[822]: Failed to set mode: Blocked through rfkill (0x12)
May 26 07:41:31 UbuntuLinux bluetoothd[822]: Endpoint registered: sender=:1.80 path=/MediaEndpoint/A2DPSink/sbc
May 26 07:41:31 UbuntuLinux bluetoothd[822]: Endpoint registered: sender=:1.80 path=/MediaEndpoint/A2DPSource/sbc
我该如何修复它?
答案1
它对我有用
sudo rfkill unblock bluetooth
sudo systemctl stop bluetooth
sudo systemctl status bluetooth
sudo systemctl restart bluetooth
答案2
这提到的答案与hciconfig
来自bluez 包在 Ubuntu 22.04 上工作。具有 root 权限:
hciconfig hci0 down # Close HCI device.
rmmod btusb # Remove btusb module from the kernel
modprobe btusb # Add it back
hciconfig hci0 up # Open and initialize HCI device
一行
hciconfig hci0 down && rmmod btusb && modprobe btusb && hciconfig hci0 up
如果仍然不起作用,请再次检查拔出/插入,检查是否列出(sudo hciconfig -a
)以及是否没有被阻止(sudo rfkill list
)。
如果使用 Sony WH-1000XM4,请按住电源按钮直到启用配对模式,大约 6 秒钟。