Hi, On Thu, Oct 10, 2019 at 11:13 PM yayfortrees wrote: > > Hello, > > I've attached debug logs for 5.50 nopatch and 5.50 with the patch. > > To me it looked like it may be a timing issue - trying to connect the > a2dp sink too early. As an experiment I put a sleep(1) at the top of > the hs_cb function from your patch and the a2dp sink was connected. > With the sleep I still get the "Device or resource busy" error early > on, but it does reconnect the a2dp sink later in the connection and > things work. It's not consistent though, maybe 1 of 5 attempts would > fail to connect the a2dp profile. Try with the following patch. > I included that debug log as well. > > Hope this helps, thanks! > > On Thu, Oct 10, 2019 at 2:10 AM Luiz Augusto von Dentz > wrote: > > > > Hi, > > > > On Wed, Oct 9, 2019 at 10:51 AM Luiz Augusto von Dentz > > wrote: > > > > > > Hi, > > > > > > On Wed, Oct 9, 2019 at 1:56 AM yayfortrees wrote: > > > > > > > > Hello, > > > > > > > > I've attached btmon traces for 5.50 and 5.51. Thanks for taking a look! > > > > > > > > Let me know if you need anything else. > > > > > > Must likely the following error has something to do with it: > > > > > > = bluetoothd: a2dp-sink profile connect failed for 34:DF:2A:0D:F8:C2: > > > Device or resource busy > > > > > > I will check why this could be happening. > > > > I tried this one and couldn't reproduce with the headsets I have, > > could you please run bluetooth -dn and attach the logs here? > > > > > > On Tue, Oct 8, 2019 at 4:24 AM Luiz Augusto von Dentz > > > > wrote: > > > > > > > > > > Hi, > > > > > > > > > > On Mon, Oct 7, 2019 at 10:34 PM yayfortrees wrote: > > > > > > > > > > > > Hello, > > > > > > > > > > > > I recently upgraded bluez to 5.51 from 5.50 and my headphones stopped > > > > > > using the A2DP sink during autoconnect. The headphones instead go to > > > > > > HSP/HFP mode and the A2DP sink is disabled in pavucontrol/pactl. The > > > > > > A2DP sink will only work when the device is initially paired. > > > > > > > > > > > > This had worked flawlessly for years. I was able to track down the > > > > > > regression to this patch: > > > > > > https://www.spinics.net/lists/linux-bluetooth/msg76180.html ([PATCH > > > > > > BlueZ] policy: Add logic to connect a Sink). If I apply the patch to > > > > > > 5.50, my headphones no longer connect to the A2DP sink, if I remove it > > > > > > the problem goes away. > > > > > > > > > > > > Not sure what else I should include to help track this down. The > > > > > > headphones I'm using are Beats Wireless (Solo Bluetooth). > > > > > > > > > > > > The only relevant log entry I see with the patch applied is: > > > > > > a2dp-sink profile connect failed for 34:DF:2A:0D:F8:C2: Device or resource busy > > > > > > > > > > Can you collect the HCI traces of the problem using btmon? I didn't > > > > > expect that to cause any problems, it should in theory solve them but > > > > > lets see. > > > > > > > > > > > Let me know if any other information is needed. > > > > > > Thanks. > > > > > > > > > > > > > > > > > > > > -- > > > > > Luiz Augusto von Dentz > > > > > > > > > > > > -- > > > Luiz Augusto von Dentz > > > > > > > > -- > > Luiz Augusto von Dentz -- Luiz Augusto von Dentz