Bug 1503759 - Can't switch bluetooth headset to use A2DP
Summary: Can't switch bluetooth headset to use A2DP
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: pulseaudio
Version: 28
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Lennart Poettering
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-18 16:15 UTC by Grzegorz
Modified: 2019-05-02 19:41 UTC (History)
15 users (show)

(edit)
Clone Of: 1356136
(edit)
Last Closed:


Attachments (Terms of Use)

Description Grzegorz 2017-10-18 16:15:00 UTC
+++ This bug was initially created as a clone of Bug #1356136 +++

Description of problem:

Switching headset to use A2DP instead of HSP/HFP fails. Sound testing A2DP displays headset as mono instead of stereo. Poor sound quality.

Version-Release number of selected component (if applicable):

pulseaudio-11.1-3.fc27.src.rpm
bluez-5.47-2.fc27.src.rpm

How reproducible:

Always

Steps to Reproduce:
1. Pair bluetooth headset
2. Go to Sound settings
3. Select headset
4. Select High Fidelity Playback (A2DP sink)
5. Click on Test Speakers

Actual results:
* Mono
* Poor sound quality

Expected results:
* Stereo
* Good sound quality

Additional info:

This can be worked around by either preventing GDM from starting its own pulseaudio instance or by preventing GDM's pulseaudio instance from loading the bluetooth modules (reboot required):

$ su -s /bin/sh -c "sed '/.*ifexists.*bluetooth.*/,/.*endif.*/d' /etc/pulse/default.pa > ~gdm/.config/pulse/default.pa" gdm

Comment 1 George Sapkin 2017-12-06 09:32:07 UTC
Same issue here. I haven't tried the GDM workaround yet.

bluez-5.47-2.fc27.x86_64
kernel-4.14.3-300.fc27.x86_64
pipewire-0.1.6-2.fc27.x86_64
pulseaudio-11.1-7.fc27.x86_64

Intel(R) Dual Band Wireless AC 8265, REV=0x230 with firmware 34.0.1

Relevant error messages:

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

[  100.163879] Bluetooth: hci0 SCO packet for unknown connection handle 0  
[  100.173891] Bluetooth: hci0 SCO packet for unknown connection handle 0  
[  100.173893] Bluetooth: hci0 SCO packet for unknown connection handle 0  
[  100.173893] Bluetooth: hci0 SCO packet for unknown connection handle 0  
[  105.190667] Bluetooth: hci0 SCO packet for unknown connection handle 257
[  105.190670] Bluetooth: hci0 SCO packet for unknown connection handle 257
[  105.190672] Bluetooth: hci0 SCO packet for unknown connection handle 257

Comment 2 George Sapkin 2017-12-06 09:58:20 UTC
GDM workaround didn't work.

Comment 3 Erwan Legrand 2017-12-12 11:26:05 UTC
If the workaround I have suggested does not work for you, you should perhaps try this other workaround: https://bugzilla.freedesktop.org/show_bug.cgi?id=73325#c52

Comment 4 George Sapkin 2017-12-12 16:22:15 UTC
(In reply to Erwan Legrand from comment #3)
> If the workaround I have suggested does not work for you, you should perhaps
> try this other workaround:
> https://bugzilla.freedesktop.org/show_bug.cgi?id=73325#c52

The `headset=auto` workaround works. Thanks.

Comment 5 George Sapkin 2017-12-13 12:27:17 UTC
Looks like it was some kind of a placebo effect: after a restart the issue is back.

Comment 6 Tom Horsley 2018-01-03 00:44:54 UTC
The solution here worked for me:

https://linuxsuperuser.com/fix-bluetooth-speaker-a2dp-issue-fedora-archlinux/

It moves the load of module-bluetooth-discover to the pulseaudio start
script at the very end. (I have no idea why that works, mind you).

Comment 7 Benjamin Xiao 2018-02-19 10:33:44 UTC
I am getting the same issue with my Sony WH-1000XM2 headset. When I turn it on, it will connect but fail to switch to A2DP. However, if I disconnect the device using the Gnome Bluetooth settings and then reconnect, A2DP starts working again. I have to do this every time I power on the device and it gets really annoying.

Comment 8 andy 2018-04-18 11:50:45 UTC
(In reply to Benjamin Xiao from comment #7)
> I am getting the same issue with my Sony WH-1000XM2 headset. When I turn it
> on, it will connect but fail to switch to A2DP. However, if I disconnect the
> device using the Gnome Bluetooth settings and then reconnect, A2DP starts
> working again. I have to do this every time I power on the device and it
> gets really annoying.

I managed to get my WH-1000XM2 working. I was having the same problem as you described. I hope that this works for other people too. 

This is what I did.

1. get root privileges

2.
echo -e "autospawn = no\ndaemon-binary = /bin/true" \ >/var/lib/gdm/.config/pulse/client.conf

chown gdm:gdm /var/lib/gdm/.config/pulse/client.conf

3. reboot

I tried to re-pair the device and it selected A2DP per default. :)

Comment 9 andy 2018-04-19 06:17:12 UTC
(In reply to andy from comment #8)
> (In reply to Benjamin Xiao from comment #7)
> > I am getting the same issue with my Sony WH-1000XM2 headset. When I turn it
> > on, it will connect but fail to switch to A2DP. However, if I disconnect the
> > device using the Gnome Bluetooth settings and then reconnect, A2DP starts
> > working again. I have to do this every time I power on the device and it
> > gets really annoying.
> 
> I managed to get my WH-1000XM2 working. I was having the same problem as you
> described. I hope that this works for other people too. 
> 
> This is what I did.
> 
> 1. get root privileges
> 
> 2.
> echo -e "autospawn = no\ndaemon-binary = /bin/true" \
> >/var/lib/gdm/.config/pulse/client.conf
> 
> chown gdm:gdm /var/lib/gdm/.config/pulse/client.conf
> 
> 3. reboot
> 
> I tried to re-pair the device and it selected A2DP per default. :)

:(. Problem reoccurred after resume from sleep.

Comment 10 Benjamin Xiao 2018-05-04 09:48:29 UTC
(In reply to andy from comment #8)
> (In reply to Benjamin Xiao from comment #7)
> > I am getting the same issue with my Sony WH-1000XM2 headset. When I turn it
> > on, it will connect but fail to switch to A2DP. However, if I disconnect the
> > device using the Gnome Bluetooth settings and then reconnect, A2DP starts
> > working again. I have to do this every time I power on the device and it
> > gets really annoying.
> 
> I managed to get my WH-1000XM2 working. I was having the same problem as you
> described. I hope that this works for other people too. 
> 
> This is what I did.
> 
> 1. get root privileges
> 
> 2.
> echo -e "autospawn = no\ndaemon-binary = /bin/true" \
> >/var/lib/gdm/.config/pulse/client.conf
> 
> chown gdm:gdm /var/lib/gdm/.config/pulse/client.conf
> 
> 3. reboot
> 
> I tried to re-pair the device and it selected A2DP per default. :)

I've switched to using KDE now. Is there a way to do this in KDE?

Also, this bug is still present in Fedora 28. Can someone update the bug?

Comment 11 Christof Damian 2018-06-21 16:57:36 UTC
This is still present Fedora 28, workarounds didn't work for me.

Comment 12 andy 2018-09-10 15:31:39 UTC
Bug is still present here too. Using Sony WH-1000XM2. 

When I try to change from HSP to A2DP in sound settings I receive:
W: [pulseaudio] module-bluez5-device.c: Refused to switch profile to a2dp_sink: Not connected

To get A2DP working I have to do the following:
1. Connect headphones.
2. Restart bluetooth (systemctl restart bluetooth).
3. Connect headphones again and A2DP is set as default.

Comment 13 andy 2018-11-27 06:24:18 UTC
This problem seem to have disappeared for me in F29 (4.19.3-300.fc29.x86_64).
A2DP has been selected as default source and stereo is working as intended.

No workarounds are needed for me.

Comment 14 Ben Cotton 2019-05-02 19:41:51 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.


Note You need to log in before you can comment on or make changes to this bug.