Comment 17 for bug 1703415

Revision history for this message
Saroumane (saroumane) wrote :

Hello,
I'm landing here after tracking a bug : I could not output sound to my SRS-XB22 bluetooth speaker.
I had in logs :
`src/service.c:btd_service_connect() a2dp-sink profile connect failed for F8:DF:15:7F:ED:AA: Protocol not available`

I found a workaround here https://askubuntu.com/questions/1172000/a2dp-sink-profile-connect-failed
```
$ pactl load-module module-bluetooth-policy
$ pactl load-module module-bluetooth-discover
```

I did not understand why these commands were mandatory as I already have them in `/etc/pulse/default.pa`

Then I checked my `~/.config/pulse/default.pa` and found this :
```
#!/usr/bin/pulseaudio -nF
#
# Work around for PA not allowing access to A2DP profiles in the user session
# because GDM already has it open.
# LP: #1703415

# load system wide configuration
.include /etc/pulse/default.pa

### unload driver modules for Bluetooth hardware
.ifexists module-bluetooth-policy.so
  unload-module module-bluetooth-policy
.endif

.ifexists module-bluetooth-discover.so
  unload-module module-bluetooth-discover
.endif
```

So here, we are : today, with
- Ubuntu 20.10
- Pulseaudio 1:13.99.2-1ubuntu2.1
- BlueZ 5.55-0ubuntu1.1

=> I do not reproduce the original bug.

=> Moreover, the now unnecessary workaround in `~/.config/pulse/default.pa` is preventing normal use for bluetooth devices.

**Workaround for the workaround** : comment the lines in `~/.config/pulse/default.pa`
```
#!/usr/bin/pulseaudio -nF
#
# Work around for PA not allowing access to A2DP profiles in the user session
# because GDM already has it open.
# LP: #1703415

# load system wide configuration
.include /etc/pulse/default.pa

### unload driver modules for Bluetooth hardware
#.ifexists module-bluetooth-policy.so
# unload-module module-bluetooth-policy
#.endif
#

#.ifexists module-bluetooth-discover.so
# unload-module module-bluetooth-discover
#.endif
```