#993011 pulseaudio-module-bluetooth: no longer detects bluetooth headphones

Package:
pulseaudio-module-bluetooth
Source:
pulseaudio
Description:
Bluetooth module for PulseAudio sound server
Submitter:
Vincent Lefevre
Date:
2021-11-05 04:12:02 UTC
Severity:
minor
Tags:
#993011#5
Date:
2021-08-26 10:08:03 UTC
From:
To:
After the upgrade to 15.0+dfsg1-2, pulseaudio no longer detects
my bluetooth headphones when I switch them on.

#993011#10
Date:
2021-08-26 10:25:04 UTC
From:
To:
Reverting to the stable version (14.2-2) allows them to be detected
again.

#993011#15
Date:
2021-08-26 13:07:55 UTC
From:
To:
Control: tags -1 moreinfo

Could you attach verbose logs of both a succesful and an unsuccesful run?

https://fedoraproject.org/wiki/How_to_debug_PulseAudio_problems

#993011#22
Date:
2021-08-26 15:37:46 UTC
From:
To:
  * pa14.out: "pulseaudio -vvvvv" output with PulseAudio 14 (working).
  * pa15.out: "pulseaudio -vvvvv" output with PulseAudio 15 (failing).
  * pacmd-14: "pacmd ls" output with PulseAudio 14.
  * pacmd-15: "pacmd ls" output with PulseAudio 15.

I did the following (with output filenames for PulseAudio 14):
  1. systemctl --user stop pulseaudio.socket
  2. systemctl --user stop pulseaudio.service
  3. pulseaudio -vvvvv >& pa14.out
  4. Switch on my bluetooth headphones.
  5. pacmd ls > pacmd-14
  6. Ctrl-C on "pulseaudio -vvvvv".

Please tell me whether this is sufficient or you need more information.

#993011#27
Date:
2021-09-10 06:12:48 UTC
From:
To:
If your headphones support both HSP (Headset) and HFP (Handsfree)
profiles, pulseaudio will now prefer HFP by default.
This usually works fine unless bluez does not want to connect
headphones with HFP profile for some reason.
Please attach 'bluetoothctl info' for your headset, and try unpairing
and pairing them again while pulseaudio 15.0 is running.

If pairing again does not help, there are two known workarounds:
1. Try disconnecting the headphones, then connecting them again from
the host side (e.g. using bluetoothctl or desktop applet)
   Seldom the connection attempt from headphones side could fail, this
looks like a problem with how bluez handles that.
2. Try disabling pulseaudio 15.0 HFP preference: change default.pa
module-bluetooth-discover line like this:
   load-module module-bluetooth-discover enable_native_hfp_hf=false

If that still does not work please file an issue on pulseaudio tracker
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/

#993011#32
Date:
2021-09-10 09:37:10 UTC
From:
To:
I could eventually solve the problem, which was apparently caused by
some other Bluetooth audio device. Some details below...
Device 7C:96:D2:4E:98:41 EDIFIER Luna Eclipse HD
Device 38:18:4C:4B:AC:93 WH-1000XM3

zira:~> bluetoothctl info 7C:96:D2:4E:98:41
Device 7C:96:D2:4E:98:41 (public)
        Name: EDIFIER Luna Eclipse HD
        Alias: EDIFIER Luna Eclipse HD
        Class: 0x00240428
        Icon: audio-card
        Paired: yes
        Trusted: no
        Blocked: no
        Connected: yes
        LegacyPairing: no
        UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)

zira:~> bluetoothctl info 38:18:4C:4B:AC:93
Device 38:18:4C:4B:AC:93 (public)
        Name: WH-1000XM3
        Alias: WH-1000XM3
        Class: 0x00240404
        Icon: audio-card
        Paired: yes
        Trusted: yes
        Blocked: no
        Connected: yes
        LegacyPairing: no
        UUID: Vendor specific           (00000000-deca-fade-deca-deafdecacaff)
        UUID: Headset                   (00001108-0000-1000-8000-00805f9b34fb)
        UUID: Audio Sink                (0000110b-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
        UUID: Handsfree                 (0000111e-0000-1000-8000-00805f9b34fb)
        UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
        UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
        UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
        UUID: Amazon.com Services, Inc. (0000fe03-0000-1000-8000-00805f9b34fb)
[Vendor specific UUIDs]
        Modalias: usb:v054Cp0CD3d0452

What I did first is to upgrade again to pulseaudio 15.0+dfsg1-2, then
reboot. With my settings, I automatically connect to 7C:96:D2:4E:98:41
after logging in. As before, I could then connect to the headset with

  bluetoothctl connect 38:18:4C:4B:AC:93

which succeeded, but the headset wasn't recognized by PulseAudio 15.
I had to disconnect from both devices with 2 "bluetoothctl disconnect"
commands, then connect to the headset *alone* so that it could get
recognized by PulseAudio 15.

Now everything is OK, even after reboot with my usual settings.
I suppose that there was old or incomplete information for the
headphones. I wonder whether PulseAudio could have done something
to avoid this issue, or whether this is worth an announce (if this
is a known issue that may affect other users).

Note: With PulseAudio 15, I can now have both devices with the
A2DP Sink profile (this was not possible with PulseAudio 14, as
I could still check before upgrading again to PulseAudio 15).

#993011#37
Date:
2021-09-10 09:43:11 UTC
From:
To:
This looks very much like an issue with bluez side caching of available
device profiles, this was being worked on in subsequent bluez releases.

#993011#42
Date:
2021-09-21 06:57:48 UTC
From:
To:
In my system, the workaround described by Igor Kovalenko is efficient.
#993011#47
Date:
2021-10-11 15:35:04 UTC
From:
To:
Hello,

On Thu, 26 Aug 2021 12:08:03 +0200 Vincent Lefevre <vincent@vinc17.net>  wrote:

 >
 > After the upgrade to 15.0+dfsg1-2, pulseaudio no longer detects
 > my bluetooth headphones when I switch them on.

As apparently there is a workaround and/or the problem is coming from
bluez, do you think we should keep this bug RC and prevent the migration
to unstable?

Kind regards,

Laurent Bigonville

#993011#52
Date:
2021-10-11 17:29:21 UTC
From:
To:
Control: severity -1 minor

This was apparently coming from the bluez cache. I haven't seen any
issue after the workaround. Lowering the severity to minor. I'm not
sure whether there's something to be done on the pulseaudio side,
except that if some other users are also affected, something should
be said in the NEWS.Debian file.

#993011#59
Date:
2021-11-05 04:09:31 UTC
From:
To:
Hello,

Igor Kovalenko solution work for me only if
libspa-0.2-bluetooth
package is installed.

The solution is described in
https://wiki.debian.org/PipeWire#Bluetooth

1) Only pulseaudio-module-bluetooth is installed; it is impossible to pair.
2) Both pulseaudio-module-bluetooth and libspa-0.2-bluetooth are installed;
pairing is flaky but not impossible. (Few failed attempts before success.)
3) Only libspa-0.2-bluetooth is installed, pairing is reliable. (It failed
the first time after pulseaudio-module-bluetooth was removed.)

Failure always end in
src/service.c:btd_service_connect() a2dp-sink profile connect failed for
XX:XX:XX:XX:XX:XX: Protocol not available
message.

Best regards,

Sincerely,

Viktor Malyarchuk