Sound Configuration

Here are some notes about how I setup sound on my desktop systems.

MPD and PulseAudio

MPD (Music Player Daemon) is a system daemon which plays music from files, playlists… It needs to interact with PulseAudio to get the sound out (using ALSA) to enable multiplexing several audio output streams (like the ones which are played by the Desktop Environment to signal important events to the user).

As it is discouraged to run PulseAudio as a system daemon, I use the standard setup which spawns one PulseAudio server per logged user. However to allow multiplexing MPD needs to use the same server as my user. Hence on my system MPD is running with my user ID.

ArchLinux’ MPD wiki article give some tips to set up such configuration. First, configure these two files:


.include /usr/lib/systemd/system/mpd.service

Description=Music Player Daemon (running as MYUSER)



music_directory "/home/public/music"
playlist_directory "/var/lib/mpd/playlists"
db_file "/var/lib/mpd/mpd.db"
pid_file "/var/lib/mpd/"
state_file "/var/lib/mpd/mpdstate"

user "MYUSER"
audio_output {
    type            "pulse"
    name            "MPD Pulse Output"

Then disable the system-wide MPD service and enable the new one:

systemctl disable mpd
systemctl stop mpd
systemctl start mpd-MYUSER
systemctl enable mpd-MYUSER

Documentation: (This wiki also describe the setup with a local TCP socket)


Streaming audio stream over the network is quite easy with PulseAudio. Let’s suppose host wants to send its audio output to a PulseAudio server running on host

First setup the listener ( to accept connections from the sender ( /etc/pulse/

load-module module-native-protocol-tcp auth-ip-acl=;

Or here is the unsecure configuration:

load-module module-native-protocol-tcp listen= auth-anonymous=1

Then configure the sender to send its audio output. /etc/pulse/

load-module module-rtp-send destination= port=16001

To sync the configuration of PulseAudio with X11, there may be needed to run:

pax11publish -e