After upgrade to 21.10 I am experiencing problems with my Bluetooth headphones. When they auto-connect no sound comes from the headphones, only laptop internal speakers. I can disconnect the headphones and reconnect using blueman-applet and then the headphones and sound work correctly.
- turn on headphones and they auto-connect - off profile is turned off and can't be turned on. Error "Failed to change profile to a2dp_sink" appears
- Use blueman-applet to disconnect the headphones
- Manually connect the headphones using blueman (last connections shortcut works too) - audio profile A2DP turns on and everything works.
- Turn off headphones.
- turn on headphones and again they auto-connect and audio profile is off and I have to repeat steps 2 and 3 to get everything working.
I have tried with no sucess:
deleting the pairing and redoing it
purging/reinstalling bluetooth, bluez, pulsaudio, pulseaudio-module-bluetooth
Researching deeper it is very similar to problem reported for debian (https://forums.debian.net/viewtopic.php?t=144014) except my audio profile is turned off, and the proposed solution is to turn off auto-connect which may be a last resort solution
Another similar problem reported for linux mint (https://forums.linuxmint.com/viewtopic.php?t=302364) the proposed solution script "fixed" the problem only for the first turn on of headphones. If I turn them off the problem is back.
Might be related to this question (Can't route sound through bluetooth headset).
Edit:
when auto-connected:
$ pacmd list-sinks | awk '/index/ || /name:/ || /alsa.card_name/ || /device.description/'
* index: 1
name: <alsa_output.pci-0000_00_1f.3.analog-stereo>
alsa.card_name = "HDA Intel PCH"
device.description = "Built-in Audio Analog Stereo"

after disconnect and manual connect
$ pacmd list-sinks | awk '/index/ || /name:/ || /alsa.card_name/ || /device.description/'
index: 1
name: <alsa_output.pci-0000_00_1f.3.analog-stereo>
alsa.card_name = "HDA Intel PCH"
device.description = "Built-in Audio Analog Stereo"
* index: 3
name: <bluez_sink.26_91_1C_CD_41_62.a2dp_sink>
device.description = "FH0916"
Steps before output after turning on laptop, freshly pairing (sound working) -> turn off and on to auto-connect (sound not working) -> manually try change profile (get error) -> disconnect and manual reconnect (sound working) -> turn off and on to auto-connect (sound not working) -> disconnect and manual reconnect (sound working):
$ systemctl --user status pulseaudio
● pulseaudio.service - Sound Service
Loaded: loaded (/usr/lib/systemd/user/pulseaudio.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2021-11-12 23:17:50 EET; 19min ago
TriggeredBy: ● pulseaudio.socket
Main PID: 2355 (pulseaudio)
Tasks: 5 (limit: 18785)
Memory: 7.5M
CPU: 26.905s
CGroup: /user.slice/user-1000.slice/[email protected]/session.slice/pulseaudio.service
└─2355 /usr/bin/pulseaudio --daemonize=no --log-target=journal
nov 12 23:17:50 inga-G5 systemd[2345]: Starting Sound Service...
nov 12 23:17:50 inga-G5 systemd[2345]: Started Sound Service.
nov 12 23:22:19 inga-G5 pulseaudio[2355]: org.freedesktop.DBus.Properties.Get /org/bluez/hci0/dev_26_91_1C_CD_41_62/sep1/fd0 Volume failed:>
nov 12 23:26:25 inga-G5 pulseaudio[2355]: Transport Acquire() failed for transport /org/bluez/hci0/dev_26_91_1C_CD_41_62/sep1/fd1 (Input/ou>
nov 12 23:26:53 inga-G5 pulseaudio[2355]: Refused to switch profile to a2dp_sink: Not connected
nov 12 23:32:13 inga-G5 pulseaudio[2355]: org.freedesktop.DBus.Properties.Get /org/bluez/hci0/dev_26_91_1C_CD_41_62/sep1/fd2 Volume failed:>
nov 12 23:36:08 inga-G5 pulseaudio[2355]: Transport Acquire() failed for transport /org/bluez/hci0/dev_26_91_1C_CD_41_62/sep1/fd3 (Input/ou>
nov 12 23:36:31 inga-G5 pulseaudio[2355]: org.freedesktop.DBus.Properties.Get /org/bluez/hci0/dev_26_91_1C_CD_41_62/sep1/fd4 Volume failed:>
lines 1-19/19 (END)
uname -r
output 5.13.0-21-generic