For me, the reason I was getting no sink in pulseaudio was using hcitool
instead of bluetoothctl
to connect the headset. With bluez5
, the latter is preferred, and the former isn't guaranteed to work.
But even having a pavucontrol
-selectable sink did not give me sound. I've certainly heard noise level change between sink sleep and unsuspend transitions, but still no sound ended up actually playing (with unmuted sink at max volume). Also, pulseaudio refused to use the A2DP profile saying module-bluez5-device.c: Profile 'a2dp' not valid or not supported by device
eventhough bluetoothctl <<< "info 00:11:22:33:44:55"
was clearly listing Audio Sink UUID 0000110b-0000-1000-8000-00805f9b34fb
. So PA was using HSP/HFP or whatever, and that means hardcoded 8kHz mono.
In the end, how I got actually working A2DP on Ubuntu 16.04.1 was to compile pulseaudio 9.0
from source. Very predictable build; a short transcript for those who know some compiling:
git clone --branch master git://anongit.freedesktop.org/pulseaudio/pulseaudio \
&& cd pulseaudio
./autogen.sh
./configure \
--enable-bluez5 \
--enable-bluez5-native-headset \
--with-speex \
&& make -sj3
Just find and apt install
those -dev
packages configure
asks for. make
took ~100 seconds to complete.
Then quick in-place test:
echo 'autospawn=no' > ~/.config/pulse/client.conf; killall pulseaudio
src/pulseaudio --daemonize=no --log-level=info -F /etc/pulse/default.pa
At this point I got it working.
$ src/pulseaudio --version
pulseaudio 9.0-129-gf7b8
For final touch, I'd package that up into a .deb
, install systemwide via dpkg -i
and undo the autospawn=no
change.
I'm just experiencing similar audio problems, too.
I guess it is a problem, related to a recent update since it never happened before (1 to 2 weeks on Xubuntu 20.04 LTS) and will be fixed in a coming update. Until then, following command helped me to solve the problem for some hours without restart:
pulseaudio --kill
# the same as:
# pulseaudio -k
It takes 2 to 3 seconds for pulseaudio, which will restart automatically, and often the programs, doing audioo, will work again without further intervention; sometimes I have to restart the affected programs (browser, vlc).
At least I don't have to logout or restart the computer, as YT-Videos often suggest.
I hope this helps and a real update fix will be provided soon.
Best Answer
While these may not be the options you land on, I'd like to offer you two solutions: One from the 90s (maybe late 80s) and the other from the 1870s (yeah, late nineteenth century technology):
You could buy some wireless headphones. You can get fairly good enclosed sets for under £50. If quality isn't too much of an issue, halve that number.
Now we cast back a wee bit further, we hit the granddad of all remote listening: the audio extension cable. These are as cheap as anything and if you have a soldering iron you can buy a stereo spool for almost nothing, add on some pennies for the connectors and wire-up an extended port to your bed.
Both these solutions have next-to-no lag. Obviously the second has less lag but it's a much more hackish solution. I'd just buy some remote headphones and be done with it.
Time (that you might spend looking for the perfect solution) isn't worthless, after all.