Bluetooth: Headset automatically connects in HSP/HFP mode only

Hi,

after upgrading my system from 15.0 to 15.2, my headset (Sony WF-1000XM3) will only automatically connect in low-quality HSP/HFP mode. It worked fine in 15.0.

If I manually disconnect them, and ask my system to connect to them, then it will connect in A2DP mode. So when the headset connects itself, it will only connect with HSP. When Leap initiates the connection, it’s in A2DP.

When the headset conects itself:


[FONT=monospace]ReverantGR@localhost:~> pacmd list-cards
    index: 6 
        name: <bluez_card.38_18_4C_FF_C1_21> 
        driver: <module-bluez5-device.c> 
        owner module: 38 
        properties: 
                device.description = "WF-1000XM3" 
                device.string = "38:18:4C:FF:C1:21" 
                device.api = "bluez" 
                device.class = "sound" 
                device.bus = "bluetooth" 
                device.form_factor = "headset" 
                bluez.path = "/org/bluez/hci0/dev_38_18_4C_FF_C1_21" 
                bluez.class = "0x240404" 
                bluez.alias = "WF-1000XM3" 
                device.icon_name = "audio-headset-bluetooth" 
                device.intended_roles = "phone" 
        profiles: 
                headset_head_unit: Headset Head Unit (HSP/HFP) (priority 30, available: unknown) 
                a2dp_sink: High Fidelity Playback (A2DP Sink) (priority 40, available: **no**) 
                off: Off (priority 0, available: yes) 
        active profile: <headset_head_unit> 
        sinks: 
                bluez_sink.38_18_4C_FF_C1_21.headset_head_unit/#9: WF-1000XM3 
        sources: 
                bluez_sink.38_18_4C_FF_C1_21.headset_head_unit.monitor/#10: Monitor of WF-1000XM3 
                bluez_source.38_18_4C_FF_C1_21.headset_head_unit/#11: WF-1000XM3 
        ports: 
                headset-output: Headset (priority 0, latency offset 0 usec, available: unknown) 
                        properties: 

                headset-input: Headset (priority 0, latency offset 0 usec, available: unknown) 
                        properties:[/FONT]

[FONT=monospace]

[FONT=monospace]ReverantGR@localhost:~> pacmd set-card-profile 6 a2dp_sink 
Failed to set card profile to 'a2dp_sink'.

When Leap connects to the headset instead:

    index: 7 
        name: <bluez_card.38_18_4C_FF_C1_21> 
        driver: <module-bluez5-device.c> 
        owner module: 39 
        properties: 
                device.description = "WF-1000XM3" 
                device.string = "38:18:4C:FF:C1:21" 
                device.api = "bluez" 
                device.class = "sound" 
                device.bus = "bluetooth" 
                device.form_factor = "headset" 
                bluez.path = "/org/bluez/hci0/dev_38_18_4C_FF_C1_21" 
                bluez.class = "0x240404" 
                bluez.alias = "WF-1000XM3" 
                device.icon_name = "audio-headset-bluetooth" 
                device.intended_roles = "phone" 
        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) 
        active profile: <a2dp_sink> 
        sinks: 
                bluez_sink.38_18_4C_FF_C1_21.a2dp_sink/#10: WF-1000XM3 
        sources: 
                bluez_sink.38_18_4C_FF_C1_21.a2dp_sink.monitor/#12: Monitor of WF-1000XM3 
        ports: 
                headset-output: Headset (priority 0, latency offset 0 usec, available: yes) 
                        properties: 

                headset-input: Headset (priority 0, latency offset 0 usec, available: unknown) 
                        properties:

SO every time, I have to disconnect my headset, and manually reconnect.

Any ideas here?

Thank you!
[/FONT]
[/FONT]

@ReverantGR:

Which Desktop GUI are you using?

KDE 5.71.0

@ReverantGR:

Within the Audio Plasmoid – either right-click the Loudspeaker Icon in the System Tray or, simply click it and choose the setup button near the top on the right hand side – check the setup and the priority of the audio devices.

Thank you for your answer however this has nothing to do with priorities or setup within KDE, it looks more like a Bluez issue where when the headset initiates the connection, the only audio profile it sees as available is “HSP/HSF”. So even in the Audio Plasmoid menu I can’t select A2DP because it’s just not there.

ArchWiki to the rescue – <https://wiki.archlinux.org/index.php/Bluetooth_headset&gt;.

  • But, I suspect that, you’ve already looked there …

When the Headset connects to the KDE Plasma system, “HSP/HFP” is used but, the availability is “unknown”.
When the KDE Plasma system connects to the Headset, “A2DP” is available – the availability of “HSP/HFP” is “unknown” …

Working through the ArchWiki information, “pavucontrol” is installed by default and should be usable – the same goes for “bluetoothctl” and the systemd “bluetooth.service” and “dbus-org.bluez.service”.

  • You may have to use “bluetoothctl” to set “trust 38:18:4C:FF:C1:21” …
  • The Pulse configuration in /etc/pulse/default.pa – “load-module module-switch-on-connect” isn’t mentioned but, ‘/usr/lib64/pulse-13.0/modules/module-switch-on-connect.so’ is installed by the “pulseaudio” RPM package – documentation is here: <Modules – PulseAudio.
  • Forget the ArchWiki information “By default, your Bluetooth adapter will not power on after a reboot.
    ” – with systemd and the Bluetooth service, the adapter is usually powered on but, you may need a KDE login script with “bluetoothctl power on” …

[HR][/HR]Now for some possibly bad news:

  • Leap 15.2 uses “BlueZ” version 5.48.
  • With version 5.54, BlueZ has a fix for A2DP …
  • Tumbleweed has BlueZ version 5.55 and, there ain’t no Leap 15.2 “experimental packages” with BlueZ version 5.54 or 5.55 – yet.

You may have to wait until a BlueZ version 5.55 package is made available for Leap 15.2 …

Looks like this is a well known issue, and someone has made a workaround:

https://github.com/pastleo/fix-bt-a2dp

Essentially, if the headphones start the connection, the script disconnects them and then reconnects. I will give it a try.

Audio over Bluetooth: most detailed information about profiles, codecs, and devicesBluetooth stack modifications to improve audio quality on headphones without AAC, aptX, or LDAC codecs