Audio Troubleshooting
Quick Reference
# Check audio system
pactl info # PulseAudio/PipeWire info
wpctl status # WirePlumber status
aplay -l # ALSA devices
# Volume control
wpctl set-volume @DEFAULT_AUDIO_SINK@ 50%
pactl set-sink-volume @DEFAULT_SINK@ 50%
alsamixer
# Test audio
speaker-test -c 2
aplay /usr/share/sounds/alsa/Front_Center.wav
# Restart audio
systemctl --user restart pipewire pipewire-pulse wireplumber
pulseaudio -k && pulseaudio --start
Audio Stack Overview
Linux Audio Architecture
Applications
↓
PipeWire / PulseAudio (sound server)
↓
ALSA (kernel interface)
↓
Hardware
-
ALSA - Kernel-level sound interface
-
PulseAudio - Legacy sound server (being replaced)
-
PipeWire - Modern replacement for PulseAudio (also handles video)
-
WirePlumber - Session manager for PipeWire
Identify Audio System
# Check if PipeWire is running
systemctl --user status pipewire
pgrep pipewire
# Check if PulseAudio is running
systemctl --user status pulseaudio
pgrep pulseaudio
# PipeWire with PulseAudio compatibility
pactl info | grep "Server Name"
# PipeWire shows: "PulseAudio (on PipeWire...)"
# Pure PulseAudio shows: "pulseaudio"
# Check WirePlumber
wpctl status
PipeWire Troubleshooting
Check PipeWire Status
# Service status
systemctl --user status pipewire
systemctl --user status pipewire-pulse
systemctl --user status wireplumber
# PipeWire info
pw-cli info all
pw-dump # Full state dump
# WirePlumber status
wpctl status
wpctl inspect @DEFAULT_AUDIO_SINK@
# List nodes
pw-cli list-objects
Restart PipeWire
# Restart all PipeWire services
systemctl --user restart pipewire pipewire-pulse wireplumber
# Or kill and restart
killall pipewire pipewire-pulse wireplumber
pipewire &
pipewire-pulse &
wireplumber &
Volume Control (WirePlumber)
# Get current volume
wpctl get-volume @DEFAULT_AUDIO_SINK@
# Set volume (0.0 - 1.5)
wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.5 # 50%
wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.5+ # Increase by 50%
wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05- # Decrease by 5%
# Mute/unmute
wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
wpctl set-mute @DEFAULT_AUDIO_SINK@ 1 # Mute
wpctl set-mute @DEFAULT_AUDIO_SINK@ 0 # Unmute
# Set default sink
wpctl set-default <id>
# List sinks to get ID
wpctl status | grep -A 10 "Sinks"
PipeWire Configuration
# Configuration locations
# /usr/share/pipewire/ # Default config
# ~/.config/pipewire/ # User overrides
# Copy default config for customization
mkdir -p ~/.config/pipewire
cp /usr/share/pipewire/pipewire.conf ~/.config/pipewire/
# Sample rate configuration
# ~/.config/pipewire/pipewire.conf.d/sample-rate.conf
context.properties = {
default.clock.rate = 48000
default.clock.allowed-rates = [ 44100 48000 96000 ]
}
# Restart after changes
systemctl --user restart pipewire wireplumber
PulseAudio Troubleshooting
Check PulseAudio Status
# Info
pactl info
# List sinks (outputs)
pactl list sinks short
pactl list sinks
# List sources (inputs)
pactl list sources short
# List cards (sound cards)
pactl list cards short
# List modules
pactl list modules short
Restart PulseAudio
# Kill and restart
pulseaudio -k
pulseaudio --start
# Or via systemctl (if running as service)
systemctl --user restart pulseaudio
# Verbose restart for debugging
pulseaudio -k
pulseaudio -vvv
Volume Control (PulseAudio)
# Set sink volume
pactl set-sink-volume @DEFAULT_SINK@ 50%
pactl set-sink-volume @DEFAULT_SINK@ +5%
pactl set-sink-volume @DEFAULT_SINK@ -5%
# Mute/unmute
pactl set-sink-mute @DEFAULT_SINK@ toggle
pactl set-sink-mute @DEFAULT_SINK@ 1 # Mute
pactl set-sink-mute @DEFAULT_SINK@ 0 # Unmute
# Set default sink
pactl set-default-sink <sink_name>
# Move application to different sink
pactl move-sink-input <input_index> <sink_name>
PulseAudio Configuration
# User config
~/.config/pulse/default.pa
~/.config/pulse/daemon.conf
# System config
/etc/pulse/default.pa
/etc/pulse/daemon.conf
# Example daemon.conf
# ~/.config/pulse/daemon.conf
default-sample-rate = 48000
resample-method = speex-float-5
# Reset to defaults
rm -rf ~/.config/pulse
pulseaudio -k
ALSA Troubleshooting
Check ALSA Devices
# List playback devices
aplay -l
aplay -L
# List capture devices
arecord -l
arecord -L
# Hardware info
cat /proc/asound/cards
cat /proc/asound/devices
# Check mixer
amixer
amixer scontrols
Test ALSA Directly
# Test speakers (bypassing PulseAudio/PipeWire)
speaker-test -c 2 -D hw:0,0
# Play WAV file
aplay -D hw:0,0 /usr/share/sounds/alsa/Front_Center.wav
# Record
arecord -d 5 -f cd test.wav
# Play recording
aplay test.wav
ALSA Mixer Control
# Interactive mixer
alsamixer
# Keys:
# F6 - Select card
# m - Mute/unmute
# Arrow keys - Adjust volume
# Esc - Exit
# Command line
amixer set Master 50%
amixer set Master mute
amixer set Master unmute
amixer set Master 5%+
amixer set Master 5%-
# Save/restore mixer settings
alsactl store
alsactl restore
Common Issues
No Sound at All
# 1. Check if muted
wpctl get-volume @DEFAULT_AUDIO_SINK@
pactl get-sink-mute @DEFAULT_SINK@
amixer get Master
# 2. Check if correct output selected
wpctl status
pactl list sinks short
aplay -l
# 3. Unmute in alsamixer
alsamixer
# Check all channels, especially:
# Master, PCM, Speaker, Headphone
# 4. Check if card detected
lspci -v | grep -i audio
lsmod | grep snd
# 5. Restart audio system
systemctl --user restart pipewire pipewire-pulse wireplumber
# 6. Check logs
journalctl --user -u pipewire -f
journalctl --user -u wireplumber -f
dmesg | grep -i audio
Wrong Output Device
# List available outputs
wpctl status
pactl list sinks short
# Set default output
wpctl set-default <node_id>
pactl set-default-sink <sink_name>
# GUI tools
pavucontrol # PulseAudio volume control
pwvucontrol # PipeWire volume control (if installed)
Application Audio Not Working
# Check if application is using correct output
pactl list sink-inputs
wpctl status
# Move application to correct sink
pactl move-sink-input <input_index> <sink_name>
# Check application-specific settings
# Some apps have their own audio device settings
# Environment variables for apps
PULSE_SINK=<sink_name> application
Crackling/Popping Audio
# Adjust buffer size (PipeWire)
# ~/.config/pipewire/pipewire.conf.d/latency.conf
context.properties = {
default.clock.quantum = 1024
default.clock.min-quantum = 512
default.clock.max-quantum = 2048
}
# For PulseAudio
# ~/.config/pulse/daemon.conf
default-fragments = 4
default-fragment-size-msec = 25
# Power management may cause issues
# Disable power saving for audio card
echo 0 > /sys/module/snd_hda_intel/parameters/power_save
echo N > /sys/module/snd_hda_intel/parameters/power_save_controller
# Make persistent
# /etc/modprobe.d/audio-power.conf
options snd_hda_intel power_save=0 power_save_controller=N
Audio Delay/Latency
# Check current latency
pw-top # PipeWire top (shows latency)
# Lower latency (may cause crackling)
# ~/.config/pipewire/pipewire.conf.d/low-latency.conf
context.properties = {
default.clock.quantum = 256
default.clock.min-quantum = 256
}
# For real-time audio
# Add user to audio group
sudo usermod -aG audio $USER
# Configure realtime scheduling
# /etc/security/limits.d/99-audio.conf
@audio - rtprio 95
@audio - memlock unlimited
HDMI/DisplayPort Audio
# Check if HDMI audio detected
aplay -l | grep HDMI
# HDMI may be on different card
# Find HDMI device
aplay -L | grep -i hdmi
# Set HDMI as default
wpctl set-default <hdmi_node_id>
pactl set-default-sink <hdmi_sink_name>
# Test HDMI audio
speaker-test -c 2 -D plughw:1,3
# May need to enable in alsamixer
alsamixer
# Press F6, select HDMI card
# Unmute HDMI channels
USB Audio Device
# Check if USB audio detected
lsusb | grep -i audio
dmesg | grep -i usb | grep -i audio
# List audio devices
aplay -l
# USB device may appear as different card
cat /proc/asound/cards
# Set USB as default
# ~/.asoundrc
defaults.pcm.card 1
defaults.ctl.card 1
# Or via PulseAudio/PipeWire
wpctl set-default <usb_node_id>
# Hot-plug issues - restart audio after connecting
systemctl --user restart pipewire wireplumber
Bluetooth Audio
Bluetooth Audio Setup
# Install required packages
# Arch: pipewire-pulse (includes bluetooth support)
# May also need: bluez bluez-utils
# Check Bluetooth service
systemctl status bluetooth
systemctl enable --now bluetooth
# Connect via bluetoothctl
bluetoothctl
# [bluetooth]# power on
# [bluetooth]# agent on
# [bluetooth]# scan on
# [bluetooth]# pair XX:XX:XX:XX:XX:XX
# [bluetooth]# connect XX:XX:XX:XX:XX:XX
# [bluetooth]# trust XX:XX:XX:XX:XX:XX
Bluetooth Audio Issues
# Check if connected
bluetoothctl info XX:XX:XX:XX:XX:XX
# Switch audio profile (A2DP vs HSP/HFP)
pactl list cards
pactl set-card-profile <card_name> a2dp-sink
pactl set-card-profile <card_name> headset-head-unit
# PipeWire: Check codec
wpctl status | grep -A5 bluetooth
# Audio cutting out - increase buffer
# ~/.config/pipewire/media-session.d/bluez-monitor.conf
# For newer WirePlumber:
# ~/.config/wireplumber/bluetooth.lua.d/50-bluez-config.lua
bluez_monitor.properties = {
["bluez5.enable-sbc-xq"] = true,
["bluez5.enable-msbc"] = true,
["bluez5.enable-hw-volume"] = true,
}
# Restart
systemctl --user restart pipewire wireplumber
Bluetooth Headset Microphone
# Headset profile needed for mic
# A2DP = high quality audio only
# HSP/HFP = lower quality + microphone
# Switch to headset profile
pactl set-card-profile <card_name> headset-head-unit
# Or via pavucontrol
# Configuration tab → select profile
# Check input device
wpctl status | grep -A5 Sources
pactl list sources short
Sound Card Configuration
Multiple Sound Cards
# List all cards
cat /proc/asound/cards
# Change card order (ALSA)
# /etc/modprobe.d/alsa.conf
options snd_hda_intel index=0
options snd_usb_audio index=1
# Or blacklist on-board if using dedicated
# /etc/modprobe.d/blacklist.conf
blacklist snd_hda_intel
# Set default in ALSA
# ~/.asoundrc
defaults.pcm.card 1
defaults.ctl.card 1
# Reload
sudo alsa force-reload
Intel HDA Configuration
# Common Intel HDA issues
# Check model
cat /proc/asound/card0/codec*
# Try different model hints
# /etc/modprobe.d/alsa.conf
options snd-hda-intel model=auto
# Or specific model:
options snd-hda-intel model=generic
options snd-hda-intel model=laptop-amic
# Common models:
# generic, laptop, laptop-amic, laptop-dmic
# dell-headset-multi, dell-e7x
# Reload module
sudo modprobe -r snd_hda_intel
sudo modprobe snd_hda_intel
Diagnostic Commands
Collect Audio Information
# System info
inxi -A # Audio summary
lspci -v | grep -i audio # PCI audio devices
lsusb | grep -i audio # USB audio devices
# Kernel modules
lsmod | grep snd
modinfo snd_hda_intel
# ALSA info
aplay -l
arecord -l
cat /proc/asound/cards
cat /proc/asound/devices
cat /proc/asound/pcm
# PipeWire info
pw-cli info all
wpctl status
systemctl --user status pipewire pipewire-pulse wireplumber
# PulseAudio info
pactl info
pactl list
pacmd dump
Debug Logs
# PipeWire logs
journalctl --user -u pipewire -f
journalctl --user -u wireplumber -f
# Run PipeWire with debug
PIPEWIRE_DEBUG=4 pipewire
# PulseAudio verbose
pulseaudio -vvv
# Kernel audio messages
dmesg | grep -E "snd|audio|ALSA|HDA"
# ALSA debug
echo 1 > /sys/module/snd/parameters/debug
dmesg | grep ALSA
Quick Reference
# Identify audio system
pactl info | grep "Server Name"
# PipeWire/WirePlumber
systemctl --user restart pipewire pipewire-pulse wireplumber
wpctl status
wpctl set-volume @DEFAULT_AUDIO_SINK@ 50%
wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
# PulseAudio
pulseaudio -k && pulseaudio --start
pactl list sinks short
pactl set-sink-volume @DEFAULT_SINK@ 50%
pactl set-default-sink <sink_name>
# ALSA
aplay -l
alsamixer
speaker-test -c 2
# Test audio
speaker-test -c 2
aplay /usr/share/sounds/alsa/Front_Center.wav
# Common fixes
# 1. Check mute (alsamixer, pavucontrol)
# 2. Check correct output device selected
# 3. Restart audio services
# 4. Check kernel modules loaded (lsmod | grep snd)
# 5. Check dmesg for errors