Headless Bluetooth PulseAudio Sink


We are trying to get a bluetooth speaker working with the TX2 running headless. I’ve done the “Bluetooth Device Settings” section in the L4T docs and we can pair/connect to the speaker without issue. However PulseAudio doesn’t create a bluetooth sound card unless we log into Unity on a monitor and I can’t seem to find it anywhere.

Is it possible to use bluetooth without starting up Unity? Almost everything I’ve found online seems to assume you can use the GUI.

Hi, Atrer

Before login to the UI session, could you check if the pulseaudio thread is runing?

nvidia@N:~$ ps -aux | grep pulseaudio
nvidia    6910  0.1  0.0 1023236 13028 ?       Sl   10:18   0:00 /usr/bin/pulseaudio --start --log-target=syslog

If not Pls have a try:

systemctl --user enable pulseaudio && systemctl --user start pulseaudio


$ ps -aux | grep pulseaudio
lightdm   2092  0.3  0.1 373252 10340 ?        Sl   10:14   0:00 /usr/bin/pulseaudio --start --log-target=syslog

pactl list works also, I can see two cards

  1. tegra-hda
  2. tegra-snd-t186ref-mobile-rt565x

and I can see the bluetooth modules

$ pactl list modules | grep bluetooth
Name: module-bluetooth-policy
	module.description = "Policy module to make using bluetooth devices out-of-the-box easier"
Name: module-bluetooth-discover

Got it working by using Xvfb to start a headless X11 server:

sudo Xvfb :1 -screen 0 1024x768x24 </dev/null &
export DISPLAY=":1"

Then pactl finds the bluetooth sink:

$ pactl list short sinks
0       alsa_output.platform-3510000.hda.hdmi-stereo-extra1     module-alsa-card.c      s16le 2ch 44100Hz       SUSPENDED
1       alsa_output.platform-sound.analog-stereo        module-alsa-card.c      s16le 2ch 44100Hz       SUSPENDED
2       bluez_sink.C0_28_8D_65_2D_A4    module-bluez5-device.c  s16le 2ch 44100Hz       IDLE