PulseAudio

PulseAudio is the default sound server that serves as a proxy to sound applications using existing kernel sound components like ALSA or OSS. Since ALSA is included in Arch Linux by default so the most common deployment scenarios include PulseAudio with ALSA.

ALSA

Note: Optional PKGs are needed only if running x86_64 and wanting to have sound for 32 bit programs (like Wine).

For the applications that do not support PulseAudio and support ALSA it is recommended to install the PulseAudio plugin for ALSA. This package also contains the necessary /etc/asound.conf for configuring ALSA to use PulseAudio.

To prevent applications from using ALSA's OSS emulation and bypassing Pulseaudio (thereby preventing other applications from playing sound), make sure the module snd_pcm_oss is not in the MODULES array in /etc/rc.conf. If it is currently loaded (lsmod|grep oss), disable it by executing:

# rmmod snd_pcm_oss

ALSA/dmix without grabbing hardware device

Note: This section describes alternative configuration, which is generally NOT recommended.

You may want to use ALSA directly in most of your applications and to be able to use other applications, which constantly require PulseAudio at the same time. The following steps allow you to make PulseAudio use dmix instead of grabbing ALSA hardware device.

Remove package pulseaudio-alsa, which provides compatibility layer between ALSA applications and PulseAudio. After this your ALSA apps will use ALSA directly without being hooked by Pulse.

GStreamer

To make GStreamer use PulseAudio, you need to install gstreamer0.10-good-plugins, execute gstreamer-properties (part of gnome-media package) and select PulseAudio Sound Server in both Audio Input and Output. Alternatively, this can be done by setting the gconf variables /system/gstreamer/0.10/default/audiosink to pulsesink and /system/gstreamer/0.10/default/audiosrc to pulsesrc:

Some applications (like Rhythmbox) ignore the audiosink property, but rely instead on musicaudiosink, which cannot be configured using gstreamer-properties but needs to be manually set using gconf-editor or the gconftool-2:

If Pulseaudio is not running and users are using X, the following will start PulseAudio with the needed the X11 plugins manually:

$ start-pulseaudio-x11

If you are not running Gnome, KDE or XFCE and your ~/.xinitrc does not source the scripts in /etc/X11/xinit/xinitrc.d (such as is done in the example file /etc/skel/.xinitrc) then you can launch PulseAudio on boot by adding the following line to ~/.xinitrc:

/usr/bin/start-pulseaudio-x11

GNOME

As of GNOME 3, GNOME fully integrates with PulseAudio and no extra configuration is needed.

KDE 3

PulseAudio is not a drop-in replacement for aRts. Users of KDE 3 cannot use PulseAudio. However note, recent versions of PulseAudio may have eliminated the prohibition:

See: http://www.pulseaudio.org/wiki/PerfectSetup KDE 3 uses the artsd sound server by default. However, artsd itself can be configured to use an Esound backend. Edit kcmartsrc (either in /etc/kde or /usr/share/config for global configuration or .kde/share/config to configure only one user) like this:

Java/OpenJDK 6

Music Player Daemon (MPD)

MPlayer

MPlayer natively supports PulseAudio output with the "-ao pulse" option. It can also be configured to default to PulseAudio output, in ~/.mplayer/config for per-user, or /etc/mplayer/mplayer.conf for system-wide:

/etc/mplayer/mplayer.conf

ao=pulse

Skype (x86_64 only)

Install lib32-libpulse, otherwise the following error will occur when trying to initiate a call: "Problem with Audio Playback".

Troubleshooting

No sound after install

Muted audio device

If one experiences no audio output via any means while using ALSA, attempt to unmute the sound card. To do this, launch alsamixer and make sure each column has a green 00 under it (this can be toggled by pressing 'm')

$ alsamixer -c 0

Bad configuration files

If after starting pulseaudio, the system outputs no sound, it may be necessary to delete the contents of ~/.pulse. Pulseaudio will automatically create new configuration files on its next start.

No cards

If PulseAudio starts, run pacmd list. If no cards are reported, make sure that the ALSA devices are not in use:

$ fuser -v /dev/snd/*
$ fuser -v /dev/dsp

Make sure any applications using the pcm or dsp files are shut down before restarting PulseAudio.

The only device shown is "dummy output"

This may be caused by different reasons, one of them being the .asoundrc file in $HOME is taking precedence over the systemwide /etc/asound.conf.

The user file is modified also by the tool asoundconf or by its graphical variant asoundconf-gtk (the latter is named "Default sound card" in the menu) as soon as it runs. Prevent the effects of .asoundrc altogether by commenting the last line like this:

#</home/<yourusername>/.asoundrc.asoundconf>

KDE4

It may be that another output device set as preferred in phonon. Make sure that every setting reflects the preferred output device at the top, and check the playback streams tab in kmix to make sure that applications are using the device for output.

Bluetooth headset replay problems

Some user report huge delays or even no sound when the bluetooth connection does not send any data. This is due to an idle-suspend-module that puts the related sinks/sources automatically into suspend. As this can cause problems with headset, the responsible module can be deactivated.

Automatically switch to Bluetooth or USB headset

Pulse overwrites ALSA settings

Pulseaudio usually overwrites the ALSA settings- for example set with alsamixer- at start up, even when the alsa daemon is loaded. Since there seems to be no other way to restrict this behaviour, a workaround is to restore the alsa settings again after pulseaudio had started. Add the following command to .xinitrc.bash_login or any other autostart file:

Volume adjustment does not work properly

If the volume does not appear to increment/decrement properly using alsamixer or amixer, it may be due to pulseaudio having a larger number of increments (65537 to be exact). Try using larger values when changing volume (e.g. amixer set Master 655+).

Volume gets louder every time a new application is started

Per default, it seems as if changing the volume in an application sets the global system volume to that level instead of only affecting the respective application. Applications setting their volume on startup will therefore cause the system volume to "jump".

Fix this by uncommenting the line

flat-volumes = yes

and changing it to:

flat-volumes = no

in

/etc/pulse/daemon.conf

and then restarting PulseAudio by executing

pulseaudio --kill && pulseaudio --start

When Pulse comes back after a few seconds, applications will not alter the global system volume anymore but have their own volume level again.

Note: A previously installed and removed pulseaudio-equalizer may leave behind remnants of the setup in $HOME/.pulse/default.pa which can also cause maximized volume trouble. Comment that out as needed.

No mic on ThinkPad T400/T500/T420

Run

alsamixer -c 0

Maximize the volume of/unmute the "Internal Mic".

Once you see the device with

arecord -l

you might still need to adjust the settings. The microphone and the audio jack are duplexed. Set the configuration of the internal audio in pavucontrol to Analog Stereo Duplex.

Static Noise in Microphone Recording

If we are getting static noise in skype, gnome-sound-recorder, arecord, etc.'s recordings then the sound card samplerate is incorrect. That is why there is static noise in linux microphone recordings. To fix this We need to set sample-rate in /etc/pulse/daemon.conf for the sound hardware.

Subwoofer stops working after end of every song

To fix this, must edit: /etc/pulse/daemon.conf and enable enable-lfe-remixing :

/etc/pulse/daemon.conf

enable-lfe-remixing = yes

Pulseaudio uses wrong microphone

If Pulseaudio uses the wrong microphone, and changing the Input Device with Pavucontrol did not help, take a look at alsamixer. It seems that Pavucontrol does not always set the input source correctly.
Run:

$ alsamixer

press F6 and choose your sound card, e.g. HDA Intel. Now press F5 to display all items. Try to find the item: Input Source. With the up/down arrow keys you are able to change the input source.
Now try if the correct microphone is used for recording.

Choppy Sound with Analog Surround Sound Setup

The low-frequency effects (LFE) channel is not remixed per default. To enable it the following needs to be set in /etc/pulse/daemon.conf :