Bluetooth headphones default to low quality headset mode and fail to switch to A2DP when selected

Bug #1845046 reported by Nicholas Owens
250
This bug affects 112 people
Affects Status Importance Assigned to Milestone
bluez (Ubuntu)
Fix Released
High
Unassigned
Bionic
Fix Released
High
Daniel van Vugt
Eoan
Fix Released
High
Daniel van Vugt
Focal
Fix Released
High
Unassigned

Bug Description

[Impact]

Whenever I turn on my headphones they'll connect to my computer but I'm able to hear the input audio from my microphone and low quality output audio. I have to disconnect the headphones in the bluetooth devices and reconnect for it to fix the problem.

[Test Case]

0. Set up your Bluetooth headphones with Ubuntu.
1. Turn off the headphones.
2. Turn on the headphones.
3. In Settings>Sound verify they have reconnected in A2DP mode (stereo, high quality, no microphone support).

[Regression Potential]

Low. Only the headset code path is affected and the fix has already been released for some time in BlueZ 5.51 onward.

Revision history for this message
Nicholas Owens (litleck) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It sounds like the main problem here is that it's defaulting to low quality audio mode (which is headset mode with microphone support). And you were expecting high quality audio mode by default.

You can select that manually in:

  Settings > Sound > Output > Profile ...

tags: added: a2dp
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Please try that to confirm that profile selection is the problem here.

Changed in pulseaudio (Ubuntu):
status: New → Incomplete
Changed in gnome-control-center (Ubuntu):
status: New → Incomplete
Revision history for this message
Nicholas Owens (litleck) wrote :

Whenever I first connect its set to Headset Head Unit but then I switch to High Fidelity Playback and have to disconnect and reconnect in the Bluetooth settings for it to change.

Changed in pulseaudio (Ubuntu):
status: Incomplete → New
Changed in gnome-control-center (Ubuntu):
status: Incomplete → New
Changed in pulseaudio:
status: Unknown → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in gnome-control-center (Ubuntu):
status: New → Confirmed
Changed in pulseaudio (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Ignore the above "Fix Released". That's just a Launchpad issue where it can't tell the reason for an upstream bug being closed. In fact that user just gave up and closed their own bug.

I've confirmed the problem exists in both 18.04 and 19.10 today.

tags: added: disco eoan
Revision history for this message
Sebastien Bacher (seb128) wrote :

Daniel, could you maybe reopen/provide the info upstream if you are able to trigger the issue?

Revision history for this message
Sebastien Bacher (seb128) wrote :

(also gnome-control-center shouldn't be involved when disconnecting/reconnecting, it has no service or anything listening to even, it is just an UI to apply changes, the issue is more likely on the pulseaudio side (unless g-c-c does the wrong thing when apply configs)

Changed in gnome-control-center (Ubuntu):
importance: Undecided → Low
Changed in pulseaudio (Ubuntu):
importance: Undecided → High
no longer affects: pulseaudio
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: Bluetooth headphones/speaker default to low quality headset mode and fails to switch to A2DP when selected

I wonder if there's something special about Sony...

* This bug was reported against Sony WH-1000XM3
* A duplicate bug was reported against Sony MDR-1000x
* I also encountered the bug once using Sony SRS-XB2 speakers

summary: - [WH-1000XM3, playback] Hearing input and output audio until
- disconnecting and reconnecting
+ Bluetooth headphones/speaker default to low quality headset mode instead
+ of high quality A2DP and can't be easily changed in Settings
summary: - Bluetooth headphones/speaker default to low quality headset mode instead
- of high quality A2DP and can't be easily changed in Settings
+ Bluetooth headphones/speaker default to low quality headset mode and
+ fails to switch to A2DP when selected
Revision history for this message
Rob Frohne (frohro) wrote :

I spent 45 minutes playing with this problem this morning. I restarted my computer this morning, but nothing helped. Now, after work, where the computer was in suspended, but not restarted, and used periodically, and it works just fine. I did connect another headset to see if it was a Sony problem, and now both headsets work as expected. I do know that A2DP is deactivated if you select the microphone on the headset, but this morning I switched that back and forth several times with no effect. Fortunately, or unfortunately as it may be, I cannot now duplicate the results I had this morning, and I can't figure out why. It may have happened when I connected the headset to bluetooth again to test this evening. I cannot remember if I disconnected the headset and reconnected it this morning.

Rob

Revision history for this message
Ronni (ronni-jensen) wrote :

I'm affected by this as well, with a Sony MDR-XB950BT - but it behaves as intended in both Fedora and openSUSE.

Revision history for this message
Daniel Boros (trinimac) wrote :

I have the same issue with PL BackBeat PRO in 19.10

Changed in bluez (Ubuntu):
importance: Undecided → High
status: New → Confirmed
Revision history for this message
jurosh (jurosh) wrote :

I sometimes trying to fix this for minutes, without any luck. But also realized that when reconnecting there should be connected another headphones, even if usb c one. Will be watching bwhaviour. Having issues with Sone 1000xm3.

Revision history for this message
Yorick (yorickvanpelt) wrote :

This is likely a bluez bug, not a pulseaudio one, since it only affects some headsets.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Regardless of whether bluez or pulseaudio are at fault, this feels like a recent regression since it's now affecting my Bluetooth speaker hardware which has been unchanged for several years. And it looks like 18.04 and later received updates to both packages this year.

I guess the most useful thing to do would be to try a fresh 18.04 installation with the oldest packages, verify the bug does not exist and then figure out which update introduced the bug.

Revision history for this message
Balazs Gyurak (ba32107) wrote :

I have the same problem with Sony wh-1000xm3 and Ubuntu 19.10.

Revision history for this message
Stefano Dafarra (sdafarra) wrote :

I have the same problem with Sony WF-1000XM3 and Ubuntu 16.04. I realized that when the headphones connect automatically, they don't appear when running ``pacmd list-sinks``. If I disconnect and reconnect them manually, they do and a2dp is used.

I wrote a couple of scripts to automatize this and temporarily circumvent the issue.

Revision history for this message
Alistair Cunningham (acunningham) wrote :

Is anything happening with solving this?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Sorry, I have been on a long vacation and nobody else has taken this bug up in the meantime. I plan to do the testing described in comment #16 before the end of the year.

Revision history for this message
Norberto (nagno) wrote :

Same issue here with Sony WH-1000XM3 and Ubuntu 19.10.
When it connects automatically it connects with HSP and I'm not able to select A2DP in Bluez.
However when I disconnect the headset using bluez and reconnect it as Audio Sink, it works properly.

Revision history for this message
s.illes79 (s-illes79-gmail) wrote :

Same problem with Sony WH-1000XM2

My workaround is

1. Turn on headphone, wait to connect with low quality sink
2. Turn off bluetooth, wait couple of seconds and turn on
3. Reconnect headphones.

Works all the time.

Ubuntu: 18.04
Sony WH-1000XM2

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I built a new 18.04 machine just to test this bug. So far no luck reproducing it with the Sony speaker I mentioned. I'll have to try some Sony headphones, and possibly rebuild the machine again.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Progress, and some bad news... Testing with Sony WH-1000XM3 I can reproduce the bug easily. But it's not a recent regression if at all. The same bug occurs in an original Ubuntu 18.04 install without any updates.

I'm tempted to clarify that Sony WH-1000XM3 is our main test case here. Any future fix might benefit multiple different models, but it seems the WH-1000XM3 is presently very popular and is what the original reporter(s) of three quarters of these bug reports are using.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Also confirmed the bug does NOT exist in Ubuntu 20.04. But more testing would be required to identify which package has fixed it.

summary: - Bluetooth headphones/speaker default to low quality headset mode and
- fails to switch to A2DP when selected
+ Bluetooth headphones/speaker such as Sony WH-1000XM3 default to low
+ quality headset mode and fails to switch to A2DP when selected
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: Bluetooth headphones/speaker such as Sony WH-1000XM3 default to low quality headset mode and fails to switch to A2DP when selected
Changed in pulseaudio (Ubuntu):
status: Confirmed → Invalid
Changed in gnome-control-center (Ubuntu):
status: Confirmed → Invalid
Changed in bluez (Ubuntu):
status: Confirmed → Fix Released
Changed in bluez (Ubuntu):
milestone: none → ubuntu-19.12
Revision history for this message
Alistair Cunningham (acunningham) wrote :

I can confirm that installing these packages onto Ubuntu 19.10 fixes the problem for my Sony WH-1000XM3. Thank you very much Daniel!

Revision history for this message
Yura Pakhuchiy (yura-p) wrote :

May we have this backported to 18.04?

Revision history for this message
Yura Pakhuchiy (yura-p) wrote :

BTW, just applying this patch[1] to bluez package from 18.04 fixes the a2dp problem for me with Sony WH-CH700N headphones. Patch applies cleanly to 5.48.

1. https://git.kernel.org/pub/scm/bluetooth/bluez.git/patch/?id=477ecca127c529611adbc53f08039cefaf86305d

Revision history for this message
Samu Nuutamo (carbon) wrote :

I can confirm that applying the patch from #30 in 18.04 does seem to fix the problem when using WH-1000XM3.

Revision history for this message
Jason Bodnar (jason-shakabuku) wrote :

Applying the patch fixed my problem with my Sony WH-H900N headphones.

Probably a different bug but if I open Sound Settings -> Input and change the input from "Internal Microphone Built-in Audio" to "Headset WH-H900N (h.ear)" the quality degrades and the Output profile changes to "Headset Head Unit (HSP/HFP)". If I change the Output profile back to "High Fidelity Playback (A2DP Sink)" I get high quality audio again but the Input changes back to "Internal Microphone Built-in Audio".

Or is it that you can't use the headset microphone and get high quality audio at the same time?

Revision history for this message
Magne H (magnenetwork) wrote :

The following did the job for me. Remember to change the headset to AD2P under SOUNDS in Ubuntu on your headset.

---

Ref. from source:

https://askubuntu.com/questions/1139404/sony-noise-cancelling-headphones-wh-1000xm2-3-and-bluetooth-initial-autoconnec

---

The "ambient noise" you're hearing is a loopback from your computer's mic coming out through your headphones.

This is apparently due to a bug with A2DP's implementation.

I fixed this in Ubuntu 19.04 by installing Blueman and pairing my headphones as an Audio Sink rather than a headset:

    Unpair your headphones, if they're currently paired.
    sudo apt install blueman
    Open Blueman, click on "search".
    Select your headphones, right click, select "Setup"
    Make sure they're paired as an Audio Sink rather than a Headset
    Select your headphones as an audio output in your sound settings

If you have Spotify open throughout the process you have to restart it.

Changed in bluez (Ubuntu Bionic):
assignee: nobody → Daniel van Vugt (vanvugt)
importance: Undecided → High
status: New → Triaged
no longer affects: gnome-control-center (Ubuntu Bionic)
no longer affects: pulseaudio (Ubuntu Bionic)
no longer affects: pulseaudio
no longer affects: gnome-control-center (Ubuntu)
Changed in bluez (Ubuntu Eoan):
assignee: nobody → Daniel van Vugt (vanvugt)
importance: Undecided → High
status: New → Triaged
no longer affects: pulseaudio (Ubuntu Eoan)
no longer affects: pulseaudio (Ubuntu Focal)
summary: - Bluetooth headphones/speaker such as Sony WH-1000XM3 default to low
- quality headset mode and fails to switch to A2DP when selected
+ Bluetooth headphones default to low quality headset mode and fails to
+ switch to A2DP when selected
summary: - Bluetooth headphones default to low quality headset mode and fails to
+ Bluetooth headphones default to low quality headset mode and fail to
switch to A2DP when selected
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Patch for Ubuntu 19.10

Changed in bluez (Ubuntu Eoan):
status: Triaged → Fix Committed
description: updated
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Patch for Ubuntu 18.04.

Changed in bluez (Ubuntu Bionic):
status: Triaged → In Progress
status: In Progress → Fix Committed
Changed in bluez (Ubuntu Bionic):
milestone: none → ubuntu-18.04.4
Revision history for this message
Sebastien Bacher (seb128) wrote :

I've sponsored the 18.04 and 19.10 SRUs now

Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Nicholas, or anyone else affected,

Accepted bluez into eoan-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/bluez/5.50-0ubuntu5 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-eoan to verification-done-eoan. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-eoan. In either case, without details of your testing we will not be able to proceed.

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

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

tags: added: verification-needed verification-needed-eoan
tags: added: verification-needed-bionic
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello Nicholas, or anyone else affected,

Accepted bluez into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/bluez/5.48-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-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

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

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (bluez/5.50-0ubuntu5)

All autopkgtests for the newly accepted bluez (5.50-0ubuntu5) for eoan have finished running.
The following regressions have been reported in tests triggered by the package:

network-manager/1.20.4-2ubuntu2 (arm64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/eoan/update_excuses.html#bluez

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Jeff Campbell (jeff-soupbowl) wrote :

YEAH!!!

Finally Fixed!!! I just tested the bluez proposed update and my headphones connected in A2DP mode the first time (without having to go through all the tricks of connecting/disconnecting bluetooth, etc, etc). I did try powering off and on my headphones several times and it continues to work as expected.

I'm a "good-to-go" for this fix.

Mathew Hodson (mhodson)
no longer affects: pulseaudio (Ubuntu)
Revision history for this message
Alexey Kulik (doctor-rover) wrote :

I confirm that upgrade with proposed enabled on Eoan fixed the bug for me.
I've tested it using two bluetooth audio devices: Sony WH-1000XM3 and Plantronics Marque M155.
Thanks to everyone involved!

Revision history for this message
Alexey Kulik (doctor-rover) wrote :

Also confirm that the problem is fixed for me on Focal with regular upgrades.
Tested with the same devices: Sony WH-1000XM3 and Plantronics Marque M155.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Re comment #39, can someone with the privileges please click retry? It won't let me.

Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: [Bug 1845046] Re: Bluetooth headphones default to low quality headset mode and fail to switch to A2DP when selected

Verified fixed on bionic in 5.48-0ubuntu3.3

Also comment #41 verifies eoan.

(I am replying by email because Launchpad is timing out and refusing all web
entry at the moment)

tags: added: verification-done verification-done-bionic verification-done-eoan
removed: verification-needed verification-needed-bionic verification-needed-eoan
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bluez - 5.50-0ubuntu5

---------------
bluez (5.50-0ubuntu5) eoan; urgency=medium

  * Add lp1845046-policy-Add-logic-to-connect-a-Sink.patch to properly expose
    A2DP high quality audio support on some headphones (LP: #1845046).

 -- Daniel van Vugt <email address hidden> Mon, 06 Jan 2020 14:17:42 +0800

Changed in bluez (Ubuntu Eoan):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for bluez has completed successfully and the package is now being 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.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bluez - 5.48-0ubuntu3.3

---------------
bluez (5.48-0ubuntu3.3) bionic; urgency=medium

  * Add lp1845046-policy-Add-logic-to-connect-a-Sink.patch to properly expose
    A2DP high quality audio support on some headphones (LP: #1845046).

 -- Daniel van Vugt <email address hidden> Mon, 06 Jan 2020 16:30:36 +0800

Changed in bluez (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Grzegorz Bizon (grzesiekbiz) wrote :

The fix works for me! Thank you very much for fixing this bug, really appreciated!

It appears that dependencies of the new Bluez packages are also compatible with Debian GNU/Linux. Since I use Debian, I confirm that installing fixed Ubuntu package on Debian 11 (testing right now) also fixes the problem.

Thank you again for fixing this <3

Revision history for this message
Alexandre Anoutchine (xirius) wrote :

This issue is real pain and persists even with Ubuntu 20.04 and my Bose QuietComfort 35.
Selecting High Fidelity Playback (A2DP Sink) does nothing. I managed to do it once but it seems it stuck with low quality now :(

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This bug has been closed for a couple of months. Please open new bugs for any ongoing issues by running:

  ubuntu-bug bluez

Revision history for this message
rumpl (rumplstielz) wrote :

in 20.04 still there with sennheiser
MOMENTUM M2 AEBT]# devices
Device 00:1B:66:7F:E9:C9 MOMENTUM M2 AEBT

urt@Yak:~$ dmesg | grep -i bluetooth
[ 5.098523] Bluetooth: Core ver 2.22
[ 5.098543] Bluetooth: HCI device and connection manager initialized
[ 5.098549] Bluetooth: HCI socket layer initialized
[ 5.098551] Bluetooth: L2CAP socket layer initialized
[ 5.098553] Bluetooth: SCO socket layer initialized
[ 5.122692] Bluetooth: hci0: read Intel version: 370810225019140f38
[ 5.122693] Bluetooth: hci0: Intel device is already patched. patch num: 38
[ 6.873845] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 6.873847] Bluetooth: BNEP filters: protocol multicast
[ 6.873852] Bluetooth: BNEP socket layer initialized
[ 72.378369] Bluetooth: RFCOMM TTY layer initialized
[ 72.378377] Bluetooth: RFCOMM socket layer initialized
[ 72.378382] Bluetooth: RFCOMM ver 1.11
[ 222.503800] Bluetooth: hci0: SCO packet for unknown connection handle 0
[ 222.513805] Bluetooth: hci0: SCO packet for unknown connection handle 0
[ 222.513807] Bluetooth: hci0: SCO packet for unknown connection handle 0
[ 222.513808] Bluetooth: hci0: SCO packet for unknown connection handle 0
[ 222.523806] Bluetooth: hci0: SCO packet for unknown connection handle 0
[ 222.523808] Bluetooth: hci0: SCO packet for unknown connection handle 0
[ 234.095980] Bluetooth: hci0: SCO packet for unknown connection handle 258
[ 234.095984] Bluetooth: hci0: SCO packet for unknown connection handle 258
[ 234.095985] Bluetooth: hci0: SCO packet for unknown connection handle 258

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

This bug has been closed for a couple of months. Please open new bugs for any ongoing issues by running:

  ubuntu-bug bluez

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.