If changing volume in specific applications changes also master output volume you can try to diasble flat volumes. Set:

If changing volume in specific applications changes also master output volume you can try to diasble flat volumes. Set:

Revision as of 17:30, 17 August 2013

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.

Running

Warning: If you have per-user copies of configuration files (such as client.conf, daemon.conf or default.pa) in ~/.pulse/, make sure you keep them in sync with changes to the packaged files in /etc/pulse/. Otherwise, PulseAudio may refuse to start due to configuration errors.

Backend Configuration

ALSA

Note: Optional packages 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 being loaded at boot. 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

OpenAL

OpenAL Soft should use PulseAudio by default, but can be explicitly configured to do so:

/etc/openal/alsoft.conf

drivers=pulse,alsa

libao

Edit the libao configuration file:

/etc/libao.conf

default_driver=pulse

Be sure to remove the dev=default option of the alsa driver or adjust it to specify a specific Pulse sink name or number. Alternatively, note that you could keep the libao standard of outputting to the alsa driver and its default device if you install pulseaudio-alsa since the ALSA default device then is PulseAudio.

ESD

PulseAudio is a drop-in replacement for the enlightened sound daemon (ESD). While PulseAudio is running, ESD clients should be able to output to it without configuration.

Desktop environments

General X11

Note: As mentioned previously, PulseAudio is very likely launched automatically via either /etc/X11/xinit/xinitrc.d/pulseaudio or the files in /etc/xdg/autostart/ if users have some DE installed.

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 with:

~/.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:

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 Template:Keypress):

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:

That means timidity blocks pulseaudio from accessing the audio devices. Just killing timidity will make the sound work again.

Another reason is FluidSynth conclicting with pulseaudio as discussed in this thread. The solution is to remove FluidSynth:

# pacman -Rnsc fluidsynth

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.

Failed to create sink input: sink is suspended

If you do not have any output sound and receive dozens of errors related to a suspended sink in your journalctl -b log, then backup first and then delete your user-specific pulse folders:

$ rm -r ~/.pulse ~/.pulse-cookie

No HDMI sound output after some time with the monitor turned off

The monitor is connected via HDMI/DisplayPort, and the audio jack is plugged in the headphone jack of the monitor, but pulseaudio insists that it's unplugged:

This leads to no sound coming from HDMI output. A workaround for this is to switch to another TTY and back again. This problem has been reported by ATI/Nvidia/Intel users.

Can't update configuration of sound device in pavucontrol

pavucontrol is a handy GUI utility for configuring pulseaudio. Under its 'Configuration' tab, you can select different profiles for each of your sound devices e.g. analogue stereo, digital output (IEC958), HDMI 5.1 Surround etc.

However, you may run into an instance where selecting a different profile for a card results in the pulse daemon crashing and auto restarting without the new selection "sticking". If this occurs, use the other useful GUI tool, paprefs, to check under the "Simultaneous Output" tab for a virtual simultaneous device. If this setting is active (checked), it will prevent you changing any card's profile in pavucontrol. Uncheck this setting, then adjust your profile in pavucontrol prior to re-enabling simultaneous output in paprefs.

Simultaneous Output to multiple sound cards / devices

Simultaneous output to two different devices can be very useful. For example, being able to send audio to your A/V receiver via your graphics card's HDMI output, while also sending the same audio through the analogue output of your motherboard's built-in audio. This is much less hassle than it used to be (in this example, we are using GNOME desktop).

Using paprefs, simply select "Add virtual output device for simultaneous output on all local sound cards" from under the "Simultaneous Output" tab. Then, under GNOME's "sound settings", select the simultaneous output you have just created.

If this doesn't work, try adding the following to ~/.asoundrc:

pcm.dsp {
type plug
slave.pcm "dmix"
}

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 or .bash_profile or any other autostart file:

Prevent Pulse from restarting after being killed

Sometimes you may wish to temporarily disable Pulse. In order to do so you will have to prevent Pulse from restarting after being killed.

$ echo autospawn=no > ~/.pulse/client.conf

Daemon startup failed

Try resetting PulseAudio:

$ rm -rf /tmp/pulse* ~/.pulse*
$ pulseaudio -k
$ pulseaudio --start

If there is no server running but pulseaudio fails to start with an error message "User-configured server at ... refusing to start/autospawn", the issue may be with PulseAudio settings from a previous login. Check to see if there are any stale properties attached to the X11 root window with pax11publish -d, and if there are, remove them with pax11publish -r before trying to start the server. This manual cleanup is always required when using LXDM because it does not restart the X server on logout; see LXDM#PulseAudio.

inotify issue

If the previous fix doesn't work, run the following:

$ pulseaudio -vvvv

If you see an error that looks like this:

E: [pulseaudio] module-udev-detect.c: You apparently ran out of inotify watches, probably because Tracker/Beagle took them all away. I wished people would do their homework first and fix inotify before using it for watching whole directory trees which is something the current inotify is certainly not useful for. Please make sure to drop the Tracker/Beagle guys a line complaining about their broken use of inotify.

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.

$ alsamixer

Press Template:Keypress and choose your sound card, e.g. HDA Intel. Now press Template:Keypress 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 :