Bluetooth headphones only use A2DP when connected manually

Bug #1724919 reported by Neil Aspinall
120
This bug affects 23 people
Affects Status Importance Assigned to Milestone
alsa-driver (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

Issue with Sony MDR-1ABT Bluetooth headphones:
Once paired, the headphones will be connected automatically whenever they are switched on. However when connected this way, only the HSP/HFP profile will work and trying to change to A2DP in sound settings does nothing.
If the headphones are then manually disconnected and reconnected from Bluetooth settings, they will initially use HSP/HFP but then selecting A2DP in sound settings will successfully make them use A2DP.

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: alsa-base 1.0.25+dfsg-0ubuntu5
ProcVersionSignature: Ubuntu 4.13.0-16.19-generic 4.13.4
Uname: Linux 4.13.0-16-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia_drm nvidia_modeset nvidia
ApportVersion: 2.20.7-0ubuntu3
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: neil 1443 F.... pulseaudio
 /dev/snd/pcmC0D0c: neil 1443 F...m pulseaudio
 /dev/snd/controlC0: neil 1443 F.... pulseaudio
CurrentDesktop: ubuntu:GNOME
Date: Thu Oct 19 19:12:59 2017
InstallationDate: Installed on 2017-10-19 (0 days ago)
InstallationMedia: Ubuntu 17.10 "Artful Aardvark" - Release amd64 (20171018)
PackageArchitecture: all
SourcePackage: alsa-driver
Symptom: audio
Symptom_Card: MDR-1ABT
Symptom_Type: None of the above
Title: [MDR-1ABT, playback] Playback problem
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 07/06/2017
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: F5
dmi.board.asset.tag: Default string
dmi.board.name: Z270N-WIFI-CF
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: x.x
dmi.chassis.asset.tag: Default string
dmi.chassis.type: 3
dmi.chassis.vendor: Default string
dmi.chassis.version: Default string
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrF5:bd07/06/2017:svnGigabyteTechnologyCo.,Ltd.:pnZ270N-WIFI:pvrDefaultstring:rvnGigabyteTechnologyCo.,Ltd.:rnZ270N-WIFI-CF:rvrx.x:cvnDefaultstring:ct3:cvrDefaultstring:
dmi.product.family: Default string
dmi.product.name: Z270N-WIFI
dmi.product.version: Default string
dmi.sys.vendor: Gigabyte Technology Co., Ltd.

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

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

Changed in alsa-driver (Ubuntu):
status: New → Confirmed
Revision history for this message
Piotr Komur (pkomur) wrote :

I have a similar problem in Ubuntu 17.10 Gnome Shell 3.26.1. I can not switch to the A2DP profile, even when I disconnect and reconnect to the Bluetooth headphones.

Revision history for this message
Floris Assies (florisassies) wrote :

same problem with Jabra Move headset
just upgraded to Ubuntu 17.10
with previous version had a similar problem but at least when I deleted the paired device / connection and made a new connection, I would have A2dp audio for as long I left my computer turned on. Now when trying the same, it doesn't show me that option, only HSP/HFP

Revision history for this message
Erik Sjölund (erik-sjolund) wrote :

I have the same problem with the headset Sony MDR-1000X and Ubuntu 17.10. I have to first disconnect and then connect to get the A2DP profile to work.

Revision history for this message
Mazimo (maldonado-omar) wrote :

Same problem on fresh 17.10 install using LG Tone HBS920 headsets.
An LG FH2 portable rolling speaker seems to work fine though.

The workaround of disconnecting my LG headset under Bluetooth Settings and then reconnecting does allow me to switch from HSP/HFP to A2DP.

Revision history for this message
Maksim Lin (maks-j) wrote :

Just another confirmation same thing happens to me with Sony ZX770BN headphones and same disconnect/reconnect work around works.

Revision history for this message
Erik Sjölund (erik-sjolund) wrote :

The problem didn't go away after doing a fresh installation of Ubuntu 18.04.
I have to first disconnect and then connect my Sony MDR-1000x to get the A2DP profile to work.

Revision history for this message
Farid Stein (farid-stein) wrote :

I am also seeing this bug with Ubuntu 18.04 and my Sony MDR-1000X. The A2DP profile shows but cannot be selected. I have observed this with two different Bluetooth devices. One was a USB-plugin and the other one is PCI-e card. Deleting and reconnecting the headset works fine though.

Revision history for this message
Olli P. (ollipa) wrote :

I am running Ubuntu 18.04 and have Sony WH-1000XM2 bluetooth headphones. Bluetooth connection is established automatically but in order to get any sound out of the headphones I need to:

1. Manually disconnect and reconnect the headphones from bluetooth settings

or

2. Press play/pause button on my headphones (after this a2dp_sink is available) and go to sound settings to select headphones as output device.

After the bluetooth connection is automatically established I see the following error message in system log:
  pulseaudio[3124]: [pulseaudio] module-bluez5-device.c: Profile a2dp_sink has no transport

The command "pacmd list-cards" displays the a2dp_sink as unavailable (full device output attached):
  ...
  profiles:
    headset_head_unit: Headset Head Unit (HSP/HFP) (priority 30, available: unknown)
    a2dp_sink: High Fidelity Playback (A2DP Sink) (priority 40, available: no)
  ...

After pressing play/pause button on the headphones or manually reconnecting, a2dp_sink is available:
  ...
  profiles:
    headset_head_unit: Headset Head Unit (HSP/HFP) (priority 30, available: unknown)
    a2dp_sink: High Fidelity Playback (A2DP Sink) (priority 40, available: yes)
    off: Off (priority 0, available: yes)
  ...

Revision history for this message
Anders Hall (a.hall) wrote :

Ubuntu 18.04.1. Jabra Elite Sport v2. Impossible to get A2DP to stick. Have to go through multiple jumps to get it to work. E.g.,

1) Shut down and start bluetooth a few times after suspend or reboot. Sometimes i try to shutdown the Jabra device as well.

2) Then connect to the device, which always fails at minimum 3 times when using the slider for connecting, and then it might add a sound device or not. It takes a long time for this to happen in any situation after successful connect. Often the sound device is not even selected if it is added, which require a second user interaction to solve.

However, this step works much better using blueman. I.e., the interface and bluetooth solution in Ubuntu is buggy to say the least. At least a few bugs must exist in the interface solution considered blueman works better.

3) If connection is working and a sound device is added then the A2DP is never selected. Using the Ubuntu drop down menu to change to A2DP is pointless, it will never work, and blueman cant change profile either. Thus going back to step one and and trying again is the only solution.

This process takes up to 15 minutes or more to complete. By pure luck, the A2DP setting will stick until next suspend....

These errors have existed for at least 12 months in my case.

Revision history for this message
Anders Hall (a.hall) wrote :
Download full text (9.9 KiB)

Lots of errors etc in syslog, added some notes on top of the obvious errors.

Kernel keeps spamming syslog with these (https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1748565):
kernel: [15621.044566] Bluetooth: hci0: last event is not cmd complete (0x0f)

Note: this kernel message disappears when and if i get a bluetooth connection that works with AD2P. If HSP/HFP is set instead this message spams the log.

1) Ubuntu control panel, events when enabling bluetooth:
systemd[1]: Starting Load/Save RF Kill Switch Status...
systemd[1]: Started Load/Save RF Kill Switch Status.
kernel: [15952.121703] usb 1-7: new full-speed USB device number 16 using xhci_hcd
kernel: [15952.271062] usb 1-7: New USB device found, idVendor=8087, idProduct=0a2b
kernel: [15952.271069] usb 1-7: New USB device strings: Mfr=0, Product=0, SerialNumber=0
kernel: [15952.274564] Bluetooth: hci0: Bootloader revision 0.0 build 26 week 38 2015
kernel: [15952.275558] Bluetooth: hci0: Device revision is 16
kernel: [15952.275563] Bluetooth: hci0: Secure boot is enabled
kernel: [15952.275566] Bluetooth: hci0: OTP lock is enabled
kernel: [15952.275569] Bluetooth: hci0: API lock is enabled
kernel: [15952.275572] Bluetooth: hci0: Debug lock is disabled
kernel: [15952.275576] Bluetooth: hci0: Minimum firmware build 1 week 10 2014
kernel: [15952.276189] Bluetooth: hci0: Found device firmware: intel/ibt-12-16.sfi
systemd[1]: Reached target Bluetooth.
upowerd[1560]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.1
upowerd[1560]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0
upowerd[1560]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb1/1-7
kernel: [15952.453260] [UFW BLOCK] IN=wlp4s0 OUT= MAC= SRC=fe80:0000:0000:0000:XXX DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=64 TC=0 HOPLIMIT=1 FLOWLBL=807886 PROTO=UDP SPT=8612 DPT=8612 LEN=24
kernel: [15952.453273] [UFW BLOCK] IN=wlp4s0 OUT= MAC= SRC=fe80:0000:0000:0000:XXX DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=64 TC=0 HOPLIMIT=1 FLOWLBL=273955 PROTO=UDP SPT=8612 DPT=8610 LEN=24
kernel: [15952.463425] [UFW BLOCK] IN=wlp4s0 OUT= MAC= SRC=fe80:0000:0000:0000:XXX DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=64 TC=0 HOPLIMIT=1 FLOWLBL=807886 PROTO=UDP SPT=8612 DPT=8612 LEN=24
kernel: [15952.463447] [UFW BLOCK] IN=wlp4s0 OUT= MAC= SRC=fe80:0000:0000:0000:XXX DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=64 TC=0 HOPLIMIT=1 FLOWLBL=273955 PROTO=UDP SPT=8612 DPT=8610 LEN=24
kernel: [15953.936818] Bluetooth: hci0: Waiting for firmware download to complete
kernel: [15953.937485] Bluetooth: hci0: Firmware loaded in 1625036 usecs
kernel: [15953.937530] Bluetooth: hci0: Waiting for device to boot
kernel: [15953.949542] Bluetooth: hci0: Device booted in 11737 usecs
kernel: [15953.949684] Bluetooth: hci0: Found Intel DDC parameters: intel/ibt-12-16.ddc
kernel: [15953.960521] Bluetooth: hci0: Applying Intel DDC parameters completed
bluetoothd[8656]: RFCOMM server failed for Headset Voice gateway: rfcomm_bind: Address already in use (98)
bluetoothd[8656]: RFCOMM server failed for :1.68/Profile/HSPHSProfile/00001108-0000-1000-80...

Revision history for this message
Tomas Benitez (tomas.benitez) wrote :

Same as you, Ubuntu 18.04 Sony mdr-zx220bt. If i want to have "good" sound i have to disconnect and connect manually...

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

Thank you for reporting this bug to Ubuntu.
Ubuntu 17.10 (artful) reached end-of-life on July 19, 2018.

See this document for currently supported Ubuntu releases:
https://wiki.ubuntu.com/Releases

We appreciate that this bug may be old and you might not be interested in discussing it any more. But if you are then please upgrade to the latest Ubuntu version and re-test. If you then find the bug is still present in the newer Ubuntu version, please add a comment here telling us which new version it is in and change the bug status to Confirmed.

Changed in alsa-driver (Ubuntu):
status: Confirmed → Won't Fix
Revision history for this message
paul hopgood (paulhopgood) wrote :

Bug still present in 18.10.
To get A2DP audio working you have to manually disconnect and reconnect.

Revision history for this message
MeisterYeti (zordanz) wrote :

Same problem here using Ubuntu 18.04 with Sony WH-1000XM2.

Revision history for this message
marcostruji@hotmail.com (marcostruji) wrote :

Same problem here using Ubuntu 18.04 with Sony MDR1000X, also with the Sony MDR XB50BS

Revision history for this message
pirindev (pirindev) wrote :

Same *VERY* annoying bug here with Ubuntu 18.04 and Sony MDR-ZX550BN

Revision history for this message
Neil Aspinall (neilaspinall) wrote :

Bug still present in Ubuntu 18.10.

Revision history for this message
Neil Aspinall (neilaspinall) wrote :

It's not possible to "change the bug status to Confirmed" as suggested in comment #14, the Status is "changeable only by a project maintainer of bug supervisor".

Revision history for this message
Erik Sjölund (erik-sjolund) wrote :

The problem didn't go away after doing a fresh installation of Ubuntu 18.10.
I have to first disconnect and then connect my Sony MDR-1000x to get the A2DP profile to work.

Revision history for this message
Jonathan Aghachi (sleepsux) wrote :

I have a sony MDR-XB950B1 and came here to confirm the same thing. After an auto reconnect when I tune on the bluetooth headphones, I have to go to settings to manually disconnect and reconnect in order to get the A2DP profile to show up. Otherwise the profile stays at Analog Stereo output for my laptop speakers and the headphones.

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

I have a Sony MDR-XB950N1 and I'm seeing the same thing....

Revision history for this message
Jancis (beaver-inbox) wrote :

Same. Ubuntu 18.04, Sony WH-CH700N
I have to go to bluetooth device list, disconnect device and reconnect from UI. after that, default sound card correctly switches over and i can hear music.
Without that, i can't even switch the sound card, even though it's visible in the list.

Revision history for this message
Trinché Kévin (gutsu13) wrote :

Same here, Debian 9 Stretch, Sony WH1000-XM3.

I have to disconnect and reconnect my Headset manually from UI in order to get the sound of my music.
Actually the issue comes when the Headset connects automatically.

Maybe someone competent could tell us where it is ? There's not update since a while...

Revision history for this message
Ricardo Ribalda Delgado (ribalda) wrote :

This workaround works for me: https://gist.github.com/hxss/a3eadb0cc52e58ce7743dff71b92b297

Have only tried it twice now

Revision history for this message
Peter P. (peter-p-launchpad) wrote :

I have the same problem on two machines running Ubuntu 18.04 with a Sony WH-1000XM2.

Revision history for this message
jurosh (jurosh) wrote :

Same problem here. Ubuntu 19.04 and WH-1000XM3.

jurosh (jurosh)
information type: Public → Public Security
information type: Public Security → Private Security
information type: Private Security → Public
Revision history for this message
DooMMasteR (winrootkit-w) wrote :

I am also affected, same solution as for other, I simply need to reconnect from the UI.

The same headset works fine on Android, Windows, Mac OS, iOS and even my cheap DAB-Receiver can stream to it via A2DP right away.

For me the issue exists since 18.4 and is still present in 18.10.

I am using the Sony WH-1000XM2.

Revision history for this message
Aschwin (aschwin) wrote :

Using a Sony WH-H900N/NM on 19.04, and the problem is as described in the original bug report.

When turning on the headset it connects but selects the HSP/HFP profile, which works but naturally has crappy sound. In the sound settings, changing from HSP/HFP to the A2DP sink does not actually do anything. The only thing that works is to disconnect the headset from the bluetooth settings and reconnect. Doing that will select the A2DP profile as the default and sound is fantastic. After doing so I can go back and forth between both profiles without any problems and everything works as expected. Also the input device/microphone is changed as expected.

Revision history for this message
jurosh (jurosh) wrote :

I am currently using this one time HOTFIX script for the the issue:

```
pactl set-card-profile bluez_card.AA_BB_CC_DD_EE_FF a2dp_sink
bluetoothctl disconnect AA:BB:CC:DD:EE:FF
pactl set-card-profile bluez_card.AA_BB_CC_DD_EE_FF a2dp_sink
bluetoothctl connect AA:BB:CC:DD:EE:FF
```

To get information about your bluetooth headphones address (AA:BB:CC:DD:EE:FF) use `bluetoothctl paired-devices` command.

It disconnect and reconnect headphones and set correct profile. Needs to be run each time after connected, but still much easier than doing all those steps manually. And ofc you can make bash command from it, or make Desktop script icon.

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

Can this please be re-opened? Daniel van Vugt marked it as "won't fix" in comment #14 due to Ubuntu 17.10 being end of life, but numerous people are still encountering the problem with more recent versions. I'm encountering it on Ubuntu 19.10 and a new Sony WH-1000XM3.

If this bug can't be re-opened, should we create a new bug for more recent versions of Ubuntu?

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

For those with Sony headphones, and who are affected by this annoying bug, the attached "headphones" Perl script is a partial workaround. You'll need to edit it for the bluetooth address of your headphones. Run it after switching your headphones on and they connect, and it sets A2DP.

Revision history for this message
Yorick (yorickvanpelt) wrote :

Same problem here. bluez 5.50, pulseaudio 13.0. Sony WH-1000XM3.

Fiddling with the buttons on the headset makes it show up as a HCI device, after which it can be switched to A2DP.

@Daniel van Vugt: could you reopen this and reassign it to either bluez or pulseaudio? At the very last it has nothing to do with alsa. I spoke with the pulseaudio maintainer, who thinks it's likely a bluez issue.

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

Because no-one is willing to re-open this bug, I have opened new bug 1854392 for this same problem on newer versions of Ubuntu such as 19.10. Those who are affected by this problem, please add a note to bug 1854392 stating that you're affected.

https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/1854392

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.