I have a bluetooth headset (mpow H7) that has worked without issue with my Ubuntu 20.04 installation for 2 years. A couple of weeks ago, I started having trouble pairing it. I bought a new headset that is exactly the same model, but the problems continue.
No configuration changes have been made to the system in the previous few weeks. I've applied the normal ubuntu software and security updates, although there doesn't seem to be anything related to bluetooth.
The device can be paired normally for the first time. When it's switched off and on, the device says pairing, but it doesn't pair.
If I go to Gnome Settings > Bluetooth and look at the device before it's switched on, it shows as Disconnected. When I switch it on, I see it momentarily change to Connected and then back to Disconnected, and then the device says "pairing", but it doesn't connect.
If I click Disconnected, a dialog window with the device details are shown. When I switch it on, I can see the "Connection" slider slide on and off, like the "disconnected/connected" label in the main window. Then, while the device is in pairing mode, if I click the slider on again, the device will connect.
Personally, I find it much easier to have a terminal window open with the following command ready to run when I switch on my device:
bluetoothctl connect <device addr>
Then, I can just use the shell history, via the up cursor key, to run this command the next time I need it.
If this gives an error that it "failed", I run the following:
sudo systemctl daemon-reload
sudo systemctl restart bluetooth
# switch on device, enter pairing mode
bluetoothctl connect <device addr>
If it can't find the device, I enable scanning, and try to connect again:
bluetoothctl scan on
# switch on device, enter pairing mode
bluetoothctl connect <device addr>
I then disable scanning once it's working:
bluetoothctl scan off
Note, bluetoothctl can be used for initial setup instead of Gnome. As the device doesn't require the user to enter a code to pair it, the trust command is used:
bluetooth trust <device addr>
Although this workaround is quite reliable, it's pretty inconvenient. I'd really appreciate any suggestions on how to get it working normally again.