Arch Linux Audio

How to Use PulseAudio on Arch Linux

PulseAudio is a sound system for POSIX systems. Meaning, it acts as a proxy for all the sounds your system produces. Before reaching the speaker, the sound from any software has to go through PulseAudio.

Because of this mechanism, PulseAudio allows infinite ways of customizing the sound before you can hear them. For example, changing the sound format, increase/decrease sound channels, etc. It’s also possible to send the sound output to a remote computer via network.

Despite it’s designed for Linux systems, PulseAudio is also available for other platforms like Solaris, BSD, MacOS, and Windows, etc. In this article, we’ll see how to enjoy the powerful PulseAudio on Arch Linux.

PulseAudio on Arch Linux

Because of its sheer popularity, PulseAudio is directly available from Arch’s official repository. However, if you need suitable front-end, there are additional packages to be installed. PulseAudio front-ends are available in both CLI and GUI flavor.

Installing PulseAudio

Update the package database of pacman

sudo pacman -Syu

Now, install PulseAudio.

sudo pacman -S pulseaudio

PulseAudio front-ends

For taking the maximum advantage of PulseAudio daemon, there are a number of front-ends that allow advanced functionalities.

CLI

There are a handful of console front-ends for PulseAudio. Check out all the console front-ends for PulseAudio.

For example, let’s install the ncpamixer. It’s available directly from AUR. If you have a suitable AUR helper, then it’s just a matter of a single command.

yay -S ncpamixer

GUI

PulseAudio graphical front-ends offer the easiest way of navigating through the features and perform all the complex tasks. There’re a handful of PulseAudio graphical front-ends for use.

For this tutorial, my personal preference is the PulseAudio Manager. It’s another package that has to be grabbed from AUR. You can either install it manually or use AUR helper like Yay.

yay -S paman

If you’re a KDE Plasma user, then KMix is the best choice. It’s the KDE volume control app that supports PulseAudio.

sudo pacman -S kmix

PulseAudio Volume Control is a simple app with a GTK-based GUI. It’s directly available from Arch’s official repo.

sudo pacman -S pavucontrol

PulseAudio usage

Paman

Search for “PulseAudio Manager”.

The interface is pretty simplistic with very few available options. This tool offers the easiest way to navigate through the audio system and check the status of a different device.

KMix

If you’re on KDE Plasma desktop, then KMix offers quite a simplistic way for manipulating the sound output.

Start KMix.

You’ll notice the tiny speaker icon at the corner.

From this dialog, you can directly control the volume of all the sounds.

PulseAudio Volume Control

This is the best tool for taking advantage of PulseAudio. Start “PulseAudio Volume Control”.

You can check out the playback and control its volume.

At the “Recording” tab, there will be all the apps that are currently recording audio from any source (playback and/or recording hardware).

At the “Output Devices” tab, you’ll notice all the devices that are currently available for outputting the sound to the available speaker. It allows configuring the latency offset and sound volume.

Similarly, “Input Devices” show all the devices that are currently listening to audio and relaying to the system. Note that the playback is always going to be counted as one of the sources for sound input for any listening app.

In the “Configuration” tab, it’s possible to choose which sound profile it’s the best suitable for your current hardware configuration. Without a proper profile, the sound output will be majorly hindered. Some devices may not even get sound signals.

You’ll also notice that in tabs like “Playback”, “Output Devices”, “Input Devices”, there are 3 buttons next to each device(s).

The first option is to mute/unmute the audio. You can individually mute/unmute audio devices.

Next up, “Lock channels together”. This option essentially allows you to control the right-left audio output.

The next icon is for setting a sound source as fallback.

All these functionalities are available on other tabs as well.

PulseAudio command-line usage

PulseAudio is originally a daemon running in the background that’s doing all the work. All these GUI tools are an easier means to communicate and configure PulseAudio behavior. If you’re in need of command-line usage, there are a number of console front-ends available.

Pacmd

This is the default console for communicating with the PulseAudio server.

pacmd

Within the console, type “help” for all the available options.

“info” will provide a comprehensive list of information of all the memory usage, modules, and others.

“list-sources” will list all the available audio sources.

Similarly, “list-cards” will list all the sound card(s).

For all the available options and tutorials, check out the man page of pacmd.

man pacm

Pactl

This is a subset of pacmd and packs only the most frequent commands you need.

pactl help

As you can see, all the commands are directly available from pacmd.

PulseAudio config files

PulseAudio uses a few configuration files for all sorts of purposes. By manipulating the configuration files, you can alter the behavior of sound permanently on your system. There are 2 directories that PulseAudio use for configurations.

  • ~/.config/pulse
  • /etc/pulse

The first one is the configuration for the current user whereas the second one is for system-wide configuration settings. It’s recommended to copy the system-wide file(s) into the user directory and edit it accordingly. However, if the user-defined config files and “/etc/pulse” isn’t in sync, PulseAudio may not even start.

default.pa

“default.pa” is the startup script for PulseAudio.

system.pa

This script is only used when PulseAudio is started in system mode.

daemon.conf

This configuration file is for altering the behavior of the PulseAudio daemon.

client.conf

This one is for configuring PulseAudio clients.

Bonus: restarting PulseAudio

This is a quite handy trick to remember. Sometimes, PulseAudio may behave in unexpected behavior. You can restart the daemon without rebooting the entire system.

Run the following command for killing all the processes related to PulseAudio.

pulseaudio -k

Now, start the daemon again.

pulseaudio -D

Final thoughts

PulseAudio is one of the most powerful tools for taking control of the audio ecosystem. Use PulseAudio to vivify your audio experience to your soul’s extent!

Cheers!

About the author

Sidratul Muntaha

Sidratul Muntaha

Student of CSE. I love Linux and playing with tech and gadgets. I use both Ubuntu and Linux Mint.