[xenial] Bluetooth device doesn't play any sound in A2DP mode unless set to HSP/HFP first

Bug #1582213 reported by Saverio Miroddi on 2016-05-16
This bug affects 11 people
Affects Status Importance Assigned to Milestone
bluez (Ubuntu)
pulseaudio (Ubuntu)
Daniel van Vugt

Bug Description

Bluetooth device doesn't play any sound in A2DP mode unless set to HSP/HFP first. A2DP is the high quality profile used for Bluetooth speakers and music in general.

[Test Case]
1. Pair a Bluetooth audio device with Ubuntu.
2. Verify in Sound settings you have it set to A2DP mode.
3. Turn off and then on the Bluetooth device.
4. Verify the device has reconnected and if not, force it to in the Bluetooth indicator menu.
5. Open Sound settings again, select the device and verify it's reappeared in A2DP mode.
6. Click 'Test Sound'.
Expected: Sound can be heard from the Bluetooth device.

[Regression Potential]
Low. The SRU focuses on Bluetooth logic in pulseaudio, so that is the main area affected. A combination of related A2DP bugs in pulseaudio in xenial means it is difficult to get working at all without this patch. So highly unlikely Bluetooth audio support could get worse. Since pulseaudio itself is being modified there is always a regression potential in support for other audio devices, but several audio devices have been tested and all continue to work well with the patch.

[Other notes]
Related to bug 1283003 and bug 1438510. Possibly others too.

Please note that Bluetooth and Bluetooth audio support in xenial is still not perfect. This SRU only aims to address a few of the most troublesome issues. Please consider the fact that this is an incremental improvement and some people are still likely to experience some bugs related to pulseaudio and Bluetooth, even after this SRU.

The patch was authored by Luke Yelavich with help from Konrad Zapałowicz. And it has received further testing over the past two months by Konrad, Jim Hodapp and Daniel van Vugt. The debdiff proposed here only changes the changelog wording from Luke's original PPA.

[Original Description]
I have a Sennheiser MM 450-X headset.

In 15.10, connection & playback was straightforward.

In 16.04, the headset connects, and shows up as default playback device on `pavucontrol`, but there is no sound.

A functional workaround is to, after having connected it, to go the `Configuration` tab, and in the `Profile` dropdown, to choose `... HSP/HFP`, which will make them play as expected (but in low quality), then switch to `... A2DP Sink` (they will play in high quality).

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: pulseaudio-module-bluetooth 1:8.0-0ubuntu3
ProcVersionSignature: Ubuntu 4.4.0-22.39-generic 4.4.8
Uname: Linux 4.4.0-22-generic x86_64
NonfreeKernelModules: zfs zunicode zcommon znvpair zavl nvidia_uvm nvidia_drm nvidia_modeset nvidia
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
 /dev/snd/controlC1: myuser 2936 F.... pulseaudio
 /dev/snd/controlC2: myuser 2936 F.... pulseaudio
 /dev/snd/controlC0: myuser 2936 F.... pulseaudio
Date: Mon May 16 14:18:58 2016
EcryptfsInUse: Yes
InstallationDate: Installed on 2016-03-11 (66 days ago)
InstallationMedia: Xubuntu 16.04 LTS "Xenial Xerus" - Alpha amd64 (20160224)
 Error: command ['pacmd', 'list'] failed with exit code 1: Home directory not accessible: Permission denied
 No PulseAudio daemon running, or not running as session daemon.
SourcePackage: pulseaudio
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 04/22/2015
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: F5
dmi.board.asset.tag: To be filled by O.E.M.
dmi.board.name: F2A88XN-WIFI
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: x.x
dmi.chassis.asset.tag: To Be Filled By O.E.M.
dmi.chassis.type: 3
dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
dmi.chassis.version: To Be Filled By O.E.M.
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrF5:bd04/22/2015:svnGigabyteTechnologyCo.,Ltd.:pnTobefilledbyO.E.M.:pvrTobefilledbyO.E.M.:rvnGigabyteTechnologyCo.,Ltd.:rnF2A88XN-WIFI:rvrx.x:cvnGigabyteTechnologyCo.,Ltd.:ct3:cvrToBeFilledByO.E.M.:
dmi.product.name: To be filled by O.E.M.
dmi.product.version: To be filled by O.E.M.
dmi.sys.vendor: Gigabyte Technology Co., Ltd.

Sebastien Bacher (seb128) wrote :

Luke, do you know if that's a pulseaudio or bluez issue?

Changed in pulseaudio (Ubuntu):
assignee: nobody → Luke Yelavich (themuso)
importance: Undecided → Low

I know there has been some discussion upstream about bluez 5 and different profiles, but I haven't followed it closely so not sure if related.

Mary, could you please try and get a log from PulseAudio, as outlined at https://wiki.ubuntu.com/PulseAudio/Log.


OK, log is attached.

The operation, in detail is:

- I've started the (ad-hoc configured) pulseaudio
- Connected the headphones
- Opened a video in VLC
  - nothing from the HPs
  - opened pavucontrol
    - the VLC output was set as HPs; under `Configuration`, the profile was `A2DP Sink`
- Changed profile to `HSP/HFP`

The sound was now playing through the HPs.
In real world use case, I would switch again to A2DP, but it's irrelevant for debugging (I assume everything works as expected the moment I switch profile).

description: updated
Changed in pulseaudio (Ubuntu):
assignee: Luke Yelavich (themuso) → nobody
summary: - Bluetooth headset doesn't play any sound (regression)
+ Bluetooth headset doesn't play any sound in A2DP mode unless set to
+ HSP/HFP first

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in pulseaudio (Ubuntu):
status: New → Confirmed
Changed in bluez (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Changed in pulseaudio (Ubuntu):
importance: Low → High
summary: - Bluetooth headset doesn't play any sound in A2DP mode unless set to
+ Bluetooth device doesn't play any sound in A2DP mode unless set to
HSP/HFP first
summary: - Bluetooth device doesn't play any sound in A2DP mode unless set to
- HSP/HFP first
+ [xenial] Bluetooth device doesn't play any sound in A2DP mode unless set
+ to HSP/HFP first
description: updated
hife (hife) wrote :

I am experiencing the same problem, however, switching to HSP/HPF and back will not work (when selecting A2DP from the dropdown menu in the audio settings, the output sink switches to internal audio and when reselecting bluetooth it is again in HSP/HPF mode). Only connecting as HSP/HPF and then switching to A2DP will allow for HiFi sound.

A more convenient workaround can be found here: https://gist.github.com/pylover/d68be364adac5f946887b85e6ed6e7ae

Running a2dp.py after connecting fixes the problem.

The page also provides an automated solution using a dbus-loop below. Or you can find an implementation using udev rules here: https://askubuntu.com/questions/910501/udev-rule-to-run-python-script/912838#912838

tags: added: a2dp
Daniel van Vugt (vanvugt) wrote :

Confirmed on xenial, exactly how hife describes it.

Changed in pulseaudio (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
status: Confirmed → In Progress
Changed in bluez (Ubuntu):
status: Confirmed → Invalid
description: updated
description: updated
description: updated
Daniel van Vugt (vanvugt) wrote :

Attached debdiff for updating xenial to pulseaudio 1:8.0-0ubuntu3.3, in order to address a few problems with Bluetooth audio (A2DP).

description: updated

Solves the problem for me (ppa:ubuntu-audio-dev/pulse-testing).

I can't comment on the reliability, since I've tested the procedure only a few times, but I don't need anymore to perform the disconnection/reconnection dance.

Jeremy Bicha (jbicha) on 2017-05-28
no longer affects: bluez (Ubuntu Xenial)
Changed in pulseaudio (Ubuntu):
status: In Progress → Fix Released
Changed in pulseaudio (Ubuntu Xenial):
importance: Undecided → High
status: New → Triaged
Changed in pulseaudio (Ubuntu Xenial):
status: Triaged → Fix Released
status: Fix Released → In Progress
Changed in pulseaudio (Ubuntu):
assignee: Daniel van Vugt (vanvugt) → nobody
Changed in pulseaudio (Ubuntu Xenial):
assignee: nobody → Daniel van Vugt (vanvugt)
Doug Morse (dm-dougmorse) wrote :

I must unfortunately report that that the recently reported fix does not work for me. Ubuntu 16.04 LTS connecting to Amazon Echo. Pulseaudio 1:8.0-0ubuntu3.3~xenial1, which is the latest presently available from ppa:ubuntu-audio-dev/pulse-testing as of today.

The problem appears to result in the same conditions as I have comment on in bug 1691556 and discussed at askubuntu.com https://askubuntu.com/questions/871630/cant-send-audio-to-amazon-echo-via-bluetooth

Here are the syslog entries from testing today after installing the latest from pulseaudio-testing:

Jun 1 10:24:23 n1 bluetoothd[1031]: a2dp-source profile connect failed for 50:F5:DA:A6:3F:EA: Device or resource busy
Jun 1 10:24:23 n1 kernel: [ 423.337550] input: 50:F5:DA:A6:3F:EA as /devices/virtual/input/input22
Jun 1 10:24:26 n1 bluetoothd[1031]: /org/bluez/hci0/dev_50_F5_DA_A6_3F_EA/fd1: fd(23) ready
Jun 1 10:25:26 n1 pulseaudio[5001]: [pulseaudio] sink-input.c: Failed to create sink input: sink is suspended.
Jun 1 10:25:41 n1 kernel: [ 500.946349] perf interrupt took too long (5021 > 5000), lowering kernel.perf_event_max_sample_rate to 25000
Jun 1 10:25:28 n1 pulseaudio[5001]: message repeated 5 times: [ [pulseaudio] sink-input.c: Failed to create sink input: sink is suspended.]

hife (hife) wrote :

ppa:ubuntu-audio-dev/pulse-testing solves the problem for me.

However, now when module-switch-on-connect is not loaded, sound will switch to bluetooth device, but neither System-Settings -> Sound nor indicator-sound make the switch to bluetooth device, making volume control unavailable without switching the setting manually. When the module is loaded, everything works as intended.

Doug Morse (dm-dougmorse) wrote :

@hife and @Mary Sherman (spot9019):

You both indicate that the latest pulse-testing ppa fixes the problem for you.

Can you both indicate whether you are running Unity as the desktop or KDE or perhaps some other?

I still have suspicions that there may be a permissions issue that is specific to Unity (which is the desktop I use and for which the fix does NOT work, at least for me).


I'm on XFCE.

hife (hife) wrote :

@Doug Morse (dm-dougmorse): I am running Unity on Ubuntu 16.04 LTS, Pulseaudio 1:8.0-0ubuntu3.3~xenial1, looks the same as yours. More details of my system may be found in my duplicate report: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1651428

From the reports you linked, I would assume at least the workaround from my first comment: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1582213/comments/6 could still help.

Doug Morse (dm-dougmorse) wrote :
Download full text (3.2 KiB)


@hife and @Mary Sherman (spot9019): Thanks for the speedy replies!


@hife: Thanks for describing your workaround in greater detail.

I've already tried the a2dp.py script, it doesn't fix the problem for me. I just downloaded again the latest version and tried again, no joy:


morse@n1 ~> ./a2dp.py
Connection MADE
Selecting device:
1. 0C:47:C9:0A:F6:F8 Amazon Tap-364
2. 00:0C:8A:58:F6:CA Bose SoundLink Mobile speaker II
3. 28:FD:80:00:86:85 Earin L
4. 50:F5:DA:A6:3F:EA Echo-JS6
Select device[1]:
Device MAC: 50:F5:DA:A6:3F:EA
Device ID: bluez_card.50_F5_DA_A6_3F_EA
Sink: bluez_sink.50_F5_DA_A6_3F_EA
Updating default sink to bluez_sink.50_F5_DA_A6_3F_EA
Setting the off profile
Disconnecting the device.
Connecting again.
Cannot find `bluez_card.50_F5_DA_A6_3F_EA` using `pactl list cards short`. Retrying 4 more times
Cannot find `bluez_card.50_F5_DA_A6_3F_EA` using `pactl list cards short`. Retrying 3 more times
Cannot find `bluez_card.50_F5_DA_A6_3F_EA` using `pactl list cards short`. Retrying 2 more times
Cannot find `bluez_card.50_F5_DA_A6_3F_EA` using `pactl list cards short`. Retrying 1 more times
Device ID: bluez_card.50_F5_DA_A6_3F_EA
Setting the a2dp profile
Updating default sink to bluez_sink.50_F5_DA_A6_3F_EA
Ignoring: Command: pacmd list-sink-inputs | grep "index:" failed with status: 1
Exiting bluetoothctl
"Enjoy" the HiFi stereo music :)
morse@n1 ~> pacmd list-sink-inputs
0 sink input(s) available.


When I run this a2dp.py script and get the output above, the following are posted in syslog:


Jun 3 13:10:19 n1 acpid: input device has been disconnected, fd 22
Jun 3 13:10:24 n1 bluetoothd[929]: a2dp-source profile connect failed for 50:F5:DA:A6:3F:EA: Device or resource busy
Jun 3 13:10:24 n1 kernel: [124613.035699] input: 50:F5:DA:A6:3F:EA as /devices/virtual/input/input26
Jun 3 13:10:27 n1 bluetoothd[929]: /org/bluez/hci0/dev_50_F5_DA_A6_3F_EA/fd14: fd(22) ready

When I run "pactl list sinks", I see sinks #0 and #1 as the built-in headphone jack, and then the Amazon Echo as sink #15 in a suspended state:

Sink #15
 Name: bluez_sink.50_F5_DA_A6_3F_EA
 Description: Echo-JS6
 Driver: module-bluez5-device.c
 Sample Specification: s16le 2ch 44100Hz
 Channel Map: front-left,front-right
 Owner Module: 49
 Mute: Nein
 Volume: front-left: 65536 / 100% / 0,00 dB, front-right: 65536 / 100% / 0,00 dB
         balance 0,00
 Base Volume: 65536 / 100% / 0,00 dB
 Monitor Source: bluez_sink.50_F5_DA_A6_3F_EA.monitor
 Latency: 0 usec, configured 0 usec
  bluetooth.protocol = "a2dp_sink"
  device.description = "Echo-JS6"
  device.string = "50:F5:DA:A6:3F:EA"
  device.api = "bluez"
  device.class = "sound"
  device.bus = "bluetooth"
  device.form_factor = "speaker"
  bluez.path = "/org/bluez/hci0/dev_50_F5_DA_A6_3F_EA"
  bluez.class = "0x0c0414"
  bluez.alias = "Echo-JS6"
  device.icon_name = "audio-speakers-bluetooth"
  speaker-output: Lautsprecher (priority: 0)
 Aktive Profile: speake...


Doug Morse (dm-dougmorse) wrote :
Download full text (4.3 KiB)

The problem appears to be with setting up the input sink, which I couldn't care less about. If any knows of a way for bluez / pulseaudio to force a device to just connect as an output-only device (e.g., normal bluetooth speaker), I think I'd be fine, as I have no problems with numerous other bluetooth speakers.

If not, I think for me the key is to figure out why the input sink cannot be established due to the "device or resource busy" message. If I could figure out how to a detailed debug / strace of bluetoothd when it tries to establish the input sink, that'd be most helpful. I've tried before w/o finding anything helpful.

For me, I think the issue is not with pulseaudio but truly with bluez.

Given this, I'd like to request that my bug 1691556 be re-opened and unmarked as a duplicate. From my perspective, no evidence or explanation has been given for why my report was marked as a duplicate as this one. The errors I've been continually reporting are different than those reported by others, and the fixes that seem to work for others do not work for me.

For the record, here are the pulseaudio and bluez packages I presently have installed on my Ubuntu 16.04.02 LTS 64-bit on an Intel NUC i5 (NUC5i5RYH):


morse@n1 intel-nuc-i5-n1> dpkg -l bluez* pulsea*
Gewünscht=Unbekannt/Installieren/R=Entfernen/P=Vollständig Löschen/Halten
| Status=Nicht/Installiert/Config/U=Entpackt/halb konFiguriert/
         Halb installiert/Trigger erWartet/Trigger anhängig
|/ Fehler?=(kein)/R=Neuinstallation notwendig (Status, Fehler: GROSS=schlecht)
||/ Name Version Architektur Beschreibung
ii bluez 5.37-0ubuntu5 amd64 Bluetooth tools and daemons
un bluez-alsa <keine> <keine> (keine Beschreibung vorhanden)
un bluez-audio <keine> <keine> (keine Beschreibung vorhanden)
ii bluez-cups 5.37-0ubuntu5 amd64 Bluetooth printer driver for CUPS
un bluez-gnome <keine> <keine> (keine Beschreibung vorhanden)
un bluez-input <keine> <keine> (keine Beschreibung vorhanden)
un bluez-network <keine> <keine> (keine Beschreibung vorhanden)
ii bluez-obexd 5.37-0ubuntu5 amd64 bluez obex daemon
un bluez-serial <keine> <keine> (keine Beschreibung vorhanden)
un bluez-utils ...


Daniel van Vugt (vanvugt) wrote :


I have spent some time looking at the major Bluetooth/audio pain points recently. And a common problem is simply that some bugs are oversubscribed. Everyone experiences bugs slightly differently and it clouds the issue to the point of us not being able to ever close it.

But the answer is simple: If your name is not Mary Sherman and you continue to experience problems even with the PPA (and after rebooting) then please log a separate bug of your own.

P.S. Also generally speaking Bluetooth audio support is still maturing so my advice is if you rely on Bluetooth audio then you should be using the latest (17.04+) Ubuntu release. It certainly was not ready for general usage in 16.04.

Doug Morse (dm-dougmorse) wrote :

@Daniel van Vugt (vanvugt): Thanks for your assistance!

I am not Mary Sherman, and I'm continuing to experience this problem, even with the PPA and after rebooting.

I didn't subscribe to this bug, I didn't even know about it. I report bug 1691556 and you marked it a duplicate of this one.

As I have already requested, kindly re-open my bug 1691556, as I don't believe I can re-open it myself.

Finally, I'd like to see this fixed in 16.04. It's LTS, and that's important to me (and a lot of users). If that means I have to help with backport, I'm happy to do so. In addition, if I can be helpful with debugging, I'd be happy to do so, and have tried. It's just not clear to me at this point how to get better / more detailed debugging info. What I did try per https://wiki.ubuntu.com/DebuggingBluetooth didn't reveal anything helpful. For me, I believe the key issue is figuring out the "Device or resource busy" error (as I've mentioned here and in my original bug report).

Daniel van Vugt (vanvugt) wrote :


Also note we are working to release at least one significant update soon for Ubuntu 16.04 Bluetooth audio support. So the PPA fixes will go mainstream...

Sebastien Bacher (seb128) wrote :

Thanks for the work Daniel, I've sponsored to Xenial let's see what the proposed testing is going

Changed in pulseaudio (Ubuntu Xenial):
status: In Progress → Fix Committed
Daniel van Vugt (vanvugt) wrote :

I'm not familiar with what Fix Committed means on SRUs, but will keep an eye on:

(it's not there yet)

Daniel van Vugt (vanvugt) wrote :

Still waiting on sponsorship. Someone unsubscribed the sponsors so I have resubscribed them. The debdiff is in comment #8 above.

Please be careful not to confuse this with bluez. This one is about pulseaudio, which is where bluetooth audio is implemented.

Changed in pulseaudio (Ubuntu Xenial):
status: Fix Committed → In Progress
Sebastien Bacher (seb128) wrote :

It has been sponsored but SRU go first to the "unapproved" queue where a SRU team member need to review and accept them

Sebastien Bacher (seb128) wrote :

("in progress" is correct, "fix commited" should be set by the SRU team when they accept the upload according to https://wiki.ubuntu.com/StableReleaseUpdates)

Hello Mary, or anyone else affected,

Accepted pulseaudio into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/pulseaudio/1:8.0-0ubuntu3.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in pulseaudio (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed
Chris Halse Rogers (raof) wrote :

I've accepted this SRU to xenial-proposed.

Can I confirm that this bug is already fixed in yakkety and zesty? If not, could you please upload fixes for those releases, too. We need to ensure that upgrades don't regress.

Is the package in xenial-proposed exactly the same as the one in `ppa:ubuntu-audio-dev/pulse-testing` (based on the version, I'd say so)?

If so, then I've been using it for a few weeks now, and it fixed the problem for me.

Daniel van Vugt (vanvugt) wrote :

Yes, it's exactly the same in code. Only the changelog text was modified.

tags: added: verification-done
removed: verification-needed
Daniel van Vugt (vanvugt) wrote :

Also verified again by me using the proposed packages....

tags: added: verification-done-xenial
removed: verification-done
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pulseaudio - 1:8.0-0ubuntu3.3

pulseaudio (1:8.0-0ubuntu3.3) xenial; urgency=medium

  [Luke Yelavich, Konrad Zapałowicz]
  * Fixed multiple interrelated problems with using Bluetooth audio (A2DP),
    where users would experience some combination of:
    - Bluetooth headset/speakers listed but not selectable in Sound settings
      (LP: #1283003)
    - [regression] Bluetooth audio no longer supports A2DP (stuck in HSP/HFP
      mode) (LP: #1438510)
    - [xenial] Bluetooth device doesn't play any sound in A2DP mode unless set
      to HSP/HFP first (LP: #1582213)
  * Specific patches from upstream used to address the above problems:
    - 0103-bluetooth-Add-support-for-automatic-switch-between-h.patch
    - 0104-bluetooth-Add-support-for-automatic-switch-bluez5.patch
    - 0106-bluetooth-Add-optional-heuristic-for-switching-betwe.patch
      . Backport from upstream to fix a bug in Xenial where an incorrect
        audio profile is applied for a headset connected over Bluetooth
        making using it impossible.
    - 0105-bluetooth-policy-do-A2DP-profile-restoring-a-bit-lat.patch
      . Fix a crash that happens if the BT headset is the only non-monitor
        source in the system and the last "phone" stream dies.
    - 0700-pulsecore-add-new-card-profile-hook.patch
      . Backport from upstream (commit 7b6260140149) to allow for correct
        profile selection.
    - 0701-bluetooth-bluez5-wait-for-all-profiles-to-connect.patch
      . Backport from upstream waiting for all profiles to connect before
        creating a card.

 -- Daniel van Vugt <email address hidden> Tue, 23 May 2017 16:24:14 +0800

Changed in pulseaudio (Ubuntu Xenial):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for pulseaudio has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers