Difference between revisions of "PulseAudio"

From ArchWiki
Jump to: navigation, search
(Flash Content)
(Flashplugin (x86_64 only))
Line 150: Line 150:
[[Audacious]] natively supports PulseAudio. In order to use it, set Audacious Preferences -> Audio -> Current output plugin to 'PulseAudio Output Plugin'.
[[Audacious]] natively supports PulseAudio. In order to use it, set Audacious Preferences -> Audio -> Current output plugin to 'PulseAudio Output Plugin'.
===Flashplugin (x86_64 only)===
Users of [[Browser Plugins#Adobe Flash Player|Adobe Flash Player]] browser plugin from the [[Multilib_Project|multilib repository]] need to install {{Pkg|lib32-alsa-plugins}} and {{Pkg|lib32-libcanberra-pulse}}.
===Java/OpenJDK 6===
===Java/OpenJDK 6===

Revision as of 19:18, 2 June 2012

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.

Local languages: Català – Dansk – English – Español – Esperanto – Hrvatski – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Norsk Bokmål – Polski – Português – Slovenský – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – العربية – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어

External languages (all articles in these languages should be moved to the external wiki): Deutsch – Français – Română – Suomi – Svenska – Tiếng Việt – Türkçe – فارسی

Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary end



Note: PulseAudio wiki recommends that users should not be part of the "audio" group.


Note: Pulseaudio requires dbus to function. This is very likely already added in the daemons array, if not consider adding it.
Note: Most X11 environments start pulseaudio automatically with the X11 session.

In the unlikely event that pulseaudio is not automatically called upon entering X, it can can be started with:

$ pulseaudio --start
Note: if you get the message pulseaudio: error while loading shared libraries: libltdl.so.7: cannot open shared object file: No such file or directory you need to install libltdl

PulseAudio can be stopped with:

$ pulseaudio --kill


Newer pulseaudio versions have an intergrated 10-band equalizer system. In order to use the equalizer do the following:

Load equalizer sink module

$ pactl load-module module-equalizer-sink

Install and run the gui frontend

# pacman -S --needed python2-pyqt
$ qpaeq

Load equalizer module on every boot

Edit the file /etc/pulse/default.pa with your favorite editor and append the following lines:

### Load the integrated pulseaudio equalizer module
load-module module-equalizer-sink

Backend Configuration


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, disable it by executing:

# rmmod snd_pcm_oss


There are multiple ways of making OSS-only programs play to PulseAudio:


Recommended PKG: ossp

Start osspd with:

rc.d start osspd

Afterwards, add it to DAEMONS in rc.conf.

padsp wrapper

Programs using OSS can work with PulseAudio by starting it with padsp:

$ padsp OSSprogram

A few examples:

$ padsp aumix
$ padsp sox foo.wav -t ossdsp /dev/dsp

One can also rename the program OSSprogram-bin and replace it with a script like this:

if test -x /usr/bin/padsp; then
    exec /usr/bin/padsp /usr/bin/OSSprogram-bin "$@"
    exec /usr/bin/OSSprogram "$@"


To make GStreamer use PulseAudio, 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:

 $ gconftool-2 -t string --set /system/gstreamer/0.10/default/audiosink pulsesink
 $ gconftool-2 -t string --set /system/gstreamer/0.10/default/audiosrc 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:

 $ gconftool-2 -t string --set /system/gstreamer/0.10/default/musicaudiosink pulsesink


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


Edit the libao configuration file:



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.

Check to see of PulseAudio is running:

$ ps aux | grep pulse
facade   1794  0.0  0.0 360464  6532 ?        S<l  15:33   0:00 /usr/bin/pulseaudio --start
facade   1827  0.0  0.0  68888  2608 ?        S    15:33   0:00 /usr/lib/pulse/gconf-helper

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

$ start-pulseaudio-x11


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


PulseAudio is not a drop-in replacement for aRts. Users of KDE 3 cannot use PulseAudio. However note, recent versions of puleaudio 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:

Arguments=\s-F 10 -S 4096 -a esd -n -s 1 -m artsmessage -c drkonqi -l 3 -f

KDE 4 and Qt4

PulseAudio, it will be used by KDE4/Qt4 applications. For more information see the KDE page in the PulseAudio wiki.

One useful tidbit from that page is to add load-module module-device-manager to /etc/pulse/default.pa.

Additionally, the kdeplasma-addons-applets-veromixAUR is available in the AUR as a KDE alternative to pavucontrol.


Applications running under XFCE4 can take advantage of Pulseaudio. To manage Pulseaudio settings can use pavucontrol.



Audacious natively supports PulseAudio. In order to use it, set Audacious Preferences -> Audio -> Current output plugin to 'PulseAudio Output Plugin'.

Java/OpenJDK 6

Create a wrapper for the java executable using padsp as seen on the Java sound with Pulseaudio page.

Music Player Daemon (MPD)

configure MPD to use PulseAudio.


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:


Skype (x86_64 only)

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


No sound after install

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.

Flash Content

Since Adobe Flash does not directly support PulseAudio the recommended way is to configure ALSA to use the virtual PulseAudio soundcard.

Alternatively no sound from flash content may be fixed by installing libflashsupport-pulseAUR from the AUR (not recommended as it seems to make the flash plugin crash rather frequently).

lib32-libpulse is another PKG users can consider if on a 64-bit Arch and using [multilib]'s flashplugin:

# pacman -S lib32-libcanberra-pulse lib32-alsa-plugins

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:



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.

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

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.

1. cp /etc/pulse/default.pa ~/.pulse/default.pa
2. comment out the "load-module module-suspend-on-idle" line in ~/.pulse/default.pa
3. pulseaudio -k && pulseaudio --start

More information

Automatically switch to Bluetooth or USB headset

Add the following to your /etc/pulse/default.pa:

# automatically switch to newly-connected devices
load-module module-switch-on-connect

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:

restore_alsa() {
 while [ -z "`pidof pulseaudio`" ]; do
  sleep 0.5
 alsactl -f /var/lib/alsa/asound.state restore 
restore_alsa &

Daemon startup failed

Try resetting PulseAudio. To do that:

$ pulseaudio --kill
$ killall pulseaudio
$ killall -9 pulseaudio
$ rm -rf ~/.pulse*
$ rm -rf /tmp/pulse*

Afterwards, start PulseAudio again.


If one cannot launch the PulseAudio Device Chooser, first (re)start the Avahi daemon as follows:

$ rc.d restart avahi-daemon

Glitches, skips or crackling

The PulseAudio sound server uses a timer-based audio scheduling instead of the traditional interrupt-driven approach. Timer-based scheduling may expose issues in some ALSA drivers. To turn timer-based scheduling off, replace the line:

load-module module-udev-detect 

in /etc/pulse/default.pa by:

load-module module-udev-detect tsched=0

Then restart the PulseAudio server.

Choppy sound

Choppy sound in pulsaudio can result from wrong settings for the sample rate in /etc/pulse/daemon.conf. Try changing the line

; default-sample-rate = 44100


default-sample-rate = 48000

and restart the PulseAudio server.

If one experiences choppy sound in applications using openAL, change the sample rate in /etc/openal/alsoft.conf:

frequency = 48000

Volume adjustment does not work properly

Check: /usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common

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

flat-volumes = no



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


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.

No mic input on Acer Aspire One

Install pavucontrol, unlink the microphone channels and turn down the left one to 0. Reference: http://getsatisfaction.com/jolicloud/topics/deaf_internal_mic_on_acer_aspire_one#reply_2108048

Sound output is only mono on M-Audio Audiophile 2496 sound card

Add the following to /etc/pulseaudio/default.pa:

load-module module-alsa-sink sink_name=delta_out device=hw:M2496 format=s24le channels=10 channel_map=left,right,aux0,aux1,aux2,aux3,aux4,aux5,aux6,aux7
load-module module-alsa-source source_name=delta_in device=hw:M2496 format=s24le channels=12 channel_map=left,right,aux0,aux1,aux2,aux3,aux4,aux5,aux6,aux7,aux8,aux9
set-default-sink delta_out
set-default-source delta_in

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.

1. Determine soundcards in the system

This requires alsa-utils and related packages to be installed:

$  arecord --list-devices


   **** List of CAPTURE Hardware Devices ****
   card 0: Intel [HDA Intel], device 0: ALC888 Analog [ALC888 Analog]
     Subdevices: 1/1
     Subdevice #0: subdevice #0
   card 0: Intel [HDA Intel], device 2: ALC888 Analog [ALC888 Analog]
     Subdevices: 1/1
     Subdevice #0: subdevice #0

soundcard is hw:0,0

2. Determine sampling-rate of the sound card

arecord -f dat -r 60000 -D hw:0,0 -d 5 test.wav


  "Recording WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 60000 Hz, Stereo
  Warning: rate is not accurate (requested = 60000Hz, got = 96000Hz)
  please, try the plug plugin

observe, the got = 96000Hz, this is the max sample-rate of our card.

3. Setting the soundcard's sampling rate into pulse audio configuration

the default sample-rate in pulseaudio is

grep "sample-rate" /etc/pulse/daemon.conf


   ; default-sample-rate = 44100

It is 44100 and is disabled. Let us set our sound card's settings into pulseaudio configuation file

su -c "sed 's/; default-sample-rate = 44100/default-sample-rate = 96000/g' -i /etc/pulse/daemon.conf"

Let us verify the changes to deamon.conf

grep "sample-rate" /etc/pulse/daemon.conf 


  default-sample-rate = 96000

and it is done.

4. Restart pulseaudio to apply the new settings

pulseaudio --kill
pulseaudio --start

5. Finally check by recording and playing it back

Let us record some voice using mic for say 10 seconds. Make sure the mic is not muted and all

arecord -f cd -d 10 test-mic.wav

After 10 seconds, let us play the recording...

aplay test-mic.wav

Now hopefully, there is no static noise in microphone recording anymore.

My Bluetooth device is paired but does not play any sound

See the article in Bluetooth section

Subwoofer stops working after end of every song

Known issue: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/494099

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

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 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.

External links