I'm using my bluetooth headphones with ubuntu desktop, which has bluetooth dongle. Right now I can connect headphones every time (wasn't so at the start, needed to repair them about every time I wanted to connect). So now it connects, but doesn't output any sound. Sometimes restarting pulse audio helps, sometimes it doesn't, I'm very tired of it and I would like to dig to the root of a problem.
pacmd set-card-profile $(pacmd list-cards | grep -Pzo '(?<=index: )(\d+\n)(?=.*bluez_card)') a2dp_sink;
This gives me Failed to set card profile to 'a2dp_sink'
. Help me to dig further.
#! /usr/bin/env zsh
pacmd set-card-profile $(pacmd list-cards | grep -Pzo '(?<=index: )(\d+\n)(?=.*bluez_card)') off;
echo -e 'disconnect 04:52:C7:0D:9E:13\n quit'|bluetoothctl
sleep 5
echo -e 'connect 04:52:C7:0D:9E:13\n quit'|bluetoothctl
sleep 5
pacmd set-card-profile $(pacmd list-cards | grep -Pzo '(?<=index: )(\d+\n)(?=.*bluez_card)') a2dp_sink;
This isn't helping.