在 Archlinux 上重置藍牙

在 Archlinux 上重置藍牙

有時我的藍牙滑鼠會與筆記型電腦斷開連線。關閉/打開滑鼠沒有幫助。關閉/打開我的筆記型電腦藍牙也沒有幫助。甚至沒有systemctl restart bluetooth.service幫助。

但是,如果我關閉筆記型電腦蓋子進入睡眠狀態並在幾秒鐘後重新打開它,則與 bt 滑鼠的連接將重新建立,然後一切正常。

重新啟動也沒有幫助。我必須關閉/打開筆記型電腦的電源

編輯: 根據要求,這裡是一些調試資訊:

$ systemctl status bluetooth.service

● bluetooth.service - Bluetooth service
   Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2018-09-05 09:44:14 CEST; 4h 5min ago
     Docs: man:bluetoothd(8)
 Main PID: 388 (bluetoothd)
   Status: "Running"
    Tasks: 1 (limit: 4915)
   Memory: 3.4M
   CGroup: /system.slice/bluetooth.service
           └─388 /usr/lib/bluetooth/bluetoothd

set 05 09:44:17 xps-13-luca bluetoothd[388]: Endpoint registered: sender=:1.77 path=/MediaEndpoint/A2DPSource
set 05 09:44:17 xps-13-luca bluetoothd[388]: Endpoint registered: sender=:1.77 path=/MediaEndpoint/A2DPSink
set 05 09:49:50 xps-13-luca bluetoothd[388]: Endpoint registered: sender=:1.159 path=/MediaEndpoint/A2DPSource
set 05 09:49:50 xps-13-luca bluetoothd[388]: Endpoint registered: sender=:1.159 path=/MediaEndpoint/A2DPSink
set 05 09:49:50 xps-13-luca bluetoothd[388]: RFCOMM server failed for Headset Voice gateway: rfcomm_bind: Address already in use (98)
set 05 09:49:50 xps-13-luca bluetoothd[388]: RFCOMM server failed for :1.159/Profile/HSPHSProfile/00001108-0000-1000-8000-00805f9b34fb: rfcomm_bind: Address already in use (9>
set 05 13:48:06 xps-13-luca bluetoothd[388]: Endpoint unregistered: sender=:1.77 path=/MediaEndpoint/A2DPSource
set 05 13:48:06 xps-13-luca bluetoothd[388]: Endpoint unregistered: sender=:1.77 path=/MediaEndpoint/A2DPSink
set 05 13:48:06 xps-13-luca bluetoothd[388]: Endpoint unregistered: sender=:1.159 path=/MediaEndpoint/A2DPSource
set 05 13:48:06 xps-13-luca bluetoothd[388]: Endpoint unregistered: sender=:1.159 path=/MediaEndpoint/A2DPSink

請考慮該問題Address already in use發生在 bt 滑鼠問題發生前幾個小時

輸出journalctl -xe很長..... https://pastebin.com/gViN5Tqp

答案1

我認為最簡單的方法就是bluetoothctl簡單地打開和關閉藍牙控制器本身。

echo -e 'show\npower off\npower on\nquit' | bluetoothctl

答案2

嘗試這個: sudo rfkill block bluetooth && sleep 0.1 && sudo rfkill unblock bluetooth;

答案3

嘗試卸載/載入 ( modprobe) 藍牙模組。

相關內容