Ubuntu 18.04: Bluetooth device disconnects right after connect on Lenovo P50
Solution 1:
I had the same issue and solved it with the following steps:
sudo apt-get install pulseaudio-module-bluetooth
killall pulseaudio
Try to connect again.
Solution source
Solution 2:
I ran into this issue on my Lenovo P51 running Ubuntu 18.04, and I discovered that the pactl module "module-bluetooth-discover" was not loading properly at boot time. I fixed the issue by replacing it with "module-bluez5-discover" in my pulse configuration.
You can test this by running:sudo pactl unload-module module-bluetooth-discover
sudo pactl load-module module-bluez5-discover
And try to repair/reconnect your devices. If it works, replicate the following configuration in your /etc/pulse/default.pa config.
# Modify: /etc/pulse/default.pa
# Comment out the following line
.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif
# Replace it with ...
.ifexists module-bluez5-discover.so
load-module module-bluez5-discover
.endif
My suspicion is that this is a change that was made during the switch from Unity to Gnome and the leftover configurations remained, leaving the standard Bluetooth modules behind which don't load correctly.
After switching to bluez5, I have since had no issues, and Bluetooth connects without complaint on my mobile phone, mouse, and headset. :)
EDIT: I also followed several steps mentioned here: Bluetooth doesn't work after resuming from sleep, Ubuntu 18.04 LTS
To exactly replicate my configuration, make sure you apt-get install bluez blueman pulseaudio
to have all the same packages. As was suggested in the referenced problem, I believe this was caused by upgrading to 18.04 from 17.04.
Solution 3:
I also have this problem with my NC75 Pro headset from time to time. Dark Singularity's answer and ubuntu upgrade did not work for me.
The only workaround I found is to remove the device and install it again:
If it won't connect at all, maybe you have to update the driver as explained here.
Solution 4:
The solution which has worked for months, was to upgrade to a newer version of bluez, as described here: Bluetooth doesn't work after resuming from sleep, Ubuntu 18.04 LTS. But recently I experienced regression: I get the same behaviour as before. But in an attempt to solve it, I downgraded to an old version of bluez and later upgraded back to the same version that stopped working properly (5.50-0ubuntu0ppa1 in my case) which solved the problem for now. So reinstalling seems to fix or mitigate something. Seems likely this can happen again sometime in the future ...