Bug 491813 - Reconnecting paired headset does not allow to pick "High Fidelity Playback (A2DP Sink)"
Summary: Reconnecting paired headset does not allow to pick "High Fidelity Playback (A...
Status: RESOLVED FIXED
Alias: None
Product: plasma-pa
Classification: Unmaintained
Component: general (other bugs)
Version First Reported In: 6.1.4
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-17 10:01 UTC by David
Modified: 2024-09-22 07:11 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
log output of `journalctl -u bluetooth` (2.90 KB, text/plain)
2024-08-27 06:28 UTC, kilgore.trout
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David 2024-08-17 10:01:36 UTC
SUMMARY
When I connect my headset (Sony WH-1000XM3) it now automatically uses the "Handsfree Head Unit (HFP)" profile and there is no option to pick the "High Fidelity Playback (A2DP Sink)" profile. The only other option is "Off". This was not the case before I updated my laptop (I update everything every ~7 days). Before it always automatically picked the "High Fidelity Playback (A2DP Sink)" profile after connecting my headset. My workaround is forgetting the headset in paired Bluetooth devices, pairing it again, going to "Sound" settings, and switching the profile from "HFP" to "A2DP Sink". But this process is slow and quite irritating.

STEPS TO REPRODUCE
1. Turn on headset
2. Wait for it to auto-connect
3. Go to "Sound" settings
4. Check available profiles

OBSERVED RESULT
1. See and hear that "HFP" was picked
2. Be unable to switch to "A2DP Sink" manually (see "available: no" in "AUDIO INFO AFTER RECONNECTING" below)

EXPECTED RESULT
Use the "A2DP Sink" profile (or the last previously used) after the headset has auto-connected via Bluetooth.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.0
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Kernel: 6.8.0-40-generic (64-bit)
Sony WH-1000XM3 Firmware: 4.5.2 (latest)

ADDITIONAL INFORMATION
Laptop: HP EliteBook 865 G10
Bluetooth: Realtek Semiconductor Co., Ltd. (0bda:c85c)

I also noticed that it now takes ~10 seconds longer to connect whereas before it was almost instantaneous after I turned the headset on. But I'm not sure if this is related somehow.

No configuration was changed. I use my headset daily either for entertainment or for calls, but even then I use a different mic than the one inside my headset. It worked before updates but stopped after updates. Sadly I don't know the exact versions of related packages/libraries/etc.

This happens every time.

I wanted to try an external Bluetooth dongle after I disabled the internal Bluetooth device in UEFI but that has another problem (error br-connection-create-socket right after connecting the headset).

Lastly, I tried my girlfriend's headset (newer Sony WH-1000XM4) and they don't have this problem and work as expected.

AUDIO INFO AFTER PAIRING
Card #3
	Name: bluez_card.XX_XX_XX_XX_XX_XX
	Driver: module-bluez5-device.c
	Owner Module: 25
	Properties:
		device.description = "WH-1000XM3"
		device.string = "XX:XX:XX:XX:XX:XX"
		device.api = "bluez"
		device.class = "sound"
		device.bus = "bluetooth"
		device.form_factor = "headset"
		bluez.path = "/org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX"
		bluez.class = "0x240404"
		bluez.alias = "WH-1000XM3"
		bluetooth.battery = "100%"
		device.icon_name = "audio-headset-bluetooth"
		device.intended_roles = "phone"
		bluetooth.codec = "sbc"
	Profiles:
		a2dp_sink: High Fidelity Playback (A2DP Sink) (sinks: 1, sources: 0, priority: 40, available: yes)
		handsfree_head_unit: Handsfree Head Unit (HFP) (sinks: 1, sources: 1, priority: 30, available: yes)
		off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
	Active Profile: a2dp_sink
	Ports:
		headset-output: Headset (type: Headset, priority: 0, latency offset: 0 usec, availability unknown)
			Part of profile(s): a2dp_sink, handsfree_head_unit
		headset-input: Headset (type: Headset, priority: 0, latency offset: 0 usec, availability unknown)
			Part of profile(s): handsfree_head_unit

AUDIO INFO AFTER RECONNECTING
Card #4
	Name: bluez_card.XX_XX_XX_XX_XX_XX
	Driver: module-bluez5-device.c
	Owner Module: 26
	Properties:
		device.description = "WH-1000XM3"
		device.string = "XX:XX:XX:XX:XX:XX"
		device.api = "bluez"
		device.class = "sound"
		device.bus = "bluetooth"
		device.form_factor = "headset"
		bluez.path = "/org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX"
		bluez.class = "0x240404"
		bluez.alias = "WH-1000XM3"
		bluetooth.battery = "100%"
		device.icon_name = "audio-headset-bluetooth"
		device.intended_roles = "phone"
		bluetooth.codec = "mSBC"
	Profiles:
		a2dp_sink: High Fidelity Playback (A2DP Sink) (sinks: 1, sources: 0, priority: 40, available: no)
		handsfree_head_unit: Handsfree Head Unit (HFP) (sinks: 1, sources: 1, priority: 30, available: yes)
		off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
	Active Profile: handsfree_head_unit
	Ports:
		headset-output: Headset (type: Headset, priority: 0, latency offset: 0 usec, availability unknown)
			Part of profile(s): a2dp_sink, handsfree_head_unit
		headset-input: Headset (type: Headset, priority: 0, latency offset: 0 usec, availability unknown)
			Part of profile(s): handsfree_head_unit
Comment 1 David 2024-08-21 09:58:19 UTC
I just noticed that I can make the workaround a bit faster by instead of simply turning my headphones on, I turn them on with pairing mode even when they are already paired to my laptop. Then in KDE Bluetooth, I can click on "Connect", go to "Sound" and switch the profile to "A2DP Sink" - it will be present this time. So the trick is always to use pairing. The actual connection is also established noticeably faster than when auto-connect is used.
Comment 2 kilgore.trout 2024-08-27 06:28:56 UTC
Created attachment 172993 [details]
log output of `journalctl -u bluetooth`

This problem occurs to me as well with Sony Linkbuds.
The culprit is likely the new wireless card that I have installed (Qualcomm QCNCM865).
I attach here the output of `journalctl -u bluetooth`.
Comment 3 Nate Graham 2024-08-30 16:30:11 UTC
This is a PipeWire/WirePlumber issue, but we may be able to offer a UI to work around it in our code. See Bug 491511.

*** This bug has been marked as a duplicate of bug 491511 ***
Comment 4 David 2024-08-30 17:29:07 UTC
(In reply to Nate Graham from comment #3)
> This is a PipeWire/WirePlumber issue, but we may be able to offer a UI to
> work around it in our code. See Bug 491511.
> 
> *** This bug has been marked as a duplicate of bug 491511 ***

Is it possible that this is not a duplicate? I'm probably wrong, but it sounds like the solution proposed in bug 491511 only helps with selecting the right profile for the user after the connection. The problem I am describing in this bug is the inability to switch between profiles because the good (A2DP sink) profile is completely missing after reconnecting. I tried to create the config file for WirePlumber (in both places), but it did not change anything.
Comment 5 Nate Graham 2024-09-03 18:46:46 UTC
Hmm, seems you're right.
Comment 6 David 2024-09-22 07:11:30 UTC
I updated my system on Wednesday or Thursday (2024-09-18) and yesterday. I just tried to connect my headphones and before I could manually switch to the quality profile I noticed that it is already using it. I tried to reconnect them a few times without the pairing workaround and the same thing happened every time. It now works exactly as it should just like before. It seems that something got fixed for me in between those few days.

Thanks to whoever fixed it.