Error when trying to connect to bluetooth speaker: `org.bluez.Error.Failed`

237,744

Solution 1

This may be due to the pulseaudio-module-bluetooth package not being installed. Install it if it missing, then restart pulseaudio.

sudo apt install pulseaudio-module-bluetooth 
pulseaudio -k
pulseaudio --start

If the issue is not due to the missing package, the problem in this case is that PulseAudio is not catching up. A common solution to this problem is to restart PulseAudio. Note that it is perfectly fine to run bluetoothctl as root while PulseAudio runs as user. After restarting PulseAudio, retry to connect. It is not necessary to repeat the pairing.

Continue trying second part only if above does not work for you:

If restarting PulseAudio does not work, you need to load module-bluetooth-discover.

sudo pactl load-module module-bluetooth-discover

The same load-module command can be added to /etc/pulse/default.pa. If that still does not work, or you are using PulseAudio's system-wide mode, also load the following PulseAudio modules (again these can be loaded via your default.pa or system.pa):

module-bluetooth-policy
module-bluez5-device
module-bluez5-discover

Solution 2

Try trusting the device first before paring the device.
I got the same error while attempt to pair my AirPods to Ubuntu 16.04.
In bluetoothctl with sudo I got

Attempting to pair with XX:XX:XX:XX:XX:XX  
Failed to pair: org.bluez.Error.AuthenticationCanceled

Attempting to connect to XX:XX:XX:XX:XX:XX  
Failed to connect: org.bluez.Error.Failed

Now this is what I've tried (full progress)

$ sudo bluetoothctl
[bluetooth]# power on
[bluetooth]# agent on
[bluetooth]# default-agent
[bluetooth]# scan on
[NEW] Device XX:XX:XX:XX:XX:XX David's AirPods
[bluetooth]# scan off
[bluetooth]# trust XX:XX:XX:XX:XX:XX
[bluetooth]# pair XX:XX:XX:XX:XX:XX
Attempting to pair with XX:XX:XX:XX:XX:XX
[CHG] Device XX:XX:XX:XX:XX:XX Connected: yes
[CHG] Device XX:XX:XX:XX:XX:XX UUIDs: ... 
[CHG] Device XX:XX:XX:XX:XX:XX UUIDs: ... 
[CHG] Device XX:XX:XX:XX:XX:XX UUIDs: ... 
[CHG] Device XX:XX:XX:XX:XX:XX UUIDs: ... 
[CHG] Device XX:XX:XX:XX:XX:XX UUIDs: ... 
[CHG] Device XX:XX:XX:XX:XX:XX UUIDs: ... 
[CHG] Device XX:XX:XX:XX:XX:XX UUIDs: ... 
[CHG] Device XX:XX:XX:XX:XX:XX UUIDs: ... 
[CHG] Device XX:XX:XX:XX:XX:XX Paired: yes
Pairing successful
[CHG] Device XX:XX:XX:XX:XX:XX Connected: no
[bluetooth]# connect XX:XX:XX:XX:XX:XX
Attempting to connect to XX:XX:XX:XX:XX:XX
[CHG] Device XX:XX:XX:XX:XX:XX Connected: yes
Connection successful
[bluetooth]# quit

Now the AirPods works beautifully between my iPhone and Ubuntu.

Solution 3

this procedure works for me, thx.

additional comments:

I was trying to add a bluetooth speaker, this was the error message that I had,

[NEW] Device FC:58:FA:B9:BF:A1 Anker A7910
[bluetooth]# connect FC:58:FA:B9:BF:A1
Attempting to connect to FC:58:FA:B9:BF:A1
[CHG] Device FC:58:FA:B9:BF:A1 Connected: yes
Failed to connect: org.bluez.Error.Failed
[CHG] Device FC:58:FA:B9:BF:A1 Connected: no
[CHG] Device FC:58:FA:B9:BF:A1 Connected: yes
[CHG] Device FC:58:FA:B9:BF:A1 Connected: no

I removed the device and then repeat all the steeps that David Jung share.

this is how it looks now:

[Anker A7910]# info FC:58:FA:B9:BF:A1
Device FC:58:FA:B9:BF:A1
    Name: Anker A7910
    Alias: Anker A7910
    Class: 0x260404
    Icon: audio-card
    Paired: yes
    Trusted: yes
    Blocked: no
    Connected: yes
    LegacyPairing: yes
    UUID: Serial Port               (00001101-0000-1000-8000-00805f9b34fb)
    UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
    UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
    UUID: A/V Remote Control        (0000110e-0000-1000-800

Thx again

Solution 4

In my case, a related error message (Failed to pair: org.bluez.Error.AuthenticationFailed) was happening just because the device was already paired to another source.

Lesson learned : When debugging bluetooth pairing issues, step zero should be checking the device is fully available to new connections, disconnected from any other source, and rebooting the source and the bluetooth device.

Solution 5

I got this error when I forgot to turn the bluetooth headset on. It showed up in bluetoothctl, but trying to connect failed with the same non-descriptive error. Turning on the device caused it to work fine, both through the desktop bluetooth panel and through bluetoothctl connect.

Share:
237,744

Related videos on Youtube

Username
Author by

Username

Updated on September 18, 2022

Comments

  • Username
    Username over 1 year

    I'm running Debian Jessie 8.2. I have a bluetooth USB dongle connected to my machine.

    I run sudo bluetoothctl -a then do the following:

    [NEW] Controller 5C:F3:70:6B:57:60 debian [default]
    Agent registered
    [bluetooth]# scan on
    Discovery started
    [CHG] Controller 5C:F3:70:6B:57:60 Discovering: yes
    [bluetooth]# devices
    [NEW] Device 08:DF:1F:A7:B1:7B Bose Mini II SoundLink
    [bluetooth]# pair 08:DF:1F:A7:B1:7B
    Attempting to pair with 08:DF:1F:A7:B1:7B
    [CHG] Device 08:DF:1F:A7:B1:7B Connected: yes
    [CHG] Device 08:DF:1F:A7:B1:7B UUIDs:
        0000110b-0000-1000-8000-00805f9b34fb
        0000110c-0000-1000-8000-00805f9b34fb
        0000110e-0000-1000-8000-00805f9b34fb
        0000111e-0000-1000-8000-00805f9b34fb
        00001200-0000-1000-8000-00805f9b34fb
    [CHG] Device 08:DF:1F:A7:B1:7B Paired: yes
    Pairing successful
    [CHG] Device 08:DF:1F:A7:B1:7B Connected: no
    [bluetooth]# trust 08:DF:1F:A7:B1:7B
    [CHG] Device 08:DF:1F:A7:B1:7B Trusted: yes
    Changing 08:DF:1F:A7:B1:7B trust succeeded
    [bluetooth]# connect 08:DF:1F:A7:B1:7B
    Attempting to connect to 08:DF:1F:A7:B1:7B
    Failed to connect: org.bluez.Error.Failed
    

    But I can connect to my iPhone this way. Why can't I connect to my Bose Mini II SoundLink speaker?

  • Username
    Username over 8 years
    Error when trying to install the package: ` Unable to locate package pulseaudio-bluetooth`
  • Username
    Username over 8 years
    I see now that you meant to type pulseaudio-bluetooth-module. I installed, then killed and started pulseaudio. I connected! There was no audio, but I fixed that by switching the speaker off then on again If you fix your typo, I can mark your answer correct.
  • kev
    kev almost 8 years
    On latest Raspbian OS, I need to type sudo apt install pulseaudio-module-bluetooth
  • Anatoly Scherbakov
    Anatoly Scherbakov over 7 years
    Same for Debian 8.
  • Jawad Mansoor
    Jawad Mansoor over 7 years
    When connected how can i send files from computer to my mobile device on Debian 8?
  • Edward Torvalds
    Edward Torvalds over 7 years
    @student this is a different issue, you might wanna post a new question on it
  • Username
    Username over 7 years
    @kev That's correct. Torvalds' answer has a typo, which I missed.
  • Garrett
    Garrett over 6 years
    @Grod, just because there is an accepted answer doesn't mean it works for everyone. In my case, the accepted answer did not work, but this one as well as removing the device first did work.
  • ffledgling
    ffledgling over 6 years
    FWIW, this works for me on Fedora 27 as well. Bluetooth module was already installed, but had to restart pulseaudio for some reason. :/
  • xji
    xji over 6 years
    Actually removing the device first and then re-pairing did it for me. Not sure why though.
  • LukeP
    LukeP over 6 years
    Thanks! I was trying to pair my magic keyboard and it was failing with "Failed to connect: org.bluez.Error.Failed" no matter what I tried. Only the sequence of: turn keyboard off then on again, scan on, trust XX, pair XX, connect XX worked.
  • infoclogged
    infoclogged about 6 years
    this was the most useful answer.. I tried all the solutions.. but this worked like a charm.
  • Julien L
    Julien L about 6 years
    2 weeks searching to fix bluetooth and you fixed it! Thanks for sharing!
  • alwe
    alwe almost 6 years
    after trying everything else - removing the devide and re-paring is the only things which works for me
  • Seamus
    Seamus about 5 years
    @kev: Tried your install on my RPi (raspbian stretch), then reboot, then start then load module, but under sudo bluetoothctl I still get: Failed to connect: org.bluez.Error.Failed when attempting to connect to my speaker. Ideas??
  • Cameron Tacklind
    Cameron Tacklind almost 4 years
    As of Raspbian Stretch, *this is no longer the *correct way to do bluetooth audio. Move away from pulseaudio. Use bluez-alsa.
  • Avindra Goolcharan
    Avindra Goolcharan almost 4 years
    Restarting pulseaudio may be all you need
  • kigiri
    kigiri over 3 years
    Same here, this is what did it for me, thanks a lot !
  • Davuz
    Davuz over 3 years
    I use package pulseaudio-module-bt from github.com/EHfive/pulseaudio-modules-bt It also works very well
  • Ynjxsjmh
    Ynjxsjmh over 3 years
    For arch user, you may do sudo pacman -S pulseaudio-bluetooth.
  • Mihai Tomescu
    Mihai Tomescu about 3 years
    Thanks, got it working on Ubuntu 20.04.2 LTS
  • Jeremiah Rose
    Jeremiah Rose almost 3 years
    This totally got my Jabra 75T Bluetooth earbuds working in Ubuntu 20.04!!!! I'd just been ready give up on them. Apparently the timing of commands is important. This is what I did: bluetoothctl remove <mac> && bluetoothctl pair <mac> && bluetoothctl connect <mac>
  • Vladislav Ivanishin
    Vladislav Ivanishin over 2 years
    Also, for me removing the device first helped (I used to connect to it, but did a factory reset since): remove XX:XX:XX:XX:XX:XX.
  • Udesh Ranjan
    Udesh Ranjan over 2 years
    its still showing me the error Failed to connect: org.bluez.Error.Failed
  • vinalti
    vinalti over 2 years
    What is the equivalent for Alsa Mixer ? I found bluealsa but I didn't get much luck to make it work, yet...
  • abu_bua
    abu_bua over 2 years
    Works fine on Debian11 and solved my headset problems. Thanks
  • Stephane
    Stephane over 2 years
    But how to check the state of fully available ?
  • Admin
    Admin almost 2 years
    this is the best answer