-
-
Notifications
You must be signed in to change notification settings - Fork 3
CachyOS Audio Configuration
Complete beginner-friendly guide to audio configuration on CachyOS, including PulseAudio, PipeWire, ALSA, and troubleshooting audio issues.
- Understanding Linux Audio
- PulseAudio Configuration
- PipeWire Configuration
- ALSA Configuration
- Audio Device Management
- Troubleshooting Audio Issues
- Advanced Configuration
Linux audio uses multiple layers:
- ALSA (Advanced Linux Sound Architecture)
- What it is: Low-level audio driver
- What it does: Direct communication with sound hardware
- Level: Kernel level (closest to hardware)
- PulseAudio or PipeWire
- What it is: Sound server (audio manager)
- What it does: Manages audio streams, mixing, routing
- Level: User level (application interface)
- Applications
- What it is: Programs you use (browser, music player, etc.)
- What it does: Produces audio
- Level: Application level
How it works:
Application → PulseAudio/PipeWire → ALSA → Hardware
What each layer does:
- Application: Produces audio (music, video, game sounds)
- PulseAudio/PipeWire: Mixes multiple audio sources, routes to correct device
- ALSA: Sends audio to actual sound hardware
- Hardware: Speakers, headphones, etc.
PulseAudio:
- What it is: Traditional sound server
- Status: Mature, stable, widely used
- Features: Audio mixing, routing, network audio
- Default on: Most Linux distributions
PipeWire:
- What it is: Modern replacement for PulseAudio
- Status: Newer, actively developed
- Features: Better low latency, video support, screen sharing
- Default on: Some newer distributions (including some CachyOS setups)
Which to use:
- PulseAudio: Stable, works everywhere, good for most users
- PipeWire: Better for low latency, modern features, future-proof
CachyOS default:
- May vary by desktop environment
- Can switch between them
- Both work well
PulseAudio is a sound server that manages audio on Linux.
What it does:
- Audio mixing: Combines multiple audio sources
- Device management: Routes audio to correct device
- Volume control: System-wide volume management
- Network audio: Stream audio over network
Why it's needed:
- Multiple applications: Can play audio simultaneously
- Device switching: Easy to switch between speakers/headphones
- Volume control: System-wide volume management
- Better than ALSA alone: Easier to use, more features
Check if installed:
pacman -Q pulseaudioInstall PulseAudio:
sudo pacman -S pulseaudio pulseaudio-alsa pulseaudio-bluetoothWhat these packages do:
-
pulseaudio: Main PulseAudio server -
pulseaudio-alsa: ALSA compatibility layer -
pulseaudio-bluetooth: Bluetooth audio support
Start PulseAudio:
# Start PulseAudio service
pulseaudio --start
# Or enable for user session
systemctl --user enable --now pulseaudio.serviceWhat this does:
- Starts PulseAudio server
- Enables audio system
- Makes audio available to applications
Check if PulseAudio is running:
pulseaudio --check -vWhat this does:
- Checks if PulseAudio is running
-
-v: Verbose output (shows details)
List audio devices:
pactl list short sinksWhat this does:
- Lists available audio output devices
- Shows device names and IDs
- Sinks: Output devices (speakers, headphones)
Example output:
0 alsa_output.pci-0000_00_1f.3.analog-stereo module-alsa-card.c s16le 2ch 48000Hz SUSPENDED
1 alsa_output.usb-0bda_4014-00.analog-stereo module-alsa-card.c s16le 2ch 48000Hz IDLE
What this means:
- 0, 1: Device IDs
- alsa_output...: Device name
- SUSPENDED/IDLE: Device status
List audio sources (microphones):
pactl list short sourcesWhat this does:
- Lists available audio input devices
- Shows microphones and input devices
- Sources: Input devices (microphones, line-in)
Set default output device:
pactl set-default-sink sink-nameWhat this does:
- Sets default audio output
- All audio goes to this device
-
sink-name: Device name frompactl list short sinks
Example:
pactl set-default-sink alsa_output.pci-0000_00_1f.3.analog-stereoSet volume:
pactl set-sink-volume @DEFAULT_SINK@ 50%What this does:
- Sets volume to 50%
-
@DEFAULT_SINK@: Default output device - Can use 0-100% or 0-65536 (0-100%)
Mute/unmute:
# Mute
pactl set-sink-mute @DEFAULT_SINK@ 1
# Unmute
pactl set-sink-mute @DEFAULT_SINK@ 0What this does:
-
1: Mute -
0: Unmute
pavucontrol (PulseAudio Volume Control):
sudo pacman -S pavucontrolWhat this does:
- Installs graphical audio control
- Easy-to-use interface
- Manage all audio settings
Launch:
pavucontrolFeatures:
- Output Devices: Switch between speakers/headphones
- Input Devices: Select microphone
- Playback: Control individual application volumes
- Recording: Control recording sources
- Configuration: Device settings
pavucontrol tabs:
- Playback: Control application volumes
- Recording: Control recording sources
- Output Devices: Select output device
- Input Devices: Select input device
- Configuration: Device settings
Configuration directory:
~/.config/pulse/Main config file:
~/.config/pulse/default.paEdit configuration:
nano ~/.config/pulse/default.paCommon settings:
- Default device
- Sample rate
- Buffer size
- Network audio
After editing:
# Restart PulseAudio
pulseaudio -k
pulseaudio --startWhat this does:
-
-k: Kill PulseAudio -
--start: Start PulseAudio (loads new config)
PipeWire is a modern replacement for PulseAudio and JACK.
What it does:
- Audio management: Like PulseAudio
- Video support: Screen sharing, video capture
- Low latency: Better for professional audio
- JACK compatibility: Works with JACK applications
Advantages:
- Lower latency: Better for real-time audio
- Video support: Screen sharing built-in
- Modern: Actively developed
- Future-proof: Becoming standard
Install PipeWire:
sudo pacman -S pipewire pipewire-pulse pipewire-alsa pipewire-jackWhat these packages do:
-
pipewire: Main PipeWire server -
pipewire-pulse: PulseAudio compatibility -
pipewire-alsa: ALSA compatibility -
pipewire-jack: JACK compatibility
Remove PulseAudio (if switching):
sudo pacman -Rns pulseaudio pulseaudio-alsaStart PipeWire:
# Start PipeWire service
systemctl --user enable --now pipewire.service pipewire-pulse.serviceWhat this does:
- Enables PipeWire for user session
- Starts PipeWire server
- Starts PulseAudio compatibility layer
Restart services:
systemctl --user restart pipewire pipewire-pulsePipeWire uses same commands as PulseAudio:
-
pactl: Works the same -
pavucontrol: Works the same - Applications: Work the same
Check if PipeWire is running:
pactl info | grep "Server Name"Example output:
Server Name: PulseAudio (on PipeWire 0.3.xx)
What this means:
- PipeWire is running
- PulseAudio compatibility is active
- Applications see it as PulseAudio
List devices:
pactl list short sinks
pactl list short sourcesSame commands as PulseAudio - works identically.
Configuration directory:
~/.config/pipewire/Config files:
-
pipewire.conf: Main configuration -
pipewire-pulse.conf: PulseAudio compatibility
Edit configuration:
nano ~/.config/pipewire/pipewire.confCommon settings:
- Sample rate
- Buffer size
- Latency settings
After editing:
systemctl --user restart pipewire pipewire-pulseALSA (Advanced Linux Sound Architecture) is the low-level audio driver.
What it does:
- Hardware communication: Direct access to sound hardware
- Driver layer: Kernel-level audio drivers
- Foundation: PulseAudio/PipeWire use ALSA
When to use ALSA:
- Troubleshooting: Check if hardware works
- Direct access: Some applications use ALSA directly
- Low-level: Advanced audio configuration
Install ALSA tools:
sudo pacman -S alsa-utils alsa-toolsWhat these packages do:
-
alsa-utils: ALSA utilities (alsamixer, aplay, etc.) -
alsa-tools: Advanced ALSA tools
List sound cards:
aplay -lWhat this does:
- Lists ALSA sound devices
- Shows card numbers and names
- Cards: Sound hardware devices
Example output:
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
What this means:
- card 0: First sound card
- PCH: Card name (Intel audio chip)
- device 0: First device on card
- ALC892 Analog: Device name
Test audio:
speaker-test -c 2What this does:
- Tests speakers
-
-c 2: Stereo (2 channels) - Plays test tones
Control volume (alsamixer):
alsamixerWhat this does:
- Opens ALSA mixer (text interface)
- Control volume levels
- Navigate with arrow keys
alsamixer controls:
- Arrow keys: Navigate
- Up/Down: Adjust volume
- M: Mute/unmute
- Esc: Exit
Configuration file:
/etc/asound.confOr user config:
~/.asoundrcEdit configuration:
sudo nano /etc/asound.confCommon settings:
- Default device
- Sample rate
- Channel configuration
List available devices:
pactl list short sinksSet default device:
pactl set-default-sink device-nameUsing pavucontrol:
- Open
pavucontrol - Go to Output Devices tab
- Click device you want
- Click Set as fallback
Install Bluetooth audio support:
# For PulseAudio
sudo pacman -S pulseaudio-bluetooth
# For PipeWire
sudo pacman -S pipewire-pulseConnect Bluetooth device:
bluetoothctlIn bluetoothctl:
power on
scan on
pair [device MAC]
connect [device MAC]
What this does:
-
power on: Turn on Bluetooth -
scan on: Scan for devices -
pair: Pair with device -
connect: Connect to device
After connecting:
- Device should appear in
pactl list short sinks - Set as default if needed
Use multiple devices simultaneously:
- Each application can use different device
- Configure in pavucontrol
- Or use
pactlcommands
Example:
# Set application to specific device
pactl move-sink-input input-id sink-nameWhat this does:
- Moves application audio to specific device
-
input-id: Application audio stream ID -
sink-name: Target device
Check if audio service is running:
# PulseAudio
pulseaudio --check -v
# PipeWire
systemctl --user status pipewireRestart audio service:
# PulseAudio
pulseaudio -k
pulseaudio --start
# PipeWire
systemctl --user restart pipewire pipewire-pulseCheck if device is muted:
pactl list sinks | grep -A 15 "Sink #"Unmute:
pactl set-sink-mute @DEFAULT_SINK@ 0Check volume:
pactl list sinks | grep "Volume:"Set volume:
pactl set-sink-volume @DEFAULT_SINK@ 100%List devices:
pactl list short sinksSet correct device:
pactl set-default-sink device-nameOr use pavucontrol:
- Open
pavucontrol - Go to Output Devices
- Select correct device
- Set as fallback
Increase buffer size:
# Edit PulseAudio config
nano ~/.config/pulse/daemon.confAdd:
default-fragments = 4
default-fragment-size-msec = 25
Restart PulseAudio:
pulseaudio -k
pulseaudio --startFor PipeWire:
# Edit PipeWire config
nano ~/.config/pipewire/pipewire.confAdjust buffer settings:
- Increase buffer size
- Adjust sample rate
List input devices:
pactl list short sourcesSet default input:
pactl set-default-source source-nameCheck if muted:
pactl list sources | grep -A 10 "Source #"Unmute microphone:
pactl set-source-mute @DEFAULT_SOURCE@ 0Test microphone:
# Record test
arecord -d 5 test.wav
# Play back
aplay test.wavApplication not playing audio:
- Check application volume in pavucontrol
- Check if application is muted
- Restart application
Application using wrong device:
- Configure in pavucontrol
- Or use
pactl move-sink-input
PulseAudio network audio:
# Enable network module
pactl load-module module-native-protocol-tcpWhat this does:
- Enables network audio streaming
- Allows audio over network
- Useful for remote audio
PipeWire low latency:
# Edit config
nano ~/.config/pipewire/pipewire.confAdjust settings:
- Reduce buffer size
- Lower latency settings
- Adjust sample rate
Restart:
systemctl --user restart pipewire pipewire-pulseInstall JACK:
sudo pacman -S jack2With PipeWire:
- PipeWire provides JACK compatibility
- Use
pipewire-jackpackage
Start JACK:
jack_control start- CachyOS Post-Installation Guide - System setup
- Arch Linux Wiki - PulseAudio: https://wiki.archlinux.org/title/PulseAudio
- Arch Linux Wiki - PipeWire: https://wiki.archlinux.org/title/PipeWire
- Arch Linux Wiki - ALSA: https://wiki.archlinux.org/title/Advanced_Linux_Sound_Architecture
This guide covered:
- Understanding Linux audio - Audio stack and layers
- PulseAudio - Traditional sound server
- PipeWire - Modern sound server
- ALSA - Low-level audio driver
- Audio device management - Switching devices, Bluetooth
- Troubleshooting - Common audio issues
- Advanced configuration - Network audio, low latency, JACK
Key Takeaways:
- Linux audio uses multiple layers (ALSA → PulseAudio/PipeWire → Applications)
- PulseAudio is traditional, PipeWire is modern
- Use
pactlandpavucontrolto manage audio - Check if service is running if audio doesn't work
- Verify device selection and volume levels
- Both PulseAudio and PipeWire work well on CachyOS
This guide is based on the CachyOS Wiki and Arch Linux Wiki and expanded with detailed explanations for beginners. For the most up-to-date audio configuration information, always refer to the official documentation.