On my laptop I use a Bluetooth keyboard and a Bluetooth mouse. Occasionally the Bluetooth adapter in the laptop shuts off completely, meaning that it becomes impossible to restart the Bluetooth service with sudo systemctl restart bluetooth.service
.
My troubleshooting points to powersaving as the cause of this intermittent failure, but the TLP setting that is supposed to prevent autosuspend on Bluetooth devices does not seem to prevent it. As a temporary workaround I am using the commands below to restart Bluetooth from the shell.
$ sudo rmmod btusb && sudo modprobe btusb && sudo systemctl restart bluetooth.service
This solution works on Debian testing bullseye with kernel x86_64 Linux 5.5.0-2-amd64.
Amazing, thanks! I had always restarted the whole system to fix this. I used your command in ubuntu and it solved the issue 🙂