[regression] Bluetooth audio no longer supports A2DP (stuck in HSP/HFP mode)

Bug #1438510 reported by Dustin Kirkland 
476
This bug affects 99 people
Affects Status Importance Assigned to Milestone
PulseAudio
Unknown
Medium
bluez (Ubuntu)
Invalid
High
Unassigned
Vivid
Won't Fix
High
Unassigned
pulseaudio (Ubuntu)
Fix Released
High
Unassigned
Vivid
Won't Fix
High
Unassigned
Xenial
Fix Released
High
Daniel van Vugt

Bug Description

[Impact]
Bluetooth audio seemingly refuses to support A2DP (stuck in HSP/HFP mode). 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. Go to Sound settings and check the device's current "Mode".
3. If the current Mode is not yet A2DP then try to set it to A2DP
Expected: The mode is either A2DP by default or can be set to it.

[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 1582213. Possibly others too. The debdiff which fixes this is attached to bug 1582213.

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]
Just installed 15.04 fresh from the latest ISO (beta2).

I'm bummed to see my bluetooth headset (Bose Soundlink overear) seems to have regressed in functionality.

In 14.10, I was able to set the output profile either to a2dp or hsp/hfp (telephony duplex).

In 15.04, it only works in telephony duplex mode. I can't get high fidelity sound playback to work at all.

This thread seems to be related, though the workaround within did not solve the problem for me:
https://bbs.archlinux.org/viewtopic.php?id=194006

The bug is still present in 16.04 LTS and 16.10.

Changed in bluez (Ubuntu):
importance: Undecided → High
Changed in bluez (Ubuntu Vivid):
milestone: none → ubuntu-15.04
Changed in pulseaudio (Ubuntu Vivid):
importance: Undecided → High
milestone: none → ubuntu-15.04
tags: added: regression-proposed
Steve Langasek (vorlon)
tags: removed: regression-proposed
Martin Pitt (pitti)
Changed in pulseaudio (Ubuntu Vivid):
milestone: ubuntu-15.04 → vivid-updates
Changed in bluez (Ubuntu Vivid):
milestone: ubuntu-15.04 → vivid-updates
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in bluez (Ubuntu):
status: New → Confirmed
Changed in pulseaudio (Ubuntu):
status: New → Confirmed
Revision history for this message
Gareth Trainor (gtredx69) wrote :

I am trying to connect my Beats pill which I can, but the sound is set to telephony. I have spent 4 hours trying to enable a2dp with no luck. In pulse audio, the device appears can select the high quality setting but nothing changes.

Revision history for this message
James C. Davis (jamescdavis) wrote :

I was able to get a2dp working in 15.04 by editing /etc/bluetooth/audio.conf and uncommenting AutoConnect=true under [General] then restarting the bluetooth service with: systemctl restart bluetooth.service
After doing this, my bluetooth headset connected using the a2dp profile automatically.

Revision history for this message
RobertFM (robert123m) wrote :

I had the same problem and for several months I have tried all possible solutions I could find to no avail,... until today!

I found the solution in post #17 in the following https://bbs.archlinux.org/viewtopic.php?pid=1526534#p1526534 (tnx SimFox3)

What I did:

# First copy the files I edited

    sudo cp /etc/bluetooth/audio.conf /etc/bluetooth/audio.conf_tmp
    sudo cp /etc/pulse/default.pa /etc/pulse/default.pa_tmp
    sudo cp /usr/bin/start-pulseaudio-x11 /usr/bin/start-pulseaudio-x11_tmp

#Edit /etc/bluetooth/audio.conf

    sudo nano /etc/bluetooth/audio.conf

This is in my audio.conf

    # Configuration file for the audio service
    # This section contains options which are not specific to any
    # particular interface
    [General]
    Enable=Gateway,Source

    # Switch to master role for incoming connections (defaults to true)
    Master=true

    # If we want to disable support for specific services
    # Defaults to supporting all implemented services
    #Disable=Gateway,Source,Socket
    Disable=Socket

    # SCO routing. Either PCM or HCI (in which case audio is routed to/from ALSA)
    # Defaults to HCI
    #SCORouting=HCI

    # Automatically connect both A2DP and HFP/HSP profiles for incoming
    # connections. Some headsets that support both profiles will only connect the
    # other one automatically so the default setting of true is usually a good
    # idea.
    AutoConnect=true

    # Headset interface specific options (i.e. options which affect how the audio
    # service interacts with remote headset devices)
    [Headset]

    # Set to true to support HFP, false means only HSP is supported
    # Defaults to true
    HFP=true

    # Maximum number of connected HSP/HFP devices per adapter. Defaults to 1
    MaxConnected=2

    # Set to true to enable use of fast connectable mode (faster page scanning)
    # for HFP when incoming call starts. Default settings are restored after
    # call is answered or rejected. Page scan interval is much shorter and page
    # scan type changed to interlaced. Such allows faster connection initiated
    # by a headset.
    FastConnectable=true

    # Just an example of potential config options for the other interfaces
    #[A2DP]
    #SBCSources=1
    #MPEG12Sources=0

#Edit /etc/pulse/default.pa

    sudo nano /etc/pulse/default.pa

comment out (with an # at the beginning of the line) the following line

    #load-module module-bluetooth-discover

#now edit /usr/bin/start-pulseaudio-x11

    sudo nano /usr/bin/start-pulseaudio-x11

and after the lines

    if [ x”$SESSION_MANAGER” != x ] ; then
            /usr/bin/pactl load-module module-x11-xsmp “display=$DISPLAY session_manager=$SESSION_MANAGER” > /dev/null
    fi

add the following

    /usr/bin/pactl load-module module-bluetooth-discover

#Restarted and I was finally able tot switch to A2DP

Hope it works for you too.

Revision history for this message
In , Fabrice-b (fabrice-b) wrote :
Download full text (20.8 KiB)

This bug is very similar to #87081, with the difference that the proposed commit doesn't work for me, and PA never sees the message "dbus: interface=org.bluez.MediaEndpoint1, path=/MediaEndpoint/A2DPSource, member=SelectConfiguration"

I'm running Fedora 22, with bluez-5.29, and pulseaudio from current git (tag v7.0) compiled from source. I'm using a Sony DR-BT21G headset.

The device is initially paired/trusted in bluetoothctl. I'm running bluetoothd with debug output enabled in a first terminal : /usr/libexec/bluetooth/bluetoothd -n -d. I'm running bluetoothctl in another term, and LD_LIBRARY_PATH=/tmp/install/lib LD_BIND_NOW=1 /tmp/install/bin/pulseaudio -vv in a 3rd term.

I compiled pulseaudio with the following configuration options, that pretty much matche those from the regular Fedora rpm package : ./configure --disable-silent-rules --disable-static --disable-rpath --with-system-user=pulse --with-system-group=pulse --with-access-group=pulse-access --disable-oss-output --disable-jack --disable-lirc --disable-bluez4 --enable-bluez5 --disable-systemd-daemon --prefix /tmp/install

* When powering on the headset on, bluetoothd logs:

bluetoothd[29282]: src/adapter.c:connected_callback() hci0 device 00:1A:80:91:72:05 connected eir_len 15
bluetoothd[29282]: src/profile.c:ext_confirm() incoming connect from 00:1A:80:91:72:05
bluetoothd[29282]: src/service.c:btd_service_ref() 0x55fe57a10240: ref=2
bluetoothd[29282]: src/profile.c:ext_confirm() Headset Voice gateway authorizing connection from 00:1A:80:91:72:05
bluetoothd[29282]: src/profile.c:ext_auth() 00:1A:80:91:72:05 authorized to connect to Headset Voice gateway
bluetoothd[29282]: src/profile.c:ext_connect() Headset Voice gateway connected to 00:1A:80:91:72:05
bluetoothd[29282]: src/service.c:change_state() 0x55fe57a10240: device 00:1A:80:91:72:05 profile Headset Voice gateway state changed: disconnected -> connected (0)
bluetoothd[29282]: src/service.c:btd_service_ref() 0x55fe57a10240: ref=3
bluetoothd[29282]: plugins/policy.c:service_cb() Added Headset Voice gateway reconnect 0

* in pulseaudio logs:

: [pulseaudio] bluez5-util.c: Properties changed in device /org/bluez/hci0/dev_00_1A_80_91_72_05
D: [pulseaudio] backend-native.c: dbus: path=/Profile/HSPAGProfile, interface=org.bluez.Profile1, member=NewConnection
D: [pulseaudio] backend-native.c: dbus: NewConnection path=/org/bluez/hci0/dev_00_1A_80_91_72_05, fd=20
D: [pulseaudio] bluez5-util.c: Transport /org/bluez/hci0/dev_00_1A_80_91_72_05/fd20 state changed from disconnected to idle
D: [pulseaudio] module-bluez5-discover.c: Loading module-bluez5-device path=/org/bluez/hci0/dev_00_1A_80_91_72_05
I: [pulseaudio] module-card-restore.c: Restored profile 'a2dp_sink' for card bluez_card.00_1A_80_91_72_05.
I: [pulseaudio] module-card-restore.c: Restoring port latency offsets for card bluez_card.00_1A_80_91_72_05.
I: [pulseaudio] card.c: Created 1 "bluez_card.00_1A_80_91_72_05"
W: [pulseaudio] module-bluez5-device.c: Profile has no transport
D: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event.
I: [pulseaudio] card.c: Changed profile of card 1 "bluez_card.00_1A_80_91_72_05" to off
I: [pulseaudio] module.c: Loaded ...

Revision history for this message
In , Tanu Kaskinen (tanuk) wrote :

Apparently the a2dp profile doesn't initially get connected. It's not PulseAudio's job to connect the profiles, but something is connecting the hsp profile, so I wonder why a2dp doesn't get connected at the same time... The same or similar problem was reported recently in IRC, but we didn't find the culprit at that time. Even though this doesn't appear to be a PulseAudio bug, I'd be very interested to know what the solution is, if you figure out one.

I'll add Luiz von Dentz to CC... Luiz, do you have any idea where to start debugging, if only the hsp profile gets connected when turning on a headset, but a2dp starts only working when an explicit "connect" command is given in bluetoothctl?

Revision history for this message
Yura (ykuchinskiy) wrote :

confirm fix from post #17, ubuntu 15.04

Revision history for this message
Yura (ykuchinskiy) wrote :

sorry for the typo, confirm fix from post #5, ubuntu 15.04

Revision history for this message
felipunk (fenieves) wrote :

I will also like to confirm the solution from RobertFM on Post #5, Worked flawlessly.

Mathew Hodson (mhodson)
Changed in bluez (Ubuntu):
milestone: vivid-updates → none
Changed in pulseaudio (Ubuntu):
milestone: vivid-updates → none
Revision history for this message
In , quequotion (quequotion) wrote :

I had the same problem and can verify the same workaround with the following:

pulseaudio-git v7.0.34.g9d2b763-1

bluez 5.34-1

Device 00:1F:82:28:93:51
 Name: DR-BT101
 Alias: DR-BT101
 Class: 0x240408
 Icon: audio-card
 Paired: yes
 Trusted: yes
 Blocked: no
 Connected: yes
 LegacyPairing: no
 UUID: Headset (00001108-0000-1000-8000-00805f9b34fb)
 UUID: Audio Sink (0000110b-0000-1000-8000-00805f9b34fb)
 UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb)
 UUID: Handsfree (0000111e-0000-1000-8000-00805f9b34fb)

When the device connects automatically (by powering on after being paired) A2DP is "unavailable".

To enable--and subsequently activate--the profile the device must be connected by explicitly giving the "connect 00:1F:82:28:93:51" command to bluetoothctl.

Revision history for this message
Luigi Maselli (grigio) wrote :

I see the profile AD2P sink but the audio is still mono, the instructions in 5 are outdated, some filenams are changed

Revision history for this message
Horacio Arroyo (deblike) wrote :

Confirm fix from post #5 is still working.

Revision history for this message
Horacio Arroyo (deblike) wrote :

Just applied to a fresh 16.04 beta 2 install, despite having to create /etc/bluetooth/audio.conf manually, it worked again for me.

Revision history for this message
Richard Sellam (richard-sellam) wrote :

I have the exact same bug on up to date 16.04 beta (cannot connect to a2dp sink but hsp working), but i didn't have the bug before with 15.10...

If it can help, here is the message showing in syslog when autoconnecting to the bluetooth speaker:
Apr 2 10:44:39 vaio pulseaudio[1890]: [pulseaudio] bluez5-util.c: Transport Acquire() failed for transport /org/bluez/hci0/dev_A0_E9_DB_00_E2_4D/fd1 (Operation Not Authorized)

I can confirm that is it, at least for me, related to https://bugs.freedesktop.org/show_bug.cgi?id=92102 , and that manually connecting to the speaker with "connect A0:E9:DB:00:E2:4D" with bluetoothctl make the a2dp sink available, while just connecting the speaker with the bluetooth applet didn't. No file modification required.

Note that sometimes it fails to connect even with bluetoothctl, but trying once again the connect command connects successfully.

Regards,

Revision history for this message
Dariusz Płoszaj (zakapior1983) wrote :

I have the same problem in Ubuntu 16.04 beta 2...I have JBL bluetooth speaker and can't change quality of sound from HSP to A2DP....

Revision history for this message
kylea (kylea) wrote :

confirm fix from post #5, ubuntu 16.04 beta 2 Ubuntu Gnome.

Thanks

Revision history for this message
Ryan Frank (ryandlf) wrote :

I'd also like to confirm fix from post #5. Ubuntu 14.04

Revision history for this message
Karl Grzeszczak (karlgrz) wrote :

I can confirm that ubuntu 16.04 LTS is exhibiting this behavior with three separate bluetooth headsets (JABRA REVO 2.0, Sony MDRXB950BT, and Sennheiser Urbanite XL WIreless).

14.04, 14.10, 15.04, and 15.10 all worked quite well with no additional configuration necessary. By "worked quite well" I mean I could pair all three headsets, they would remain paired through reboots, and I could get A2DP output from each.

On 16.04, in both gnome and unity, it is a hit or miss affair of pairing any of these headsets. I have a Dell XPS 15 and had zero problems prior to installing 16.04.

I used the procedure in post #5, but that does not persist after reboots. I have to unpair the headset completely and then repair in order to get sound. Even then it's hit or miss, sometimes it doesn't work.

I'd be happy to give more details to help resolve this.

Changed in bluez (Ubuntu):
status: Confirmed → Invalid
status: Invalid → Confirmed
Revision history for this message
Karl Grzeszczak (karlgrz) wrote :

Update to this, which might help in diagnosing, might not.

I can ensure that the bluetooth A2DP connection will successfully deliver audio to my headset consistently if I switch back to "Headset Head Unit (HSP/HFP)" mode in Sound settings prior to disconnecting the headset.

Then, next time I connect the headset, it will be in "Headset Head Unit (HSP/HFP)" mode, but when I switch to "High Fidelity Playback (A2DP Sink)" every single time it successfully plays back audio.

Revision history for this message
Linux Lurker (mark-edcc) wrote :

@karlgrz

I saw the issues you were having and had recently just figured out the same work-around. Just as I was going to post it for you, I see that you too have narrowed it down to this repeatable behavior.

For me however, I do not switch back to HSP, rather I turn the profile OFF in pavucontrol "configuration" tab. Then I disconnect the bluetooth using the its graphic interface.
The next time I connect the bluetooth device, it connects just fine. Then I simply go to the config tab in pavucontrol to switch the device to A2DP sink. It works every time this way.

In the past, switching the profile to OFF in pavucontrol prior to disconnecting the bluetooth device was unnecessary.
I am currently running Kubuntu 16.04 LTS, but have had 16.04 installed since beta. This regression was not present for me in any previous versions.

Revision history for this message
Karl Grzeszczak (karlgrz) wrote :

Another update. I had accidentally installed gnome-tweak-tool on my unity install instead of unity-tweak-tool, which pulled in a bunch of gnome-core stuff. After uninstalling the gnome stuff and reverting my configs to default (i.e. removing everything I did in post #5) my bluetooth headphones seem to be connecting properly again.

Revision history for this message
Karl Grzeszczak (karlgrz) wrote :

@mark-edcc thanks for the update. I'll try that in the future if necessary, but I really feel like the gnome nonsense caused all this. When I tried the 16.04 beta, it was the gnome flavor, and I experienced the same nonsense on arch linux with gnome. Never had this problem with unity. Weird.

Thanks again.

Revision history for this message
Karl Grzeszczak (karlgrz) wrote :

Hah, removing the gnome packages and reverting the configs did not resolve the issue. Still have to remove the bluetooth device and repair upon any reboot or resuming from sleep / hibernate. What a pain in the ass.

Revision history for this message
Max Bowsher (maxb) wrote :

I'm not sure if this helps, but I see pulseaudio logging an "Operation Not Authorized" message when things do not work:

Apr 26 01:46:52 zenbook pulseaudio[3346]: [pulseaudio] module-bluez5-device.c: Acquiring transport /org/bluez/hci0/dev_20_74_CF_02_DB_F2/fd0
Apr 26 01:46:52 zenbook pulseaudio[3346]: [pulseaudio] bluez5-util.c: Transport TryAcquire() failed for transport /org/bluez/hci0/dev_20_74_CF_02_DB_F2/fd0 (Operation Not Authorized)

Whereas after doing the switch-to-HSP, disconnect, reconnect, switch-to-A2DP dance to make it work, the equivalent logging is:

Apr 26 01:52:40 zenbook pulseaudio[3346]: [pulseaudio] module-bluez5-device.c: Acquiring transport /org/bluez/hci0/dev_20_74_CF_02_DB_F2/fd2
Apr 26 01:52:40 zenbook bluetoothd[808]: /org/bluez/hci0/dev_20_74_CF_02_DB_F2/fd2: fd(23) ready
Apr 26 01:52:40 zenbook pulseaudio[3346]: [pulseaudio] module-bluez5-device.c: Transport /org/bluez/hci0/dev_20_74_CF_02_DB_F2/fd2 acquired: fd 46

Revision history for this message
Karl Grzeszczak (karlgrz) wrote :

@marc-edcc: your method works the most consistently. I've rebooted multiple times, connecting and disconnecting the headset with my phone and other devices, and turning it on and off, and also connecting and disconnecting from the 16.04 laptop, and I haven't had a single problem getting audio to work as expected.

I have to do this dance on each reboot, sleep, hibernate, or even any time I want to just disconnect my headset. For me, this isn't a huge deal, but I would classify this as a blocker bug regarding bluetooth audio.

@maxb: the next time I get into a bad state I will take a look at the logs.

Revision history for this message
Karl Grzeszczak (karlgrz) wrote :

@marc-edcc: ok, that apparently does not work when sleeping the laptop and resuming ;-(

@maxb: here's how my logs looked when it was failing to connect:

Apr 26 09:37:07 deathstar bluetoothd[1043]: Unable to get io data for Headset Voice gateway: getpeername: Transport endpoint is not connected (107)
Apr 26 09:37:07 deathstar bluetoothd[1043]: connect error: Connection timed out (110)
Apr 26 09:37:07 deathstar bluetoothd[1043]: 00:16:94:14:C4:15: error updating services: Input/output error (5)
Apr 26 09:37:57 deathstar bluetoothd[1043]: connect error: Connection timed out (110)
Apr 26 09:37:57 deathstar bluetoothd[1043]: 00:16:94:14:C4:15: error updating services: Input/output error (5)
Apr 26 09:37:57 deathstar bluetoothd[1043]: Unable to get io data for Headset Voice gateway: getpeername: Transport endpoint is not connected (107)

Revision history for this message
Karl Grzeszczak (karlgrz) wrote :

@maxb: also see this a bit later:

Apr 26 09:40:37 deathstar bluetoothd[1043]: Unable to get Headset Voice gateway SDP record: Host is down

Revision history for this message
Karl Grzeszczak (karlgrz) wrote :

If I run:

sudo systemctl restart bluetooth

the Bluetooth icon in the system taskbar goes blank, and if I try to re-enable it nothing ever happens. Here's the logs from that state:

Apr 26 09:41:38 deathstar systemd[1]: Stopping Bluetooth service...
Apr 26 09:41:38 deathstar bluetoothd[1043]: Terminating
Apr 26 09:41:38 deathstar bluetoothd[1043]: Endpoint unregistered: sender=:1.81 path=/MediaEndpoint/A2DPSource
Apr 26 09:41:38 deathstar bluetoothd[1043]: Endpoint unregistered: sender=:1.81 path=/MediaEndpoint/A2DPSink
Apr 26 09:41:38 deathstar bluetoothd[1043]: Stopping SDP server
Apr 26 09:41:38 deathstar bluetoothd[1043]: Exit
Apr 26 09:41:38 deathstar systemd[1]: Stopped Bluetooth service.
Apr 26 09:41:38 deathstar systemd[1]: Starting Bluetooth service...
Apr 26 09:41:38 deathstar bluetoothd[14513]: Bluetooth daemon 5.37
Apr 26 09:41:38 deathstar bluetoothd[14513]: Starting SDP server
Apr 26 09:41:38 deathstar systemd[1]: Started Bluetooth service.
Apr 26 09:41:38 deathstar dbus[1055]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service'
Apr 26 09:41:38 deathstar bluetoothd[14513]: Bluetooth management interface 1.10 initialized
Apr 26 09:41:38 deathstar bluetoothd[14513]: Failed to obtain handles for "Service Changed" characteristic
Apr 26 09:41:38 deathstar bluetoothd[14513]: Not enough free handles to register service
Apr 26 09:41:38 deathstar bluetoothd[14513]: Error adding Link Loss service
Apr 26 09:41:38 deathstar bluetoothd[14513]: Not enough free handles to register service
Apr 26 09:41:38 deathstar bluetoothd[14513]: message repeated 2 times: [ Not enough free handles to register service]
Apr 26 09:41:38 deathstar bluetoothd[14513]: Current Time Service could not be registered
Apr 26 09:41:38 deathstar bluetoothd[14513]: gatt-time-server: Input/output error (5)
Apr 26 09:41:38 deathstar bluetoothd[14513]: Not enough free handles to register service
Apr 26 09:41:38 deathstar bluetoothd[14513]: Not enough free handles to register service
Apr 26 09:41:38 deathstar bluetoothd[14513]: Sap driver initialization failed.
Apr 26 09:41:38 deathstar bluetoothd[14513]: sap-server: Operation not permitted (1)
Apr 26 09:41:38 deathstar systemd[1]: Starting Hostname Service...
Apr 26 09:41:38 deathstar pulseaudio[2246]: [pulseaudio] backend-ofono.c: Failed to register as a handsfree audio agent with ofono: org.freedesktop.DBus.Error.ServiceUnknown: The name org.ofono was not provided by any .service files
Apr 26 09:41:38 deathstar bluetoothd[14513]: Endpoint registered: sender=:1.81 path=/MediaEndpoint/A2DPSource
Apr 26 09:41:38 deathstar bluetoothd[14513]: Endpoint registered: sender=:1.81 path=/MediaEndpoint/A2DPSink
Apr 26 09:41:38 deathstar dbus[1055]: [system] Successfully activated service 'org.freedesktop.hostname1'
Apr 26 09:41:38 deathstar systemd[1]: Started Hostname Service.

It's good to note that I reverted all of the configuration changes I made as suggested by @robert123m in post #5.

Revision history for this message
In , anonymous (anonymous-anonymous-1234) wrote :

I reproduced the same bug with Sony MDR-1RBT. Why does it have the problem with Sony bluetooth products?

Revision history for this message
Karl Grzeszczak (karlgrz) wrote :

Tried again just now with the Sennheiser Urbanite XL Wireless and see this in the syslog:

May 10 08:00:02 deathstar wpa_supplicant[1472]: wlp6s0: Failed to initiate sched scan
May 10 08:00:09 deathstar rtkit-daemon[2045]: Supervising 4 threads of 1 processes of 1 users.
May 10 08:00:09 deathstar rtkit-daemon[2045]: Successfully made thread 19868 of process 2461 (n/a) owned by '1000' RT at priority 5.
May 10 08:00:09 deathstar rtkit-daemon[2045]: Supervising 5 threads of 1 processes of 1 users.
May 10 08:00:09 deathstar kernel: [ 505.747613] Bluetooth: hci0 SCO packet for unknown connection handle 0
May 10 08:00:09 deathstar kernel: [ 505.747616] Bluetooth: hci0 SCO packet for unknown connection handle 0
May 10 08:00:09 deathstar kernel: [ 505.747617] Bluetooth: hci0 SCO packet for unknown connection handle 0
May 10 08:00:14 deathstar pulseaudio[2461]: [pulseaudio] module-bluez5-device.c: Refused to switch profile to a2dp_sink: Not connected
May 10 08:00:14 deathstar bluetoothd[1176]: Unable to get io data for Headset Voice gateway: getpeername: Transport endpo int is not connected (107)
May 10 08:00:14 deathstar kernel: [ 510.979305] Bluetooth: hci0 SCO packet for unknown connection handle 258
May 10 08:00:21 deathstar bluetoothd[1176]: connect error: Host is down (112)
May 10 08:00:21 deathstar bluetoothd[1176]: GLib: Source ID 197 was not found when attempting to remove it

Revision history for this message
Karl Grzeszczak (karlgrz) wrote :

Also see this in dmesg:

[ 505.747613] Bluetooth: hci0 SCO packet for unknown connection handle 0
[ 505.747616] Bluetooth: hci0 SCO packet for unknown connection handle 0
[ 505.747617] Bluetooth: hci0 SCO packet for unknown connection handle 0
[ 510.979305] Bluetooth: hci0 SCO packet for unknown connection handle 258

Revision history for this message
Karl Grzeszczak (karlgrz) wrote :

    4 May 10 08:13:07 deathstar systemd[1]: Stopping User Manager for UID 108...
    5 May 10 08:13:07 deathstar systemd[1880]: Stopped target Default.
    6 May 10 08:13:07 deathstar systemd[1880]: Reached target Shutdown.
    7 May 10 08:13:07 deathstar systemd[1880]: Stopped target Basic System.
    8 May 10 08:13:07 deathstar systemd[1880]: Stopped target Timers.
    9 May 10 08:13:07 deathstar systemd[1880]: Stopped target Sockets.
   10 May 10 08:13:07 deathstar systemd[1880]: Stopped target Paths.
   11 May 10 08:13:07 deathstar systemd[1880]: Starting Exit the Session...
   12 May 10 08:13:07 deathstar systemd[1880]: Received SIGRTMIN+24 from PID 3313 (kill).
   13 May 10 08:13:07 deathstar systemd[1]: Stopped User Manager for UID 108.
   14 May 10 08:13:07 deathstar systemd[1]: Removed slice User Slice of lightdm.
   15 May 10 08:13:42 deathstar rtkit-daemon[1995]: Supervising 4 threads of 1 processes of 1 users.
   16 May 10 08:13:42 deathstar rtkit-daemon[1995]: Successfully made thread 3335 of process 2415 (n/a) owned by '1000' RT at priority 5.
   17 May 10 08:13:42 deathstar rtkit-daemon[1995]: Supervising 5 threads of 1 processes of 1 users.
   18 May 10 08:13:42 deathstar kernel: [ 166.886756] Bluetooth: hci0 SCO packet for unknown connection handle 0
   19 May 10 08:13:42 deathstar kernel: [ 166.886762] Bluetooth: hci0 SCO packet for unknown connection handle 0
   20 May 10 08:13:45 deathstar wpa_supplicant[1568]: wlp6s0: Failed to initiate sched scan
   21 May 10 08:13:51 deathstar bluetoothd[1084]: Start: Connection timed out (110)
   22 May 10 08:13:51 deathstar pulseaudio[2415]: [pulseaudio] bluez5-util.c: Transport Acquire() failed for transport /org/bl uez/hci0/dev_00_16_94_14_C4_15/fd1 (Input/output error)
   23 May 10 08:13:53 deathstar bluetoothd[1084]: Abort: Connection timed out (110)
   24 May 10 08:13:57 deathstar pulseaudio[2415]: [pulseaudio] backend-native.c: connect(): Device or resource busy
   25 May 10 08:14:03 deathstar bluetoothd[1084]: Unable to get io data for Headset Voice gateway: getpeername: Transport endp oint is not connected (107)
   26 May 10 08:14:03 deathstar bluetoothd[1084]: 00:16:94:14:C4:15: error updating services: Input/output error (5)
   27 May 10 08:14:03 deathstar kernel: [ 188.733312] Bluetooth: hci0 SCO packet for unknown connection handle 257
   28 May 10 08:14:03 deathstar kernel: [ 188.733315] Bluetooth: hci0 SCO packet for unknown connection handle 257
   29 May 10 08:14:03 deathstar kernel: [ 188.733316] Bluetooth: hci0 SCO packet for unknown connection handle 257
   30 May 10 08:14:23 deathstar bluetoothd[1084]: /org/bluez/hci0/dev_00_16_94_14_C4_15/fd2: fd(21) ready

Revision history for this message
Karl Grzeszczak (karlgrz) wrote :

Happy update. Resolved my issues with at least the Sennheiser Urbanite XL Wireless by disconnecting from my android phone before trying to connect to Ubuntu 16.04. I'll take it.

Revision history for this message
jordan rubin (delorean1) wrote :

Confirming this issue also with the Phillips Bluetooth speaker model BT2500B/37. Cannot set to higher quality sound in pulseaudio. Using gnome-ubuntu 16.04

Revision history for this message
Romano Giannetti (romano-giannetti) wrote :

Updated to 16.04, have the same problem. The fix in comment#5 fixes it!
Thanks!

Revision history for this message
Alexander Menk (alex-menk) wrote :

Same problem here. The workaround partially fixes it, but still I have sometimes problems to connect. Is it dependent on the bluetooth adapter, headset or both? Are there know-to-work adapters?

Revision history for this message
Louis Bouchard (louis) wrote :

Testing with a JBL SB400 BT on a Lenovo Thinkpad T450S with the intel ibt driver on F/W version 37081001103110e23 works correctly.

Doing a parallel test on my laptop (HP evo 850) that has :

[12383.666088] Bluetooth: hci0: read Intel version: 370710018002030d00
[12383.666095] Bluetooth: hci0: Intel Bluetooth firmware file: intel/ibt-hw-37.7.10-fw-1.80.2.3.d.bseq

Fails according to the bug report.

So it may be firmware related

Revision history for this message
In , Nikola Snele (n-schnelle) wrote :

Can confirm the bug in Kubuntu 16.04 with JBL bluetooth speaker.

Revision history for this message
In , Vudentz (luiz-dentz-gmail) wrote :
Mathew Hodson (mhodson)
Changed in bluez (Ubuntu Vivid):
status: Confirmed → Won't Fix
Changed in pulseaudio (Ubuntu Vivid):
status: Confirmed → Won't Fix
Changed in bluez (Ubuntu Vivid):
milestone: vivid-updates → none
Changed in pulseaudio (Ubuntu Vivid):
milestone: vivid-updates → none
tags: added: regression-release
tags: added: xenial
Revision history for this message
In , Fabrice-b (fabrice-b) wrote :

I just tested with this newer bluez, and the bug is still there.

Revision history for this message
In , Vudentz (luiz-dentz-gmail) wrote :

This is a headset bug actually, the policy of reconnecting profiles is from the initiator as it may or may not have disabled profiles, like cars normally do have options to have phone calls only or media only.

It is actually pretty strange coming from Sony, this used to work quite well with their devices in the past, maybe they have decided to move to another stack an now there is this sort of problem, please add the HCI trace maybe there is something preventing the L2CAP connection to A2DP.

Revision history for this message
In , anonymous (anonymous-anonymous-1234) wrote :

(In reply to Luiz Augusto von Dentz from comment #7)
> stack an now there is this sort of problem, please add the HCI trace maybe
> there is something preventing the L2CAP connection to A2DP.

Unfortunately, the sony headset was taken by someone else. I don't have it anymore.

Revision history for this message
In , Fabrice-b (fabrice-b) wrote :

(In reply to Luiz Augusto von Dentz from comment #7)
> This is a headset bug actually, the policy of reconnecting profiles is from
> the initiator as it may or may not have disabled profiles, like cars
> normally do have options to have phone calls only or media only.
>
> It is actually pretty strange coming from Sony, this used to work quite well
> with their devices in the past, maybe they have decided to move to another
> stack an now there is this sort of problem, please add the HCI trace maybe
> there is something preventing the L2CAP connection to A2DP.

oh yes, you're right, there's an action to be performed on the device (press on the play/pause jog switch), that makes the a2dp_sink profile available and active in pulseaudio.

Revision history for this message
Cyril Humbert (cyril-h5t) wrote :

Same issue with the folowing BT headphones:

 * Plantronic BackBeat FIT.

 * Plantronic BackBeat PRO.

 * B&O Beoplay H8.

The computer has a BT USB dongle:

  Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
  CSR8510 A10
  USB ID = 0a12:0001

The following procedure solved the problem for us:

 1. Purge Ubuntu pulseaudio packages and conf files. Backup and purge
    pulseaudio user conf files too.

 2. Install the corresponding packages from Debian testing (June 2016).
    See attached script (get-pulseaudio8-debian-amd64.sh).

 3. Restart.

 4. A2DP profile should now work as expected with the default
    bluez/pulseaudio configuration (Use pavucontrol to select A2DP
    if needed).

Since Debian Testing (June 2016) and Ubuntu 16.04 are based on the
same pulseaudio upstream version (8.0) this suggests that this
regression is maybe due to a difference in Debian and Ubuntu
packaging: either the compilation options, the default conf or the
specific patches (e.g. Ubuntu packages include more specific patches).

Revision history for this message
Cyril Humbert (cyril-h5t) wrote :

Updated procedure for comment #35, allowing to install more easily
Debian Testinf pulseaudio package on Ubunutu 16.04.

 1. Stop pulseaudio. Then, backup and purge pulseudio user conf files.

 2. Install pulseaudio Debian Testing (June 2016) packages over Ubuntu
    pulseaudio packages. This will appear as a kind of downgrade. See
    get-pulseaudio8-debian-amd64.sh script. If you use
    pulseaudio-module-x11 too, use the corresponding Debian Testing
    version too to satisfy dependencies.

 3. Restart.

 4. A2DP profile should now work as expected with the default
    BlueZ, pulseaudio configuration. Use pavucontrol to select
    A2DP profile if needed.

Revision history for this message
Potato110 (aardappel110) wrote :

Same here with a Teufel Airy bluetooth headset. #18 even doesn't work for me.

Revision history for this message
Max Bowsher (maxb) wrote :

Acting on Cyril's suggestion above, I downloaded the Debian 8.0-2 source package, rebuilt it locally, and installed it. It seems to have fixed the problem for me. So perhaps the problem really is in the Ubuntu delta?

Revision history for this message
radiantptz (radiantptz) wrote :

Confirmed fixed on @robert123m post #5 above on ubuntu 16.04.1 LTS. Can't thank you enough. Here is my env for reference:

$ dpkg -l | grep 'pulse\|bluetooth'
ii blueman 2.0.4-1ubuntu2
ii gir1.2-gnomebluetooth-1.0:amd64 3.18.2-1ubuntu2
ii gnome-bluetooth 3.18.2-1ubuntu2
ii gstreamer1.0-pulseaudio:amd64 1.8.2-1ubuntu0.1
ii libbluetooth3:amd64 5.37-0ubuntu5
ii libcanberra-pulse:amd64 0.30-2.1ubuntu1
ii libgnome-bluetooth13:amd64 3.18.2-1ubuntu2
ii libpulse-mainloop-glib0:amd64 1:8.0-0ubuntu3
ii libpulse0:amd64 1:8.0-0ubuntu3
ii libpulse0:i386 1:8.0-0ubuntu3
ii libpulsedsp:amd64 1:8.0-0ubuntu3
ii pulseaudio 1:8.0-0ubuntu3
ii pulseaudio-module-bluetooth 1:8.0-0ubuntu3
ii pulseaudio-module-x11 1:8.0-0ubuntu3
ii pulseaudio-utils 1:8.0-0ubuntu3

Revision history for this message
Ayberk Özgür (equilibriumtr) wrote :

I also confirm that #5 fixes audio output (was able to connect before but no audio output) with Sony MDRXB950BT on Kubuntu 16.04.

Revision history for this message
Jason Robinson (jaywink) wrote :

Confirmed on Ubuntu 16.04 (4.4.0-34-generic). Recently bought a bluetooth dongle to my desktop. Cannot switch to A2DP making headset useless for listening to music.

bluez 5.37-0ubuntu5
pulseaudio 1:8.0-0ubuntu3

Tried comment #5 editing, rebooted - no effect. This same log message keeps coming to /var/syslog:

> [pulseaudio] module-bluez5-device.c: Refused to switch profile to a2dp_sink: Not connected

Revision history for this message
Ayberk Özgür (equilibriumtr) wrote :

I retract my confirmation on #40; after one disconnect/connect it is back to no audio.

Revision history for this message
Rahul (rahul-kale-1) wrote :

Confirmed Fix on #5,works permanently on Ubuntu 16.04

Revision history for this message
Jônata Tyska Carvalho (jonatatyska) wrote :

Come on guys, this bug was reported almost 6 months ago and there is still no fix for that. Could you focus on it or at least provide a temporary solution. #5 doesn't work for me as well. I have here a Sony MDR-ZX750BN with Ubuntu 16.04 xenial presenting the same problem, it connects but no audio is played. If I use blueman-manager and try to change to A2DP mode, it provides an error message saying that it is not possible to make the switch and keeps the headphone turned off.

Revision history for this message
Jônata Tyska Carvalho (jonatatyska) wrote :

After some connect/disconnecting trials using the blueman-manager, this script finally made the things work.

https://gist.github.com/pylover/d68be364adac5f946887b85e6ed6e7ae#file-a2dp-py

Thanks Vahid Mardani for writing this script.

Revision history for this message
Eldon McGuinness (eldon.mcguinness) wrote :

Just wanted to add that the fix in #5 fixed the a2dp issue for me as well. I'm using a pair of [url https://www.amazon.com/gp/product/B00J0BXPD4/ref=od_aui_detailpages00?ie=UTF8&psc=1]Avantree headphones[/url].

Revision history for this message
Cyril Humbert (cyril-h5t) wrote :

The present bug is probably related to https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1574324 .

The comment given https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1574324/comments/15
seems to confirm #35 and #38: the regression is caused by some patch applied for the Ubuntu
Pulseaudio package.

Revision history for this message
Romano Giannetti (romano-giannetti) wrote :

A new error mode is that now the BT device is not connected at all, even after doing the #5 thing, with the error:

bluetoothd[984]: Unable to get Headset Voice gateway SDP record: Host is down

I need to reboot the system, unpair and pair again the device, and then doing the dance of connecting with low quality, change to the internal audio, disconnecting the BT device, reconnecting again, switch to A2DP --- which now works. After 20 minutes.

I think something happened in the last kernel update.

Will start looking in Google for rain dances for the next time... ;-)

summary: - [REGRESSION] bluetooth headset no longer supports a2dp
+ [REGRESSION] bluetooth headset no longer supports a2dp in 16.04 xenial
description: updated
Revision history for this message
Alessio Tona (ale763) wrote : Re: [REGRESSION] bluetooth headset no longer supports a2dp in 16.04 xenial

I applied both solution of #5 and #45. After running the python script my headset started working correctly. I don't know if it is solution of #45 or the combination of #5 and #45, but it works now. Thanks!

Revision history for this message
Tamir (sugip) wrote :

For yak actuality

tags: added: yakkety
description: updated
summary: [REGRESSION] bluetooth headset no longer supports a2dp in 16.04 xenial
+ and 16.10 yakkety
Revision history for this message
Harish (harish-myemails) wrote : Re: [REGRESSION] bluetooth headset no longer supports a2dp in 16.04 xenial and 16.10 yakkety

I am able to use my bluetooth headset after running these two commands

killall pulseaudio; rm -r ~/.config/pulse/* ;
pulseaudio -k

Revision history for this message
Ryan Lee Sipes (ryanleesipes) wrote :

This affects me as well. Seemingly with each type of bluetooth device I've connected. Sony SRS-X11 bluetooth speaker, my JBL Bluetooth speaker (not sure on the model), and my SkullCandy Hesh 2 Wireless Headphones.

Restarting the devices multiple times appears to randomly fix it. Then I just make sure to keep the device connected on my desk all day to ensure it does not get disconnected.

Will try the workaround.

This affects me on both 16.04 and 16.10 (tested on multiple machines here at System76).

Revision history for this message
Klavs Klavsen (kl-vsen) wrote :

I have the same issue since updating to 16.04 :(

I have found a consistent way to get A2DP profile working - but it has to be done on every reconnect :(

I switch to HSP/HFP - and sound works. Then I stop ALL sound.. and disconnect bluetoothe device, reconnects bluetoothe device, and then switch profile to a2dp(sink) - and ONLY then, can I start the music again.

Revision history for this message
In , Elias E. del Real (pixelshader) wrote :
Download full text (4.0 KiB)

I have a Sony MDR-ZX220BT bluetooth headset that encounters this problem.
I'm using Ubuntu 16.10, bluez "5.41-0ubuntu3", and pulseaudio "1:9.0-2ubuntu2.1".

From
https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/1438510
https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/1577197
it looks like the sequence that works is:

1. Select the "off" profile in pulseaudio.
2.1 Disconnect the bluetooth earphones.
2.2 Reconnect the bluetooth earphones.
3. Select the "a2dp_sink" profile in pulseaudio.

Or for commands:
1. pactl set-card-profile bluez_card.00_18_09_62_4B_98 off
2. bluetoothctl
2.1 disconnect 00:18:09:62:4B:98
2.2 connect 00:18:09:62:4B:98
3. pactl set-card-profile bluez_card.00_18_09_62_4B_98 a2dp_sink

Bluetooth users are resorting to a scripted version of the above as a workaround:
https://gist.github.com/pylover/d68be364adac5f946887b85e6ed6e7ae#file-a2dp-py

What I'm seeing in /var/log/syslog if I select "a2dp_sink" as the profile, then disconnect, and reconnect:

Nov 25 00:47:50 fireflower pulseaudio[2178]: [pulseaudio] module-bluez5-device.c: Default profile not connected, selecting off profile
Nov 25 00:47:50 fireflower bluetoothd[970]: /org/bluez/hci0/dev_00_18_09_62_4B_98/fd17: fd(24) ready
Nov 25 00:47:50 fireflower pulseaudio[2178]: [pulseaudio] bluez5-util.c: Transport TryAcquire() failed for transport /org/bluez/hci0/dev_00_18_09_62_4B_98/fd17 (Operation Not Authorized)
Nov 25 00:47:50 fireflower kernel: [ 7852.918655] input: 00:18:09:62:4B:98 as /devices/virtual/input/input37

The message from bluetoothd "fd(24) ready" showing up then makes me wonder if this is a race between pulseaudio and the bluetooth connection?

If I then run:

pactl set-card-profile bluez_card.00_18_09_62_4B_98 a2dp_sink

I get nothing new in /var/log/syslog .

If I run:

pactl set-card-profile bluez_card.00_18_09_62_4B_98 off

I get nothing new in /var/log/syslog .

If I again run:

pactl set-card-profile bluez_card.00_18_09_62_4B_98 a2dp_sink

I get this output:

Failure: Input/Output error

and /var/log/syslog logs:

Nov 25 00:52:26 fireflower pulseaudio[2178]: [pulseaudio] bluez5-util.c: Transport Acquire() failed for transport /org/bluez/hci0/dev_00_18_09_62_4B_98/fd17 (Operation Not Authorized)

If I run

pactl list cards | tail -n 26

I see:

Card #18
 Name: bluez_card.00_18_09_62_4B_98
 Driver: module-bluez5-device.c
 Owner Module: 43
 Properties:
  device.description = "MDR-ZX220BT"
  device.string = "00:18:09:62:4B:98"
  device.api = "bluez"
  device.class = "sound"
  device.bus = "bluetooth"
  device.form_factor = "headset"
  bluez.path = "/org/bluez/hci0/dev_00_18_09_62_4B_98"
  bluez.class = "0x240404"
  bluez.alias = "MDR-ZX220BT"
  device.icon_name = "audio-headset-bluetooth"
  device.intended_roles = "phone"
 Profiles:
  headset_head_unit: Headset Head Unit (HSP/HFP) (sinks: 1, sources: 1, priority: 20, available: yes)
  a2dp_sink: High Fidelity Playback (A2DP Sink) (sinks: 1, sources: 0, priority: 10, available: yes)
  off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
 Active Profile: off
 Ports:
  headset-output: Headset (priority: 0, latency offset: 0 usec, available)
   Part of profile(s): headset_h...

Read more...

Revision history for this message
In , Elias E. del Real (pixelshader) wrote :

Created attachment 128181
btmon log of attempt to connect and automatically use a2dp_sink profile.

Attached a btmon log of attempt to connect and automatically use a2dp_sink profile.

Revision history for this message
In , Vudentz (luiz-dentz-gmail) wrote :

Well the logs looks completely different from the original problem, perhaps the logs of bluetoothd can show if there is perhaps another client acquiring the transport which would explain the error:

Nov 25 00:47:50 fireflower pulseaudio[2178]: [pulseaudio] bluez5-util.c: Transport TryAcquire() failed for transport
/org/bluez/hci0/dev_00_18_09_62_4B_98/fd17 (Operation Not Authorized)

Revision history for this message
In , Tanu Kaskinen (tanuk) wrote :

That another client could be gdm's pulseaudio instance. See comment 56 in bug 73325 for how to disable gdm's use of bluetooth: https://bugs.freedesktop.org/show_bug.cgi?id=73325#c56

Revision history for this message
In , Josh-onn (josh-onn) wrote :

I faced a similar issue with a2dp_sink profile where it is "not available" and what I did prior to connecting the Bluetooth headset in bluetoothctl was to first run pulseaudio --check -v to check if the pulseaudio daemon is running. If it is not running, issue "pulseaudio -D" and then check if it is running. Once the pulseaudio daemon is running, then only perform pairing and connecting in bluetoothctl.

tags: added: papercuts2017
Revision history for this message
Henrik Langli (8-henrik) wrote :

#51 doesn't work on 16.10:

# killall pulseaudio; rm -r ~/.config/pulse/* ; pulseaudio -k
E: [pulseaudio] main.c: Failed to kill daemon: No such process
#

But at least I got rid of my pulseaudio config :-)

This bug will soon have its 2 year anniversary - are anybody preparing celebrations?

Revision history for this message
mk (mk.pmb) wrote :

Upgraded my netbook to xenial today, paired my Sennheiser PX210BT,
shows up in "bt-device --list", connects and headphones play their
internal "playback device added" sound. pavucontrol sees them as
well and offers "High Fidelity Playback (A2DP Sink)" as one of the
modes, so I select it, but still its "output devices" tab has just
the "dummy output". :-(

Also I want the bt-audio command back.

Revision history for this message
In , Armagvvg (armagvvg) wrote :

Hi,

The same bug for me. Ubuntu 16.04. Packets:

  * libbluetooth3:amd64 5.37-0ubuntu5
  * pulseaudio-module-bluetooth 1:8.0-0ubuntu3.1
  * bluez 5.37-0ubuntu5
  * pulseaudio 1:8.0-0ubuntu3.1

Speakers JBL Charge 2 can't return after disconnecting. The python script a2dp.py published above restores connection.

Is there any chance to solve this in 2017? How can I help with this? (I'm a programmer). Is is a bug of pulseaudio or blueZ?

Revision history for this message
Martin (fidyyuan) wrote :

Is there a way to write a script that can switch to HSP/HFP, attempt to switch to a2dp, disconnect bluetooth and reconnect the bluetooth and then connect to a2dp? That would be a decent work around so we could save ourselves time when we do this every day.

Revision history for this message
Romano Giannetti (romano-giannetti) wrote :

As I commented in http://askubuntu.com/a/775524/16395, some people reported success with the python script at https://gist.github.com/pylover/d68be364adac5f946887b85e6ed6e7ae --- be warned, there is a bit of NSFW language there.

Revision history for this message
Martin (fidyyuan) wrote :

#57 Thank you SO MUCH! That script worked perfectly for me!

Revision history for this message
In , Tanu Kaskinen (tanuk) wrote :

(In reply to Slava Grig from comment #15)
> Is there any chance to solve this in 2017? How can I help with this? (I'm a
> programmer). Is is a bug of pulseaudio or blueZ?

If you're a programmer, you can dive into pulseaudio and bluez code and figure out why it's not working.

Have you disabled bluetooth for gdm, as hinted to in comment #13? Ruling out the gdm problem would be the first step.

If the a2dp profile in "pactl list cards" shows up as "available: no", then it's likely a bluez bug. An "unavailable" bluetooth profile in pulseaudio means that bluez tells pulseaudio that the profile isn't connected.

Changed in pulseaudio:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
In , ipatrol (ipatrol6010) wrote :

Raising the priority due to downstream activity (affects a number of popular devices, directly impacts usability, leaves mainstream desktop Linux distros at a feature loss compared to non-free OSes, etc.). Also personally confirming that it affects the Bose Color SoundLink, and the workaround script is no help with it.

This bug should not have gone unresolved for two years.

Revision history for this message
In , Danielius (rarebit) wrote :

A more or less vanilla Ubuntu 16.04 installation, this bug is triggered. Python script provided (a2dp.py) works like a charm and returns sound to device.

Revision history for this message
In , anonymous (anonymous-anonymous-1234) wrote :

(In reply to Daniel from comment #18)
> A more or less vanilla Ubuntu 16.04 installation, this bug is triggered.
> Python script provided (a2dp.py) works like a charm and returns sound to
> device.

Where can I download a2dp.py? I want to make MDR-1RBT work on my linux.

Revision history for this message
In , Danielius (rarebit) wrote :

(In reply to crocket from comment #19)
> (In reply to Daniel from comment #18)
> > A more or less vanilla Ubuntu 16.04 installation, this bug is triggered.
> > Python script provided (a2dp.py) works like a charm and returns sound to
> > device.
>
> Where can I download a2dp.py? I want to make MDR-1RBT work on my linux.

Link provided above in comment #10

https://gist.github.com/pylover/d68be364adac5f946887b85e6ed6e7ae#file-a2dp-py

Revision history for this message
In , anonymous (anonymous-anonymous-1234) wrote :

Unfortunately, with MDR-1RBT, a2dp_sink is not available. Thus, a2dp.py cannot work in my case.

The only real errors I see in journalctl are

E: [pulseaudio] backend-native.c: connect(): Function not implemented
W: [pulseaudio] module-bluez5-device.c: Refused to switch profile to a2dp_sink: Not connected

Revision history for this message
In , anonymous (anonymous-anonymous-1234) wrote :

Wait. The proposed workaround worked for MDR-1RBT.
I followed the steps below.

1. Turn on MDR-1RBT
2. Let it be paired and connected to automatically
3. Execute `connect 00:18:09:1F:C3:29` in bluetoothctl
4. Execute `pactl set-card-profile bluez_card.00_18_09_1F_C3_29 a2dp_sink` on a shell.
5. Select MDR-1RBT's A2DP in sound settings

If there was a workaround, people must have found the exact cause of the problem.
What is the problem? What is the cause? What is the solution?

Revision history for this message
In , Vudentz (luiz-dentz-gmail) wrote :

(In reply to crocket from comment #22)
> Wait. The proposed workaround worked for MDR-1RBT.
> I followed the steps below.
>
> 1. Turn on MDR-1RBT
> 2. Let it be paired and connected to automatically
> 3. Execute `connect 00:18:09:1F:C3:29` in bluetoothctl
> 4. Execute `pactl set-card-profile bluez_card.00_18_09_1F_C3_29 a2dp_sink`
> on a shell.
> 5. Select MDR-1RBT's A2DP in sound settings
>
> If there was a workaround, people must have found the exact cause of the
> problem.
> What is the problem? What is the cause? What is the solution?

If you could please add some logs when connecting, syslog of bluetoothd and pulseaudio, then we can figure out if it needs some special handling.

Revision history for this message
In , anonymous (anonymous-anonymous-1234) wrote :

Created attachment 130342
bluetoothd.log

I attached bluetooth.log as a file because it is somewhat long.
I paste journalctl log below because it is short.

journalctl.log:
----------------------------------------
I don't know what this is.

Mar 21 21:11:42 arch-server pulseaudio[16130]: W: [pulseaudio] module-bluez5-device.c: Profile has no transport

-----------------------------------------
When I tried to select MDR-1RBT in gnome sound settings while MDR-1RBT's active profile was off.

Mar 21 21:12:43 arch-server pulseaudio[16130]: E: [pulseaudio] backend-native.c: connect(): Function not implemented
Mar 21 21:12:47 arch-server pulseaudio[16130]: E: [pulseaudio] backend-native.c: connect(): Function not implemented

Revision history for this message
In , anonymous (anonymous-anonymous-1234) wrote :

Created attachment 130343
bluetooth-headset_head_unit.log

I haven't found a way to get verbose pulseaudio log output on gnome.
According to my test, A2DP works for MDR-1RBT after reconnection.
But, I can't set the active profile to headset_head_unit for MDR-1RBT.
Read the following errors I got when I tried headset_head_unit.

~> pactl set-card-profile bluez_card.00_18_09_1F_C3_29 headset_head_unit
Failure: Input/Output error
journalctl:
E: [pulseaudio] backend-native.c: connect(): Function not implemented

I attached bluetoothd log recorded when I tried headset_head_unit.

Revision history for this message
In , Vudentz (luiz-dentz-gmail) wrote :
Download full text (4.8 KiB)

bluetoothd[16274]: src/adapter.c:connected_callback() hci0 device 00:18:09:1F:C3:29 connected eir_len 5
bluetoothd[16274]: src/adapter.c:dev_disconnected() Device 00:18:09:1F:C3:29 disconnected, reason 3
bluetoothd[16274]: src/adapter.c:adapter_remove_connection()
bluetoothd[16274]: plugins/policy.c:disconnect_cb() reason 3
bluetoothd[16274]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr 00:18:09:1F:C3:29 type 0 status 0xe
bluetoothd[16274]: src/device.c:device_bonding_complete() bonding (nil) status 0x0e
bluetoothd[16274]: src/device.c:device_bonding_failed() status 14
bluetoothd[16274]: src/adapter.c:resume_discovery()
bluetoothd[16274]: src/adapter.c:connected_callback() hci0 device 00:18:09:1F:C3:29 connected eir_len 5
bluetoothd[16274]: src/adapter.c:dev_disconnected() Device 00:18:09:1F:C3:29 disconnected, reason 3
bluetoothd[16274]: src/adapter.c:adapter_remove_connection()
bluetoothd[16274]: plugins/policy.c:disconnect_cb() reason 3
bluetoothd[16274]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr 00:18:09:1F:C3:29 type 0 status 0xe
bluetoothd[16274]: src/device.c:device_bonding_complete() bonding (nil) status 0x0e
bluetoothd[16274]: src/device.c:device_bonding_failed() status 14
bluetoothd[16274]: src/adapter.c:resume_discovery()
bluetoothd[16274]: src/adapter.c:connected_callback() hci0 device 00:18:09:1F:C3:29 connected eir_len 5
bluetoothd[16274]: src/adapter.c:dev_disconnected() Device 00:18:09:1F:C3:29 disconnected, reason 3
bluetoothd[16274]: src/adapter.c:adapter_remove_connection()
bluetoothd[16274]: plugins/policy.c:disconnect_cb() reason 3
bluetoothd[16274]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr 00:18:09:1F:C3:29 type 0 status 0xe
bluetoothd[16274]: src/device.c:device_bonding_complete() bonding (nil) status 0x0e
bluetoothd[16274]: src/device.c:device_bonding_failed() status 14
bluetoothd[16274]: src/adapter.c:resume_discovery()
bluetoothd[16274]: src/adapter.c:connected_callback() hci0 device 00:18:09:1F:C3:29 connected eir_len 5
bluetoothd[16274]: src/adapter.c:dev_disconnected() Device 00:18:09:1F:C3:29 disconnected, reason 3
bluetoothd[16274]: src/adapter.c:adapter_remove_connection()
bluetoothd[16274]: plugins/policy.c:disconnect_cb() reason 3
bluetoothd[16274]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr 00:18:09:1F:C3:29 type 0 status 0xe
bluetoothd[16274]: src/device.c:device_bonding_complete() bonding (nil) status 0x0e
bluetoothd[16274]: src/device.c:device_bonding_failed() status 14
bluetoothd[16274]: src/adapter.c:resume_discovery()
bluetoothd[16274]: src/adapter.c:connected_callback() hci0 device 00:18:09:1F:C3:29 connected eir_len 5
bluetoothd[16274]: src/profile.c:ext_confirm() incoming connect from 00:18:09:1F:C3:29

This sounds strange, it is as if the connection is interrupted several times before it succeeds, anyway once past this line all looks fine:

bluetoothd[16274]: src/service.c:change_state() 0x250c1a0: device 00:18:09:1F:C3:29 profile Headset Voice gateway state changed: connecting -> connected (0)

bluetoothd[16274]: profiles/audio/sink.c:sink_set_state() State changed /org/bluez/hci0/dev_00_18_09_1F_C3_29: SINK_STATE_CONNECTING -> SINK_STATE_CONNECTED
...

Read more...

Revision history for this message
In , anonymous (anonymous-anonymous-1234) wrote :

> This sounds strange, it is as if the connection is interrupted several times before it succeeds

When I turn on MDR-1RBT, the connection is severed by an unknown force several times before the connection succeeds.

> Perhaps this is GDM instance taking over? Btw, have we make sure GDM instance disables its endpoints when it is no longer active?

No, GDM is not running pulseaudio. I explicitly disabled pulseaudio in GDM.

~> ps -f (pgrep pulseaudio)
UID PID PPID C STIME TTY STAT TIME CMD
crocket 2038 1936 0 10:52 ? S<sl 0:04 /usr/bin/pulseaudio --daemonize=no

> there is some client acquiring the transport

I played music after A2DP became available to make sure A2DP actually worked.

Revision history for this message
Hui Wang (hui.wang) wrote :

I found a very import commit was reverted in the canonical's pulseaudio, if we restore that commit, this problem will be fixed.

commit de1e78a47cd13496c38f627d56944045a629053e
Author: David Henningsson <email address hidden>
Date: Fri Dec 19 10:24:47 2014 +0100

    bluez5: Do not suspend on no -> unknown profile transitions

    In case a transport is currently disconnected and transitions to
    idle, that should not count as a "remote hang up" event.

    Signed-off-by: David Henningsson <email address hidden>

Revision history for this message
Hui Wang (hui.wang) wrote :

I have tested #59 on several laptops which have different bluetooth modules (intel, atheros and realtek), and all of them are installed ubuntu 16.04, after restoring the commit of #59 in the pulseaudio, the problem disappears.

Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

Hey, to everyone interested we are currently testing and reviewing an improvement to PA that fixes problems with selecting A2DP mode for BT headsets.

Right now it is being tested internally with good results for Sony headsets, QC35 from Bose and BT speakers. Once it is in a silo/ppa I will share this information for much wider testing. Then it will be submitted as a SRU and will land in xenial.

Revision history for this message
Luke Yelavich (themuso) wrote : Re: [Bug 1438510] Re: [REGRESSION] bluetooth headset no longer supports a2dp in 16.04 xenial and 16.10 yakkety

Hui, do you know which patch in the pulseaudio package is responsible for this revert? A quick glance and I cannot find it.

Luke

Revision history for this message
Hui Wang (hui.wang) wrote : Re: [REGRESSION] bluetooth headset no longer supports a2dp in 16.04 xenial and 16.10 yakkety

@Luke,

0502-bluetooth-bluez5-bring-back-SCO-over-PCM-support.patch

Revision history for this message
Louis Bouchard (louis) wrote : Re: [Bug 1438510] Re: [REGRESSION] bluetooth headset no longer supports a2dp in 16.04 xenial and 16.10 yakkety

Hello,

Le 03/04/2017 à 12:02, Konrad Zapałowicz a écrit :
> Hey, to everyone interested we are currently testing and reviewing an
> improvement to PA that fixes problems with selecting A2DP mode for BT
> headsets.
>
> Right now it is being tested internally with good results for Sony
> headsets, QC35 from Bose and BT speakers. Once it is in a silo/ppa I
> will share this information for much wider testing. Then it will be
> submitted as a SRU and will land in xenial.
>

I've been subscribed to this bug for ages & I'm still seeing this issue with my
BT headset so I'd be more than happy to help you tests.

Kind regards,

...Louis

--
Louis Bouchard
Software engineer, Cloud & Sustaining eng.
Canonical Ltd
Ubuntu developer Debian Maintainer
GPG : 429D 7A3B DD05 B6F8 AF63 B9C4 8B3D 867C 823E 7A61

Revision history for this message
Khairul Aizat Kamarudzzaman (fenris) wrote : Re: [REGRESSION] bluetooth headset no longer supports a2dp in 16.04 xenial and 16.10 yakkety

yeah, we are more than happy to test the fixes. Can't wait for the PPA, hope it will land in Zesty as well ..

Kind Regards,
ejat @ fenris

Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

The ppa is: ppa:ubuntu-audio-dev/pulse-testing Feel free to add it to your system, update pulseaudio and test with your headsets.

Revision history for this message
Khairul Aizat Kamarudzzaman (fenris) wrote :

thanks @kzapalowicz

however in Zesty ver. 1:10.0-1ubuntu2. Please advise.

Revision history for this message
pasimako (pasimako) wrote :

I've been using the script from #57 in 16.04 & 16.10, but in 17.04 I switched to GNOME and now the script fails since it cannot find an a2dp sink. After some research, it seems that the problem is with GDM starting its own pulseaudio process (https://bbs.archlinux.org/viewtopic.php?pid=1526658#p1526658). If you think you might have the same issue, first check your pulseaudio instances:

$ ps aux | grep pulseaudio
gdm 2578 4.3 0.1 2350536 12896 ? S<l 15:40 2:10 /usr/bin/pulseaudio --start --log-target=syslog
user 1533 4.3 0.1 2350536 12896 ? S<l 15:48 2:18 /usr/bin/pulseaudio --start --log-target=syslog

If you see a process owned by gdm, you can try to disable pulseaudio spawning by gdm during startup:

$ sudo nano /var/lib/gdm3/.config/pulse/client.conf
autospawn = no
daemon-binary = /bin/true

$ sudo chown gdm:gdm /var/lib/gdm3/.config/pulse/client.conf

Restart and #57 should now work.

Revision history for this message
Lev Popov (nabam) wrote :

I've installed 1:8.0-0ubuntu3.3~xenial1 from testing PPA and it partly fixed the issue.

My headphones are Plantronics BackBeat PRO.

A2DP works perfectly fine when connection is initiated by linux machine, but when it's initiated by headphones, when they turn on, there is no sound. In syslog:

Apr 19 02:14:07 xps pulseaudio[11005]: [pulseaudio] module-bluez5-device.c: Default profile not connected, selecting off profile
Apr 19 02:14:10 xps bluetoothd[12649]: /org/bluez/hci0/dev_0C_E0_E4_45_40_F2/fd7: fd(25) ready
Apr 19 02:14:10 xps pulseaudio[11005]: [pulseaudio] bluez5-util.c: Transport TryAcquire() failed for transport /org/bluez/hci0/dev_0C_E0_E4_45_40_F2/fd7 (Operation Not Authorized)
Apr 19 02:14:20 xps pulseaudio[11005]: [pulseaudio] sink-input.c: Failed to create sink input: sink is suspended.
Apr 19 02:14:20 xps pulseaudio[11005]: [pulseaudio] sink-input.c: Failed to create sink input: sink is suspended.
Apr 19 02:14:20 xps pulseaudio[11005]: [pulseaudio] sink-input.c: Failed to create sink input: sink is suspended.
Apr 19 02:14:21 xps pulseaudio[11005]: [pulseaudio] sink-input.c: Failed to create sink input: sink is suspended.
Apr 19 02:14:21 xps pulseaudio[11005]: [pulseaudio] sink-input.c: Failed to create sink input: sink is suspended.
Apr 19 02:14:21 xps pulseaudio[11005]: [pulseaudio] sink-input.c: Failed to create sink input: sink is suspended.

Revision history for this message
Lev Popov (nabam) wrote :

The behavior I've described seems transient, I can't reproduce it anymore.

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

Lev: The problem you describe in comment #69 sounds like it might be fixed by this (which is missing from xenial AFAIK):

https://git.kernel.org/pub/scm/bluetooth/bluez.git/commit/src/service.c?id=2e2edc36a91d6a8f2c65d793273df28a166d6bed

summary: - [REGRESSION] bluetooth headset no longer supports a2dp in 16.04 xenial
- and 16.10 yakkety
+ [regression] Bluetooth audio no longer supports A2DP (stuck in HSP/HFP
+ mode)
tags: added: a2dp
Changed in pulseaudio (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
status: Confirmed → In Progress
Changed in bluez (Ubuntu):
status: Confirmed → Invalid
description: updated
Revision history for this message
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
description: updated
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

I have moved the debdiff into bug 1582213, which seems to be a more sure-fire-definitely-fixed bug when compared to this more vague ongoing issue.

description: updated
Jeremy Bícha (jbicha)
Changed in pulseaudio (Ubuntu Xenial):
importance: Undecided → High
Jeremy Bícha (jbicha)
no longer affects: bluez (Ubuntu Xenial)
Changed in pulseaudio (Ubuntu):
status: In Progress → Fix Released
Changed in pulseaudio (Ubuntu Xenial):
status: New → Triaged
Changed in pulseaudio (Ubuntu Xenial):
status: Triaged → In Progress
Changed in pulseaudio (Ubuntu):
assignee: Daniel van Vugt (vanvugt) → nobody
Changed in pulseaudio (Ubuntu Xenial):
assignee: nobody → Daniel van Vugt (vanvugt)
Revision history for this message
granjerox (granjerox) wrote :

Hello,

I've just upgraded pluseaudio with ppa from #66 and now my Q12 Bluetooth headset always connect fine as with A2DP Sink. I'm on Ubuntu 16.04 by the way.

Before the upgrade, I had to ensure to change profile back to HSP/HFP before disconnecting, otherwise I had to do it, disconnect, connect again and then set A2DP... really annoying.

Thanks for the fix, whatever it was.

Revision history for this message
Chris Halse Rogers (raof) wrote : Please test proposed package

Hello Dustin, 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
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Verified. Using the proposed packages bluetooth audio no longer randomly refuses to use A2DP mode.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Although after some reboots and reconnects I found I could encounter similar bugs, the proposed packages are still much better than what's in xenial at present. It took a lot more effort to confuse and break the bluetooth audio mode than it usually does :)

tags: added: verification-done-xenial
removed: verification-done
Revision history for this message
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
Revision history for this message
Brian Murray (brian-murray) wrote : Update 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.

Revision history for this message
In , Diego Fernandez (aiguofer) wrote :

I'm on Fedora 26, using PulseAudio 10.0 and I'm having the same issue with my Sony MDR100ABN headset. I've tried all sorts of things, and the only thing that consistently works is to:

1. Let it connect automatically when I turn on my headset
2. Disconnect through bluetoothctl
3. Reconnect through bluetoothctl
4. Use pacmd set-card-profile to set a2dp_sink

I've tried disabling the GDM pulseaudio, changing 'load-module module-bluetooth-discover headset=<mode>' in default.pa, adding 'load-module module-switch-on-connect' to default.pa, adding 'Disable=Headset' to '[General]' in bluetooth/main.conf, and pretty much any combination of those changes.

Revision history for this message
In , Johannes Wienke (languitar) wrote :

(In reply to Diego Fernandez from comment #28)
> I'm on Fedora 26, using PulseAudio 10.0 and I'm having the same issue with
> my Sony MDR100ABN headset. I've tried all sorts of things, and the only
> thing that consistently works is to:
>
> 1. Let it connect automatically when I turn on my headset
> 2. Disconnect through bluetoothctl
> 3. Reconnect through bluetoothctl
> 4. Use pacmd set-card-profile to set a2dp_sink

For me this is also the only thing that works, apart from the fact that I can enable A2DP within blueman after the explicit connection.

Archlinux, no GDM running.

Revision history for this message
In , Sergey (hxss) wrote :

My headset is Sony DR-BT50.
4.13.12-1-ARCH.

This is not gdm problem. I use lightdm + xfce. And have this bug. Nevertheless I was try to disable lightdm, reboot, startx - the bug still here.

Revision history for this message
In , Sergey (hxss) wrote :

Created attachment 135608
journalctl log of "automatic" headset connection

Revision history for this message
In , Sergey (hxss) wrote :

Created attachment 135609
pactl-subscribe log of "automatic" headset connection

Revision history for this message
In , Sergey (hxss) wrote :

Created attachment 135610
btmon log of "automatic" headset connection

Revision history for this message
In , Sergey (hxss) wrote :

Created attachment 135611
journalctl log of manual headset connection

Revision history for this message
In , Sergey (hxss) wrote :

Created attachment 135612
pactl-subscribe log of manual headset connection

Revision history for this message
In , Sergey (hxss) wrote :

Created attachment 135613
btmon log of manual headset connection

Revision history for this message
In , Sergey (hxss) wrote :

added some logs. Please check it

My system:
4.13.12-1-ARCH

BT:
local/blueberry 1.1.15-1
    Bluetooth configuration tool
local/bluez 5.47-2
    Daemons for the bluetooth protocol stack
local/bluez-libs 5.47-2
    Deprecated libraries for the bluetooth protocol stack
local/bluez-tools 0.2.0-1
    A set of tools to manage Bluetooth devices for Linux
local/bluez-utils 5.47-2
    Development and debugging utilities for the bluetooth protocol stack
local/gnome-bluetooth 3.26.0+1+g3875844-1
    The GNOME Bluetooth Subsystem
local/pulseaudio-bluetooth 11.1-1
    Bluetooth support for PulseAudio
local/sbc 1.3-1
    Bluetooth Subband Codec (SBC) library

Pulse:
local/libcanberra-pulse 0.30+2+gc0620e4-1
    PulseAudio plugin for libcanberra
local/libpulse 11.1-1
    A featureful, general-purpose sound server (client library)
local/pavucontrol 3.0-4
    PulseAudio Volume Control
local/pulseaudio 11.1-1
    A featureful, general-purpose sound server
local/pulseaudio-alsa 2-3
    ALSA Configuration for PulseAudio
local/pulseaudio-bluetooth 11.1-1
    Bluetooth support for PulseAudio
local/xfce4-pulseaudio-plugin 0.3.2-1 (xfce4-goodies)
    Pulseaudio plugin for Xfce4 panel

Revision history for this message
In , Sergey (hxss) wrote :

wrote this fully automated(you no need to manually run scripts or specify mac addresses) udev rule for temporary solve the problem. It work with already paired and new headsets.
https://gist.github.com/hxss/a3eadb0cc52e58ce7743dff71b92b297

Revision history for this message
In , Knizek-confy (knizek-confy) wrote :

@Sergey: thanks for your udev script.

Would you add a comment to your script that bluez-tools package is a dependency (for bt-device)? (Standard dependency for bluetooth sound seems to be only bluez-utils.)

Revision history for this message
In , Sergey (hxss) wrote :

(In reply to Milan Knížek from comment #39)
> @Sergey: thanks for your udev script.
>
> Would you add a comment to your script that bluez-tools package is a
> dependency (for bt-device)? (Standard dependency for bluetooth sound seems
> to be only bluez-utils.)

Dependencies list added.

Revision history for this message
In , Rathann (dominik-greysector) wrote :

Isn't this a duplicate of bug 73325?

Revision history for this message
In , Sergey (hxss) wrote :

Dominik, no. For me all protocols works fine. But only if I connect to headset manual from bluetoothctl. We need exactly AUTOMATIC connection, when headset trying to connect to PC.

Revision history for this message
In , Felix-steghofer (felix-steghofer) wrote :
Revision history for this message
In , Gih (gih) wrote :

Just want to confirm this bug with SONY MDR-XB650BT on Kernel 4.14.52-1-MANJARO.

The script from Comment 38 helped me.

Revision history for this message
In , Freedesktop-h (freedesktop-h) wrote :

Can also confirm the issue with Sony WH-H900N headphones, Arch with kernel 4.17.4, BlueZ 5.50, PulseAudio 12.0.

Revision history for this message
In , Gitlab-migration (gitlab-migration) wrote :

-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/525.

Changed in pulseaudio:
status: Confirmed → Unknown
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.