How to make pulseaudio work again?
Solution 1:
For those who come here at this time or later, especially if you have never messed with the system wide default in /etc/pulse/default.pa
, do note that if you have a ~/.config/pulse/default.pa
it completely replaces the system wide default.
In other words: If you get the error message
[pulseaudio] main.c: Daemon startup without any loaded modules, refusing to work.
check if you intentionally or accidentally have a file at .config/pulse/default.pa
If yes, try to move it to a backup location, and then restart pulseaudio. For example with opening a terminal, then typing
mv .config/pulse/default.pa ~/default.pa.bak
pulseaudio -vvvvv
If you now see lots of lines scroll by, more specifically statements of modules loaded, then you know that you have solved the original issue.
Because this is hard to track down, especially if you are forgetful (like me), or because you got convinced by one of the many web pages dealing with pulseaudio issues that you should have a default.pa
in the first place, there's already a launchpad bug filed against the behaviour that a user specific default.pa
replaces the system wide default.pa
. Thanks to Jim Carter for pointing me in the right direction.
Now, if you also must fix the issue that pulseaudio at startup always directs sound to the wrong device, then you can configure your ~/.config/pulse/default.pa
to hardcode the default output device with statements such as
set-card-profile 0 output:analog-stereo
set-default-sink 1
This is what I used to have in my config file, in order to prevent the computer from trying to output sound through HDMI connections. However in order for this to work, you would still have to add all the content of the /etc/pulse/default.pa
file before those statements. Since that is error prone - consider what happens when the next apt-get dist-upgrade
changes the system wide defaults - you can source the default config before your own statements.
My full user specific pulseaudio config file thus is
.include /etc/pulse/default.pa
set-card-profile 0 output:analog-stereo
set-default-sink 1
Btw, the full list of commands usable in these config files can be listed in a terminal by typing
man pulse-cli-syntax
Solution 2:
Here's my default.pa file. Try putting it in the original folder, making sure it has the right permissions.
Next time backup important files before you modify or delete them, but I guess you learned that lesson already.