Troubleshooting
If you would like support on the #pulseaudio freenode irc channel. Start by running the following one-liner as a normal user and posting the generated link to the channel. Follow up with a brief description of your problem.
View from orbit
-mention somewhere that pulseaudio runs "per user" In the common case pulseaudio uses alsa to control the sound card(s) of your computer. Most applications use the alsa interface to playback or capture audio.
application<->default_pcm<->pulseaudio<->alsa<->soundcard
Most distros come with alsa configured similar to the following. This configuration overrides the default pcm so that it routes through pulseaudio. The primary benefit of this approach is, alsa applications that use the default pcm work with pulseaudio without even being aware of pulseaudio's existence.
You can verify that the pcm is present and correct with the following command.
Some applications however use the pulseaudio native interface. Firefox is the most common example.
application<->pulseaudio<->alsa<->soundcard
Baseline test
If pavucontrol shows a blank canvas with some text that starts like this "Connection to PulseAudio failed.", it means that pavucontrol could not connect to your pulseaudio daemon. If pavucontrol shows a a tabbed window click on the playback tab to prepare for the next test.
Now tile pavucontrol and a terminal window on your screen and run the following test.
You should see a playback stream appear on the screen. If you hear "front-left" coming from the left speaker and "front-right" coming from the right speaker you sound stack is all present and correct.
No sound or messed-up sound
Where $messed_up = { choppy, scratchy, torn, glitchy, etc...}
First thing to do is determine if the problem occurs with pure alsa.
You should hear "front-left" coming from the left speaker and "front-right" coming from the right speaker. If the same problem occurs with pure alsa then its probably best to seek further support from the alsa folks.
https://www.alsa-project.org/wiki/Main_Page
Is pulseaudio installed?
Is Pulseaudio running?
Will the pulseaudio service auto-spawn?
Pulse is running but I hear no sound
OK, so we know that pulseaudio is running, but when you play something, you don't hear anything. Let's start with the basics:
- If you have a desktop computer, are your speakers plugged in correctly to the (usually) green socket?
- Do the speakers still work? (try plugging in your mp3 player to test!).
- Do you have multiple sound cards, and have you tried the speakers in all of them to make sure you're using the device you think you are? I know the above may be simple and obvious sounding, but please do check this and don't skip this check as it can (and does) happen to the best of us!
OK, so we know sound is physically capable of coming out of our speakers. Now you should run pavucontrol and check under the "Output Devices" tab to see if your sound hardware is listed there. If pulseaudio cannot open the hardware device on startup (e.g. due to the device being "hogged" by some other application), then it will automatically load a "NULL sink" for you. This appears to your applications like everything is working correctly but will silently discard all the audio data. This is done because many applications do not like it when sound hardware is not present in pulseaudio. If you find that the "Output Devices" tab shows only the automatic NULL sink, you need to debug what other applications are using your sound hardware on startup or find out why pulse cannot open your hardware. Running fuser /dev/snd/* may give some clues as to what applications are hogging things, and failing any information from this, you can run pulseaudio -k; pulseaudio -vvv. The lines beginning with E: specifically may give some clues.
Pulse is running and has loaded my devices
OK, so let's test a few things. First things first, make sure you can hear sound output directly to ASLA. The easiest way to do this is with mplayer. Find some music track (e.g. an MP3 or Ogg file) and run mplayer -ao alsa:device=hw=0 yourchosentrack.mp3. This should play your track and bypass pulseaudio completely. If you still hear nothing then the problem is at the level below pulse.
I don't hear any output from sound applications
Open a terminal and try playing a sound with paplay:
In case you don't see any error message and hear the sound, your applications need to be configured to use PulseAudio. See the relevant section in Perfect Setup.
If you neither get an error message, nor hear the sound, check volume settings. For pulseaudio, use pavucontrol utlity. For ALSA use alsamixer -c 0.
This most likely means that your pulseaudio server is not running.
Sound server is not running
Check that it is enabled to be started up in your desktop environment. See relevant sections of Perfect Setup for [Software/PulseAudio/Documentation/User/PerfectSetup#GNOME GNOME] and [Software/PulseAudio/Documentation/User/PerfectSetup#KDE KDE]. Note that your OS distribution may already take care of this via dedicated packages.
Look into logs for reason why might pulseaudio startup have failed:
Try to launch pulseaudio manually with verbose output enabled: (the output might be valuable to troubleshoot a potential bug)
If your output seems like following, you might not have permissions to access the sound device:
Check the permission with getfacl /dev/snd/*.