36

After upgrade from 17.10 to 18.04, any device I connect to only stays connected for a couple of seconds. My laptop is a Lenovo P50 (20ENCTO1WW)

/var/log/syslog reports:

pulseaudio[????]: [pulseaudio] bluez5-util.c: Information about device /org/bluez/hci0/dev_???????? invalid
bluetoothd[????]: Endpoint replied with an error: org.bluez.Error.InvalidArguments

Obviously the question marks represent some id's (pid's and bluetooth id in this case)

Any clue on fix or workaround?

7 Answers 7

75

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

9
  • 3
    This one worked for my Bluetooth headphones.
    – R. Gurung
    Jan 4, 2020 at 12:12
  • 2
    I had the same problem on other laptop using 20.04, and this solution WORKED for me. Jul 9, 2020 at 12:24
  • 4
    Works on Ubuntu 20.04! Sep 7, 2020 at 15:15
  • 1
    i had the same problem when connecting my android to 21.04, worked immediately..............
    – gabs1bb3
    Aug 27, 2021 at 15:18
  • 1
    This worked on 22.04. Thanks!
    – 1mi
    Sep 14 at 16:32
20

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.

4
  • 3
    Hey. When I ran pactl load-module module-bluez5-discovery. got this message Failure: Module initialization failed any idea how to debug? Jul 29, 2018 at 8:08
  • I edited the mistakes in the "pactl" command (removed the y after discover and also added sudo...
    – LifeBoy
    Oct 15, 2018 at 17:52
  • 2
    Make sure to follow the install steps described by @Dark Singularity in the "EDIT" section of their answer!
    – Gormador
    Jul 15, 2019 at 12:14
  • I'm getting Home directory not accessible: Permission denied as sudo and Failure: Module initialization failed as user.
    – xjcl
    Apr 10, 2021 at 14:06
10

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:

enter image description here

If it won't connect at all, maybe you have to update the driver as explained here.

1
  • 2
    Oh right! I've done that in the past, but for some reason forgot about doing this. I can confirm that it worked for my headset in Ubuntu 20.04 Focal Fossa.
    – chimeraha
    May 11, 2020 at 4:27
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 ...

0

I have the same issue with 20.04. I've posted my workaround in the following question, but unfortunately haven't found a complete solution:

Ubuntu 20.04 + Gnome 3.36.8: Bluetooth headset disconnects straight after connect

-1

Install pulseaudio-module-bluetooth:

sudo apt install pulseaudio-module-bluetooth

Then restart pulseaudio:

pulseaudio -k ; pulseaudio -D

Finally, try connecting again in the Bluetooth manager. You might also need to change some sound settings (type "sound" into the main menu) or reload the tab/program playing audio for everything to work properly.

-1
  1. Remove the device on Pulse Audio Bluetooth Devices

  2. Kill pulse audio and restart the Bluetooth service

sudo killall pulseaudio && sudo service bluetooth restart

Not the answer you're looking for? Browse other questions tagged or ask your own question.