Linux Audio Configuration - ryzendew/Linux-Tips-and-Tricks GitHub Wiki
Linux Audio Configuration Guide
Complete beginner-friendly guide to audio configuration on Linux, covering Arch Linux, CachyOS, and other distributions including PulseAudio, PipeWire, ALSA, device management, and troubleshooting.
Table of Contents
- Understanding Linux Audio
- PulseAudio Configuration
- PipeWire Configuration
- ALSA Configuration
- Audio Device Management
- Bluetooth Audio
- Microphone Configuration
- Troubleshooting
Understanding Linux Audio
Linux Audio Stack
Linux audio uses multiple layers:
- ALSA (Advanced Linux Sound Architecture)
- Low-level audio driver
- Direct communication with sound hardware
- Kernel level (closest to hardware)
- PulseAudio or PipeWire
- Sound server (audio manager)
- Manages audio streams, mixing, routing
- User level (application interface)
- Applications
- Programs you use (browser, music player, etc.)
- Produces audio
- Application level
How it works:
Application → PulseAudio/PipeWire → ALSA → Hardware
PulseAudio vs PipeWire
PulseAudio:
- Traditional sound server
- Mature, stable, widely used
- Audio mixing, routing, network audio
- Default on most Linux distributions
PipeWire:
- Modern replacement for PulseAudio
- Better low latency, video support, screen sharing
- Default on some newer distributions
Which to use:
- PulseAudio: Stable, works everywhere, good for most users
- PipeWire: Better for low latency, modern features, future-proof
PulseAudio Configuration
Install PulseAudio
Arch Linux / CachyOS:
# Install PulseAudio
sudo pacman -S pulseaudio pulseaudio-alsa pavucontrol
# For Bluetooth
sudo pacman -S pulseaudio-bluetooth
Debian/Ubuntu:
sudo apt install pulseaudio pavucontrol
Fedora:
sudo dnf install pulseaudio pavucontrol
Enable PulseAudio
Start PulseAudio:
# Enable user service
systemctl --user enable pulseaudio
systemctl --user start pulseaudio
# Check status
systemctl --user status pulseaudio
PulseAudio Control
GUI control:
# Open PulseAudio Volume Control
pavucontrol
PipeWire Configuration
Install PipeWire
Arch Linux / CachyOS:
# Install PipeWire
sudo pacman -S pipewire pipewire-pulse pipewire-alsa
# For JACK
sudo pacman -S pipewire-jack
Debian/Ubuntu:
sudo apt install pipewire pipewire-pulse
Fedora:
sudo dnf install pipewire pipewire-pulseaudio
Enable PipeWire
Start PipeWire:
# Enable services
systemctl --user enable pipewire pipewire-pulse
systemctl --user start pipewire pipewire-pulse
# Check status
systemctl --user status pipewire
ALSA Configuration
ALSA Basics
ALSA is the low-level audio driver.
Check ALSA:
# List sound cards
aplay -l
# Check ALSA mixer
alsamixer
ALSA Configuration
Edit config:
# Edit ALSA config
sudo vim /etc/asound.conf
Audio Device Management
List Audio Devices
Check devices:
# PulseAudio
pactl list sinks short
pactl list sources short
# PipeWire
pactl list sinks short
pactl list sources short
Set Default Device
Set default:
# Set default sink
pactl set-default-sink sink-name
# Set default source
pactl set-default-source source-name
Bluetooth Audio
Setup Bluetooth Audio
PulseAudio:
# Install Bluetooth support
sudo pacman -S pulseaudio-bluetooth
# Restart PulseAudio
pulseaudio -k && pulseaudio --start
PipeWire:
# PipeWire includes Bluetooth support
# No additional package needed
Microphone Configuration
Test Microphone
Record test:
# Install tools
sudo pacman -S alsa-utils
# Record
arecord -d 5 test.wav
# Playback
aplay test.wav
Configure Microphone
Set default:
# Set default source
pactl set-default-source source-name
# Increase volume
pactl set-source-volume source-name 100%
Troubleshooting
No Sound
Check audio:
# Check if muted
pactl list sinks | grep -i mute
# Unmute
pactl set-sink-mute sink-name false
# Increase volume
pactl set-sink-volume sink-name 100%
Audio Not Working
Check services:
# Check PulseAudio
systemctl --user status pulseaudio
# Check PipeWire
systemctl --user status pipewire
# Restart
systemctl --user restart pulseaudio
Permission Issues
Fix permissions:
# Add to audio group
sudo usermod -aG audio username
# Log out and back in
Summary
This guide covered audio configuration for Arch Linux, CachyOS, and other distributions, including PulseAudio, PipeWire, ALSA, and troubleshooting.
Next Steps
- Bluetooth Configuration - Bluetooth setup
- Hardware Detection - Hardware setup
- ArchWiki PulseAudio: https://wiki.archlinux.org/title/PulseAudio
- ArchWiki PipeWire: https://wiki.archlinux.org/title/PipeWire
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.