How to Configure PulseAudio on Arch Linux
Categories:
5 minute read
PulseAudio is a powerful and flexible sound system that sits on top of ALSA (Advanced Linux Sound Architecture). It provides advanced features such as per-application volume controls, audio streaming over the network, and the ability to combine multiple audio sources and sinks. On Arch Linux, configuring PulseAudio can be both rewarding and necessary to ensure smooth sound operations, especially when running lightweight desktop environments or managing custom audio setups.
In this article, we’ll walk through how to install, configure, and manage PulseAudio on Arch Linux.
Why Use PulseAudio?
Although ALSA is sufficient for basic sound playback, PulseAudio introduces a more modern user experience, especially for desktop users. Here are some reasons to use PulseAudio:
- Independent volume control for each application.
- Seamless switching between audio devices.
- Support for Bluetooth audio devices.
- Networked audio streaming.
- Compatibility with modern desktop environments and applications.
Prerequisites
Before diving into configuration, make sure your Arch Linux system is up to date. Run the following command:
sudo pacman -Syu
Also, ensure you have base-devel
and sudo
installed, especially if you’re working in a minimal environment.
Step 1: Install PulseAudio and Dependencies
Start by installing PulseAudio and some common modules:
sudo pacman -S pulseaudio pulseaudio-alsa
For GUI tools and Bluetooth support, you might also want to install:
sudo pacman -S pavucontrol paprefs pulseaudio-bluetooth
Explanation of each package:
pulseaudio
: The main PulseAudio sound server.pulseaudio-alsa
: Ensures compatibility between ALSA and PulseAudio.pavucontrol
: A graphical volume control tool.paprefs
: Allows you to configure PulseAudio’s advanced features.pulseaudio-bluetooth
: Adds Bluetooth audio support (depends onbluez
andbluez-utils
).
Step 2: Enable and Start PulseAudio
PulseAudio runs as a user service, not a system-wide service by default. This design allows better session handling for desktop users.
Check if PulseAudio is running
pulseaudio --check
If you get no output, that usually means it’s running. If not, start it manually:
pulseaudio --start
To make it auto-start with your user session (in case it’s not already doing so):
systemctl --user enable pulseaudio
If you ever need to restart PulseAudio:
pulseaudio -k
pulseaudio --start
Step 3: Configure Audio for ALSA
PulseAudio needs to intercept ALSA output so that programs using ALSA will automatically be routed through PulseAudio.
Create or edit the following file
~/.asoundrc
Or for system-wide settings:
/etc/asound.conf
Add the following:
defaults.pcm.card 0
defaults.ctl.card 0
pcm.!default {
type pulse
fallback "sysdefault"
hint {
show on
description "PulseAudio Sound Server"
}
}
ctl.!default {
type pulse
fallback "sysdefault"
}
This configuration sets PulseAudio as the default device for ALSA-based applications.
Step 4: Using pavucontrol
to Manage Devices and Streams
The command-line is great, but pavucontrol
offers an intuitive way to manage PulseAudio.
Install and run:
pavucontrol
You’ll see several tabs:
- Playback – Manage per-application volume and output device.
- Recording – Manage input streams (microphones, etc.).
- Output Devices – Select and manage output hardware.
- Input Devices – Manage microphones and other input hardware.
- Configuration – Set audio profiles for your devices.
This is especially useful for switching from analog to HDMI output or choosing Bluetooth headsets.
Step 5: Configuring PulseAudio Daemon Settings
If you want to fine-tune PulseAudio’s behavior, you can edit the daemon.conf
file.
Default location
/etc/pulse/daemon.conf
Or user-specific:
~/.config/pulse/daemon.conf
Example configuration:
default-sample-format = s16le
default-sample-rate = 48000
alternate-sample-rate = 44100
exit-idle-time = 0
flat-volumes = no
default-sample-rate
: Change this to match your audio hardware for better performance.exit-idle-time
: Set to0
to keep PulseAudio always running.flat-volumes
: Set tono
for traditional per-application volume behavior.
Restart PulseAudio after making changes:
pulseaudio -k
pulseaudio --start
Step 6: Fixing Common Issues
No Sound or Audio Device Not Detected
Ensure the user is part of the
audio
group:sudo usermod -aG audio $USER
Restart your session or reboot after group changes.
Audio Glitches or Cracking Sounds
Try reducing the latency in daemon.conf
:
default-fragments = 2
default-fragment-size-msec = 10
Conflicts with JACK or PipeWire
If you use JACK or PipeWire, ensure they are not interfering. PipeWire can replace PulseAudio entirely, so you might want to either:
- Stick with PulseAudio (disable PipeWire services), or
- Migrate to PipeWire if you need its features.
To disable PipeWire’s PulseAudio compatibility:
systemctl --user mask pipewire-pulse.service
Step 7: Using PulseAudio Over Network (Optional)
PulseAudio allows network streaming of audio between devices.
On the server (machine that plays audio)
- Edit
/etc/pulse/default.pa
or~/.config/pulse/default.pa
- Add:
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.0.0/24 auth-anonymous=1
This allows machines on your LAN to connect.
- Restart PulseAudio.
On the client (machine sending audio)
export PULSE_SERVER=192.168.0.10
Now your applications will send audio to the remote PulseAudio server.
You can make this persistent by adding the export command to your .bashrc
or .profile
.
Step 8: Auto-Switching Audio Devices
PulseAudio can automatically switch to newly connected devices (like headphones or Bluetooth speakers).
Check if the module is loaded:
pactl list modules | grep module-switch-on-connect
If not, add this to your default.pa
:
load-module module-switch-on-connect
Then restart PulseAudio.
Step 9: PulseAudio with Bluetooth
Make sure you have the necessary packages:
sudo pacman -S bluez bluez-utils pulseaudio-bluetooth
Enable and start the Bluetooth service:
sudo systemctl enable --now bluetooth
Use bluetoothctl
to pair and connect your device:
bluetoothctl
power on
agent on
scan on
pair <MAC_ADDRESS>
connect <MAC_ADDRESS>
trust <MAC_ADDRESS>
exit
Then in pavucontrol
, switch to your Bluetooth headset.
Step 10: Alternative Tools and Enhancements
pasuspender
: Temporarily suspends PulseAudio for direct ALSA access (useful for pro audio apps).pulsemixer
: A TUI-based mixer for PulseAudio.ponymix
: Command-line mixer for scripting.
Example:
ponymix increase 5
ponymix --source increase 5
Conclusion
PulseAudio on Arch Linux offers a robust and configurable sound system suitable for both everyday use and advanced scenarios. Whether you’re looking to stream audio over the network, control application volumes independently, or simply get your Bluetooth headset working smoothly, PulseAudio has you covered.
While it may require some initial configuration—especially on minimalist installations—the payoff is a versatile and modern audio experience. By combining the power of the CLI and GUI tools like pavucontrol
, users gain precise control over their sound environment.
If you’re looking for even more advanced features or want to explore alternatives, consider trying out PipeWire, which aims to unify PulseAudio and JACK features in a single solution. But for now, PulseAudio remains a rock-solid choice for many Linux desktop users.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.