如何在 Ubuntu 上运行诊断或重新启动蓝牙?

如何在 Ubuntu 上运行诊断或重新启动蓝牙?

蓝牙工作正常,但有时会断开连接,然后我无法再次启用蓝牙,就像它崩溃了或发生了其他问题一样。

我的电脑从“挂起模式”恢复后,这种情况经常发生,当我重新启动 Ubuntu 时,它又得到了修复。

是否有一些命令可以在“崩溃”后正确地重新启动它,或者如何运行诊断蓝牙出了什么问题?

答案1

要查看状态并了解阻塞情况:

rfkill list all

如果显示被硬件阻止,则可能是键盘、BIOS、内核模块/驱动程序阻止。如果被软件阻止,则可能是服务阻止。

要使用 systemd 启动/停止/启用/禁用/重新启动:

sudo systemctl start Bluetooth
sudo systemctl stop Bluetooth
sudo systemctl enable Bluetooth
sudo systemctl disable Bluetooth
sudo systemctl restart Bleutooth

或者

sudo service Bluetooth start
sudo service Bluetooth stop
sudo service Bluetooth enable
sudo service Bluetooth disable
sudo service Bluetooth restart

也可能:

rfkill unblock bluetooth
rfkill block bluetooth

相关内容