cathal
(Cathal OConnor)
July 2, 2021, 10:34am
1
Hi, Im using fedora 34 on a Lenovo T590 and pipewire, My Sony Xm4 will pair but wont allow me to pick a A2DP profile so sound quality is poor when listening to just audio but sounds fine when listening from phone.
Is there any settings that I can change to allow A2DP profile?
cathal
(Cathal OConnor)
July 2, 2021, 11:40am
2
Solved my own issue by following the steps here:
opened 01:51PM - 17 Jun 21 UTC
closed 04:36PM - 07 Jul 21 UTC
Seems like we've discovered a new bug related to ServiceRecords/Endpoints discov⦠ery on 5.59. After pairing my headphones for the first time on bluez 5.59, I couldn't get A2DP profile working (it would be marked as unavailable).
After some experimentation I've found out that downgrading to 5.58 works, but only if I remove `/var/lib/bluetooth` folder before pairing the headphones again.
After a little bit of digging, I've narrowed the issue down to the cache file for the headphones. The cache file created by 5.59 seems to have some of the services/endpoints not listed properly. Here's the cache file created by 5.58, where A2DP works fine:
```
ββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β File: bluetooth_working/00:1A:7D:DA:71:13/cache/00:16:94:20:DF:B3
ββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
1 β [General]
2 β Name=PXC 550
3 β
4 β [ServiceRecords]
5 β 0x00010001=35300900000A0001000109000135031918010900043513350619010009001F35091900070900060900060900053503191002
6 β 0x00010002=35300900000A00010002090001350319180F0900043513350619010009001F350919000709000709000A0900053503191002
7 β 0x00010003=353E0900000A0001000309000135111C6333135823C111E5B696FEFF819CDC9F0900043513350619010009001F350919000709000B09FFFF0900053503191002
8 β 0x00010004=35590900000A00010004090001350619111E191203090004350C35031901003505190003080A090006350909656E09006A0901000900093508350619111E090106090100250F48616E64732D4672656
β 520756E697409031109003B
9 β 0x00010005=354A0900000A0001000509000135111C1DDCE62AECB1445581530743C87AEC9F090004350C350319010035051900030801090006350909656E09006A09010009010025084E617574696C7573
10 β 0x00010007=35380900000A00010007090001350319110B0900043510350619010009001935061900190901030900093508350619110D090103090311090001
11 β 0x00010008=353B0900000A00010008090001350619110E19110F0900043510350619010009001735061900170901040900093508350619110E090106090311090001
12 β 0x00010009=35380900000A00010009090001350319110C0900043510350619010009001735061900170901040900093508350619110E090106090311090002
13 β 0x000100A4=35530900000A000100A40900013509191108191131191203090004350C35031901003505190003080D090006350909656E09006A0901000900093508350619110809010209010025074865616473657
β 40903022801
14 β 0x00010000=35410900000A000100000900013503191200090006350909656E09006A0901000902000901030902010900820902020900460902030901060902042801090205090001
15 β 0x000100A6=35530900000A000100A60900013509191108191131191203090004350C35031901003505190003080D090006350909656E09006A0901000900093508350619110809010209010025074865616473657
β 40903022801
16 β 0x000100A7=35530900000A000100A70900013509191108191131191203090004350C35031901003505190003080B090006350909656E09006A0901000900093508350619110809010209010025074865616473657
β 40903022801
17 β
18 β [Endpoints]
19 β 03=01:ff:01:4f0000000100ff
20 β 01=01:00:01:ffff0235
21 β LastUsed=02:01
ββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
```
and here's the same file created on 5.59, where A2DP is reported as unavailable:
```
ββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β File: bluetooth_broken/00:1A:7D:DA:71:13/cache/00:16:94:20:DF:B3
ββββββββΌβββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
1 β [General]
2 β Name=PXC 550
3 β
4 β [ServiceRecords]
5 β 0x00010001=35300900000A0001000109000135031918010900043513350619010009001F35091900070900060900060900053503191002
6 β 0x00010002=35300900000A00010002090001350319180F0900043513350619010009001F350919000709000709000A0900053503191002
7 β 0x00010003=353E0900000A0001000309000135111C6333135823C111E5B696FEFF819CDC9F0900043513350619010009001F350919000709000B09FFFF0900053503191002
8 β 0x00010005=354A0900000A0001000509000135111C1DDCE62AECB1445581530743C87AEC9F090004350C350319010035051900030801090006350909656E09006A09010009010025084E617574696C7573
9 β 0x00010007=35380900000A00010007090001350319110B0900043510350619010009001935061900190901030900093508350619110D090103090311090001
10 β 0x00010008=353B0900000A00010008090001350619110E19110F0900043510350619010009001735061900170901040900093508350619110E090106090311090001
11 β 0x00010009=35380900000A00010009090001350319110C0900043510350619010009001735061900170901040900093508350619110E090106090311090002
12 β 0x000100A9=35590900000A000100A9090001350619111E191203090004350C35031901003505190003080C090006350909656E09006A0901000900093508350619111E090106090100250F48616E64732D4672656
β 520756E697409031109003B
13 β 0x000100AE=35530900000A000100AE0900013509191108191131191203090004350C35031901003505190003080B090006350909656E09006A0901000900093508350619110809010209010025074865616473657
β 40903022801
14 β 0x00010000=35410900000A000100000900013503191200090006350909656E09006A0901000902000901030902010900820902020900460902030901060902042801090205090001
15 β
16 β [Endpoints]
17 β 03=01:00:00:ffff0235
18 β 01=01:00:00:ffff0235
ββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
```
There are differences in both `ServiceRecords` and `Endpoints` sections.
Please not that this bug is visible only on 5.59 if you're pairing the device for the first time, or if you manually remove `/var/lib/bluetooth` folder. If the folder contains the cache file for your device created by one of the older `bluez` (5.58 or older), A2DP profile will work fine, even if you remove and re-pair the device. It only doesn't work if the cache file doesn't exist yet (if 5.59 version creates the file).
You can read more info about how we've discovered the bug here: https://bbs.archlinux.org/viewtopic.php?pid=1978509
1 Like
cathal
(Cathal OConnor)
July 2, 2021, 1:12pm
3
oh maybe I didnt, This reset itself back to HSP only profiles after turning off the headphones and turning back on again.