Ubuntu – Pulseaudio not starting

pulseaudiosound

Well here's an embarrassing problem. PulseAudio doesn't seem to be working. I've been trying to load the sound applet for a week or so and I checked ps aux | grep pulse and found that there's no PA daemon running!

Sound is still working. I assume everything has fallen back to ALSA.

Furthermore I've tried to start PA from the command line. pulseaudio -D just errors out with nothing useful, just E: main.c: Daemon startup failed.

pulseaudio on its own raises a little more:

$ pulseaudio
E: main.c: Unknown command: !/usr/bin/pulseaudio -nF
E: main.c: Failed to initialise daemon.

I can start it as root with --system but nothing can connect to it. That's not the right way to run PA, so I'd rather fix it than bodge around it.

Best Answer

Well that was the weirdest thing. I opened up /etc/pulse/default.pa and noticed that the first line was:

!/usr/bin/pulseaudio -nF

That looks an awful lot like a #!/bin/bash style opening (I don't know the proper name for it, comments on a postcard) so I stuck a hash at the beginning like so:

#!/usr/bin/pulseaudio -nF

And it works!

No idea how that got broken. I don't think I've ever purposefully edited that file before.

Related Question