Since I grabbed a bluetooth speaker, I was facing the “Connection Failed: Stream setup failed” error with blueman-applet. The device would get connected in the Headset mode but the Audio Sync connection will always fail. The workaround was to kill pulseaudio with
pulseaudio -k
. In addition, I had to kill pulseaudio using killall -9 pulseaudio
for my latop speakers to work once I disabled bluetooth. I am using a minimal LXDE desktop environment and am stuck with the blueman-applet.
Today I took a stab at the problem. I referred to similar issue reports with audio headsets as well. I have the latest updates on Ubuntu 14.04.2 but users reported the problem on Ubuntu 13.10 as well. Without further ado, here’s how I fixed it:
- Edit /etc/bluetooth/audio.conf and uncomment the following line:
AutoConnect=true
- Run the following command to install latest packages forblueman and related modules:
$ sudo add-apt-repository ppa:blueman/ppa $ sudo apt-get update $ sudo apt-get upgrade blueman
- You will need to install the pulseaudio bluetooth module if it’s not installed already:
$ sudo apt-get install pulseaudio-module-bluetooth - Check if the following lines are added in /etc/pulse/default.pa:
.ifexists module-bluetooth-discover.so load-module module-bluetooth-discover .endif
If not, add the lines.
- Run blueman-applet. Right click on the panel applet and turn bluetooth on.
- The old profie of you bluetooth device would still be there, remove it. Right click on the blueman-panel applet and select Setup New Device. Complete the wizard for your device.
- Logout and login.
Now my device gets automatically connected and pavucontrol switches automatically to the bluetooth speaker (from laptop speaker or earphones).
In case you see a WiFi connection drop after connecting to the bluetooth device run the following command:
$ echo "options iwlwifi 11n_disable=1 bt_coex_active=0 power_save=0 auto_agg=0 swcrypto=1" | sudo tee -a /etc/modprobe.d/iwlwifi.conf > /dev/null
Leave a comment on how the procedure works for you.
Thank you, I finally suceed because of your blog post, thank you and now i can listen my music on my speaker 🙂 thank you again
Glad it helped!
Hi
I installed the new version a blueman. Before uppgrade i have no connection. I’ts better now, but after a few seconds bluetooth connection go down.
Can anything be done ?
Not sure. Works fine on my model. Raise a bug probably?
Does not work for me.. 🙁
Followed the procedure above, but got it connected once for 15 seconds. Otherwise the usual:
“Connection Failed: Stream setup failed”
Would you mind raising a bug for your model on Launchpad?
bluetooth seems fine, but i lost mouse track pad and wifi network. now i use external usb mouse and wired connection 🙁
I used to have wifi issues with the earlier version but the latest version works fine. Never faced any issue with mice.
Can you please raise a bug on the project with specifics?
i have just clean install , sorry, cannot raise a bug on the project.
i really concern about linux and opensource, i often bump into a set of instructions that meant to help us out, but it fail to do so…..
i tried the following command and it work fine, i hope you don’t mind my posting here
i got it when i google for bluetooth ubuntu audio sink fail…..
Thank you very much! You just created an example of the beauty of opensource and community work. I’ll add it right away! 🙂
I also noticed that the following are added by default in my /etc/pulse/default.pa:
pulseaudio-module-bluetooth
was installed already from the last iteration of trials with old blueman-applet. Which is why I didn’t face the issues you did.In my case despite having those lines (i.e. the module being loaded), automatic audio sync had problems with the older version of blueman-applet.
Anyway, I think the solution is near-complete now. The problems are not the same for all users and that was the intention behind the last line: “Leave a comment on how the procedure works for you.”
Hey thanks so much, all the other “solutions” on the web don’t work. Thanks so much!
I am using Xubuntu 15.05 and I needed to do the following
Volume Control –> Configuration
Here, I had to set the Profile to “High Fidelity Playback (A2DP)” for my BT speaker box.
Thanks again, you rock!
My pleasure!
I had same problem, now works perfectly. I have Ubuntu Studio 14.04 LTS. But I didn’t kill pulseaudio at all, only started from number 1.
Glad to know it helped!
Hey, thanks for the detailed instructions, I followed them.. still it doen’t work unfortunatley. My Bluetooth Speaker is connected and all, but Sound is still coming through the built in speakers.
When I try “pactl load-module module-bluetooth-discover” the initialzing fails.. I’m kind of desperate after hours of trying… any suggestions? Thank you anyway..
Sometimes the Bluetooth problem is hardware specific. Try raising a bug on Launchpad.
Thank You, worked well on my laptop with Lubuntu 15.04.
This works for me on my Acer Travelmate 5310, Linuxmint 17.3 Cinnamon and the JBL Charge speaker. In the past blueman saw and detected the bluetooth speaker but failed with connecting.
Thanks
My bluetooth speaker was connected for a while, but then it cut out and suddenly I am not longer able to get it to work. I can connect it using the blueman-applet, but the audio sink fails. If is pulseaudio -k the audio sink works, but then no sound comes out at all. I tried going to /etc/bluetooth/audio.conf to uncomment AutoConnect=true but I couldn’t find it there. Would you posting a screen shot of your terminal window while you’re editing the conf?
Thanks
Here’s the full conf:
Thanks for that, I found the line in the config and uncommented it. Unfortunately I went through the whole procedure step for step and it still doesn’t seem to be working (unless I’m missing something really obvious).
As it is now, blueman is saying that my headset is successfully added but fails to connect. The odd thing is that if I remove the headset and then go back through the “set up new device” procedure, the audio sink works (i.e. I get the message: “Device added and connected successfully”), but then when I play music it just plays through the laptop speakers.
Perhaps the issue is to do with pairing? When I get to that section in the setup wizard I skip the pairing, because it just says “pairing device” forever, and doesn’t seem to be progressing.
Any ideas? Like I said it was working earlier this morning, but then the headset lost power so I had to charge it for a while. After charging I reconnected and from then on it won’t connect.
Thanks for your help.
Can’t hint much without touching the hardware. In my experience the bluetooth issue is a very hardware and setup specific one. Going through the comments in this article might be of help. Few readers faced similar issues and solved them with additional steps. If nothing helps, please raise a bug on blueman. They should be able to move it to the right component.
Hey I fixed it! Simple solution but I’m not too savvy so I didn’t think to look for it. I followed these two steps:
* Open Puleseaudio volume control (pavucontrol), browse to “configuration” , use the dropdown to turn the Built-in audio profile “off”
* use the other dropdown to set the bluetooth device to use A2DP
Seems so obvious when I finally found it. Anyway, I appreciate your help, so thanks!
Glad to know everything is working fine for you!
This solution also worked for me (Linux Mint MATE 7.2). Thank you very much, Leo and Mailman 🙂
My pleasure!
Thanks so much, for me your solution worked!! This problem haunted me for so long now. Every Ubuntu I tried since 2 years or so had the same problem. Now I finally have BT Sound! You’re really great, and I think you should propose your solution to the maintainers if you didn’t try already!
What might be of interest is that in Linux Mint 17.x, BT sound always worked out of the box. Obviously somebody there took care about that…
Thanks again
Ansgar
Happy to be of help! 🙂
Merci, ça marche! Thank you so much, it works for me !
Welcome!
Brilliant! Many thanks.
It was peeing me off that any android smart phone could connect to my BT speakers & NAS from anywhere in the world but my Linux mint Couldn’t.
Now to fix the network access!!
All the best!
Followed when I had “Connection Failed: Stream setup failed” return from trying to establish A2DP connection on my paired Motorola S10-HD on a Toshiba laptop running Linux Mint 17.3 Rosa 64-bit. I was able to successfully re-pair the S10-HD and connect it as A2DP. It then made an appearance in the selections presented in Sound Preferences Output tab and I was able to play stereo sound through the headset once it was selected.
The side effect noticed so far is the disappearance of the speaker volume controls from the launch bar. The volume control is functional in the sound applications used and through Sound Preferences so not a big issue, but it would be nice to track down why.
I guess there is some issue between volume control and bluetooth A2DP. But didn’t dig much into that. Would love to see how it works in 16.04, the next LTS.
Worked for me!
Ubuntu Mate 14.04.
Worked for me on my Asus Zenbook Prime UX31A running Ubuntu 14.04, while several other suggested solutions did not. Thanks, friend!
I can’t believe my bluetooth headset is finally working on Ubuntu! This is perfect.
* Although after restart something happened with the boot and i got the error “Secure boot violation”. Anyway, I managed to get to the UEFI menu from Windows and disable secure boot. Now everything works just fine. Thanks!
The secure boot stuff is probably unrelated. The changes should not affect secure boot in any way.
Yes, it shouldn’t! That’s probably because when I ran “sudo apt-get upgrade blueman”, it updated many other modules as well, I don’t know why.
Bad news 🙁
Bluetooth stopped working completely. When I choose Turn bluetooth on from Bluetooth Manager, its icon disappears and nothing happens. Opening the standard bluetooth menu I can turn bluetooth on but I can’t connect to anything, and opening bluetooth manager gives me a blank screen with no devices and only the option to “Activate” the Adapter or Devices which does nothing.
Is the bluetooth service running? Otherwise, run:
Worked for me, thanks a lot! (Xubuntu 16.04)
It worked on my Ubuntu MATE 14.04.4 LTS with JBL Charge 2
Thanks
Thank you so much! It works fine with my JBL.
Awesome!