Ubuntu 24.04 LTS introduced PipeWire as the default audio server, a significant change from previous versions primarily using PulseAudio.
While PipeWire aims to offer a modern and unified approach to handling audio and video streams, some users, particularly those with specific or older hardware configurations (such as certain AMD GPUs like the Radeon RX 550), have reported encountering audio problems.
These can manifest as crackling sounds, intermittent audio loss, or no sound output. This article outlines several troubleshooting steps and solutions to help address these audio challenges on Ubuntu 24.04.
This article was created in partnership with Technofossy.com .
Understanding PipeWire’s Role
PipeWire is a modern multimedia framework designed for Linux systems, offering robust capabilities for capturing and playing back both audio and video streams. Compared to its predecessor, PulseAudio, PipeWire is often regarded as more performant and lighter on system resources.
A key strength of PipeWire is its ability to act as a compatibility layer, implementing pipelining for various audio systems including PulseAudio, JACK, and ALSA. This means applications originally designed for these older systems can often function seamlessly under PipeWire.
Beyond basic audio, PipeWire offers enhanced features such as smoother switching between Bluetooth profiles (like HFP for calls and A2DP for high-quality audio) for most headsets and supports video stream management, which is crucial for functionalities like screen sharing, especially under the Wayland display server.
While recent Debian-based distributions like Ubuntu 24.04 ship with PipeWire by default, understanding its components and how it interacts with legacy systems is beneficial for troubleshooting.
Read: How to Fix WIFI not working on Ubuntu 22.04
Initial Checks and Common First Steps
Before diving into more complex solutions, ensure basic checks are performed:
- Verify Sound Settings: Navigate to Ubuntu’s “Sound” settings. Under “Output Device,” you might see multiple options (e.g., “HDMI/DisplayPort,” “Built-in Audio”). Sometimes, simply switching between these options and then back to the intended one can restore audio.
- System Updates: Ensure your system is fully updated, as patches for audio-related issues are frequently released. admin@technofossy.com:~$ sudo apt update
Hit:1 http://archive.ubuntu.com/ubuntu noble InRelease
Get:2 http://security.ubuntu.com/ubuntu noble-security InRelease [113 kB]
Get:3 http://archive.ubuntu.com/ubuntu noble-updates InRelease [103 kB]
Fetched 216 kB in 1s (150 kB/s)
Reading package lists… Done
admin@technofossy.com:~$ sudo apt upgrade
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Calculating upgrade… Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. - Reboot: A simple system reboot can sometimes resolve temporary glitches after updates or configuration changes.
Advanced Solutions for Audio Problems
The visual below outlines the strategies that will be described below for fixing Ubuntu 24.04 audio problems, ranging from basic setup and updates to more advanced configurations and conflict resolution, with an ultimate fallback to PulseAudio
Which solution should be applied to address audio problems?
Read: How to display your sound card details using the terminal on Ubuntu 22.04
Solution 1: Utilizing QJackCtl for Audio Routing Inspection
QJackCtl provides a graphical interface to visualize and manage JACK audio connections, which can be helpful even in a PipeWire environment (as PipeWire provides JACK compatibility). It can help identify how audio sources are routed to outputs.
Install QJackCtl using the following command:
Reading package lists… Done
Building dependency tree… Done
The following additional packages will be installed:
[…]
Setting up qjackctl (…) …
Launch QJackCtl and explore the “Graph” or “Connect” window to see active audio clients and their connections. This can be particularly insightful if you have multiple sound devices or complex audio software.
Read: How to reinstall audio drivers in Windows 10
Solution 2: Updating PipeWire and WirePlumber via PPA
The versions of PipeWire and its session manager (WirePlumber) included in the standard Ubuntu repositories might not always be the latest. Using a Personal Package Archive (PPA) can provide more up-to-date versions, which may include fixes for known issues.
Add the PipeWire upstream PPA and the recommended WirePlumber PPA:
PPA description:
[Upstream PipeWire packages for Debian and Ubuntu derivatives.]
Press [ENTER] to continue or Ctrl-c to cancel adding it.
admin@technofossy.com:~$ sudo add-apt-repository ppa:pipewire-debian/wireplumber-upstream
PPA description:
[Upstream WirePlumber packages for Debian and Ubuntu derivatives.]
Press [ENTER] to continue or Ctrl-c to cancel adding it.
admin@technofossy.com:~$ sudo apt update
admin@technofossy.com:~$ sudo apt full-upgrade
After installation, reboot your system.
Upgrading PipeWire and WirePlumber via PPA
Note on PPAs: If you plan to upgrade to a new Ubuntu release in the future, it’s generally recommended to remove or purge PPAs beforehand using ppa-purge
to avoid potential conflicts.
Solution 3: PulseAudio Configuration Adjustments (with PipeWire)
Even though PipeWire is active, some PulseAudio configurations and tools can still influence audio behavior due to PipeWire’s compatibility layer (pipewire-pulse
). Installing PulseAudio Volume Control (pavucontrol
) can offer finer-grained control.
Additionally, editing PulseAudio’s daemon configuration file might help. Create a backup before editing:
admin@technofossy.com:~$ sudo nano /etc/pulse/daemon.conf
In the daemon.conf
file, find and uncomment (remove the leading ;
or #
) the following lines, and set their values as shown:
default-sample-format = float32le
default-sample-rate = 48000
Save the file and reboot. These settings adjust the default sample format to 32-bit floating-point and the sample rate to 48kHz, which can sometimes resolve quality issues.
Solution 4: Verifying and Re-establishing a Clean PipeWire Setup
If you suspect your PipeWire installation is corrupted, or if you’ve previously experimented with PulseAudio and want to ensure PipeWire is correctly set up as the default, follow these steps. First, check the current status of PipeWire:
● pipewire.service – PipeWire Multimedia Service
Loaded: loaded (/usr/lib/systemd/user/pipewire.service; enabled; vendor preset: enabled)
Active: active (running) since […]
● pipewire.socket – PipeWire Multimedia System Socket
Loaded: loaded (/usr/lib/systemd/user/pipewire.socket; enabled; vendor preset: enabled)
Active: active (listening) since […]
If PipeWire isn’t active or you want to perform a clean setup, and if PulseAudio might be interfering, you can stop and disable PulseAudio user services:
admin@technofossy.com:~$ systemctl –user disable pulseaudio.service pulseaudio.socket
Removed /home/admin/.config/systemd/user/default.target.wants/pulseaudio.service.
Removed /home/admin/.config/systemd/user/sockets.target.wants/pulseaudio.socket.
For a cleaner transition, you might consider removing PulseAudio, but proceed with caution:
Next, install or ensure the core PipeWire components are present.
Transitioning to PipeWire: A Step-by-Step Guide
Read: How To Fix Poor Sound Quality on Bluetooth Headset on Ubuntu 22.04
This includes pipewire-pulse
for PulseAudio application compatibility and wireplumber
as the session manager:
Then, enable and start the PipeWire services for your user:
Created symlink /home/admin/.config/systemd/user/default.target.wants/pipewire.service → /usr/lib/systemd/user/pipewire.service.
[…]
admin@technofossy.com:~$ systemctl –user start pipewire.service pipewire.socket pipewire-pulse.service pipewire-pulse.socket wireplumber.service
Finally, verify that PipeWire is handling PulseAudio requests:
Server Name: PulseAudio (on PipeWire 0.3.xx)
The output should indicate “PulseAudio (on PipeWire …)”, confirming PipeWire is active. A reboot might be beneficial after these changes.
Solution 5: Reverting to PulseAudio (Advanced Users)
If PipeWire seems to be the core issue and other solutions fail, some users opt to revert to PulseAudio. This is a more involved process and should be approached with caution, as it alters fundamental system components.
Caution: Incorrectly managing audio servers can compromise the stability of the desktop environment. Ensure you understand the commands before proceeding. Back up your system with Timeshift or a similar tool.
Reverting from PipeWire to PulseAudio
First, stop and mask PipeWire services to prevent them from starting:
admin@technofossy.com:~$ systemctl –user mask pipewire.service pipewire.socket wireplumber.service pipewire-pulse.service pipewire-pulse.socket
Created symlink /home/admin/.config/systemd/user/pipewire.service → /dev/null.
[…]
Ensure necessary PulseAudio packages are installed (some might already be present):
Unmask and enable PulseAudio services for your user:
Removed /home/admin/.config/systemd/user/pulseaudio.service.
Removed /home/admin/.config/systemd/user/pulseaudio.socket.
admin@technofossy.com:~$ systemctl –user –now enable pulseaudio.service pulseaudio.socket
Created symlink /home/admin/.config/systemd/user/default.target.wants/pulseaudio.service → /usr/lib/systemd/user/pulseaudio.service.
Created symlink /home/admin/.config/systemd/user/sockets.target.wants/pulseaudio.socket → /usr/lib/systemd/user/pulseaudio.socket.
A reboot is required after these changes. Verify PulseAudio status with:
Server Name: pulseaudio
The output should now indicate “pulseaudio” directly, without mentioning PipeWire.
Read: How to Display Your Graphics Card Information on Ubuntu 24.04
Solution 6: Dynamically Switching Between PipeWire and PulseAudio
For users who want the flexibility to switch between PipeWire and PulseAudio without manually managing services each time, creating a simple script can automate this process. This solution is particularly useful for testing which audio server works better with your specific hardware configuration.
First, create the script file. You can use the following command to open a text editor (like nano) to create the file at /usr/local/bin/audio_switch
:
Audio System Switching Script diagram
Then, paste the following script content into the editor:
#!/bin/bash
# Function to check if a service is active
is_service_active() {
systemctl --user is-active --quiet "$1"
}
# Function to show current audio system status
show_status() {
echo "Current audio system status:"
if is_service_active pipewire.service; then
echo " PipeWire: ACTIVE"
else
echo " PipeWire: inactive"
fi
if is_service_active pulseaudio.service; then
echo " PulseAudio: ACTIVE"
else
echo " PulseAudio: inactive"
fi
}
case "$1" in
pipewire)
echo "Switching to PipeWire..."
# Disable PulseAudio
systemctl --user disable --now pulseaudio.service pulseaudio.socket 2>/dev/null
# Enable PipeWire + WirePlumber
if systemctl --user enable --now pipewire.service pipewire.socket \
pipewire-pulse.service pipewire-pulse.socket \
wireplumber.service; then
echo "Successfully switched to PipeWire"
show_status
else
echo "Error: Failed to enable PipeWire services"
exit 1
fi
;;
pulseaudio)
echo "Switching to PulseAudio..."
# Disable PipeWire
systemctl --user disable --now pipewire.service pipewire.socket \
pipewire-pulse.service pipewire-pulse.socket \
wireplumber.service 2>/dev/null
# Enable PulseAudio
if systemctl --user enable --now pulseaudio.service pulseaudio.socket; then
echo "Successfully switched to PulseAudio"
show_status
else
echo "Error: Failed to enable PulseAudio services"
exit 1
fi
;;
status)
show_status
;;
*)
echo "Usage: $0 {pipewire|pulseaudio|status}"
echo ""
echo "Commands:"
echo " pipewire - Switch to PipeWire audio system"
echo " pulseaudio - Switch to PulseAudio audio system"
echo " status - Show current audio system status"
exit 1
;;
esac
Save the file and exit the text editor. Next, make the script executable:
Now you can use the script. Here’s how to check the status and switch:
Current audio system status:
PipeWire: ACTIVE
PulseAudio: inactiveadmin@technofossy.com:~$ audio_switch pulseaudio
Switching to PulseAudio…
Successfully switched to PulseAudio
Current audio system status:
PipeWire: inactive
PulseAudio: ACTIVEadmin@technofossy.com:~$ audio_switch pipewire
Switching to PipeWire…
Successfully switched to PipeWire
Current audio system status:
PipeWire: ACTIVE
PulseAudio: inactive
This script provides three main functions:
- audio_switch pipewire – Switches the system to use PipeWire as the audio server
- audio_switch pulseaudio – Switches the system to use PulseAudio as the audio server
- audio_switch status – Shows which audio system is currently active
The script automatically handles enabling and disabling the appropriate systemd services, provides status feedback, and includes error handling to notify you if something goes wrong during the switching process.
Remember to place the script in a directory included in your system’s PATH (like /usr/local/bin/
) and make it executable (sudo chmod +x /usr/local/bin/audio_switch
) for easy access from anywhere in the terminal.
Solution 7: Modifying WirePlumber Service Configuration
For some specific issues, particularly related to how WirePlumber (PipeWire’s session manager) initializes, setting the DISPLAY
environment variable within its service unit might help.
Edit the WirePlumber service unit for your user:
This will open an override file. Add the following content:
[Service]
Environment=DISPLAY=:1
Save the file, then reload the systemd daemon and restart WirePlumber:
admin@technofossy.com:~$ systemctl –user restart wireplumber.service
Suppose this resolves the issue but doesn’t persist across reboots. In that case, you might consider adding the restart command to GNOME’s autostart applications with a short delay, as some users have found helpful.
Solution 8: Kernel and BIOS Considerations
Audio issues can sometimes be linked to the Linux kernel version or outdated system BIOS/UEFI.
- BIOS/UEFI Update: Check your motherboard manufacturer’s website for the latest firmware. Updating can resolve hardware compatibility issues.
- Kernel Management: While downgrading a kernel is generally not recommended for security reasons, you can explore newer or OEM kernels. The
mainline
application (search for “Ubuntu Mainline Kernel Installer”) allows easy installation of different kernel versions. Trying a newer stable or an OEM kernel (e.g.,linux-oem-24.04
if available for your release) might provide better hardware support.admin@technofossy.com:~$ sudo apt install linux-oem-24.04 # Example, check available OEM kernels for your Ubuntu version
Solution 9: Addressing GPU-Specific Audio Conflicts
In some cases, particularly with certain AMD GPUs (like the Radeon RX 550 series often mentioned in community discussions), audio problems such as crackling or no sound over HDMI/DisplayPort can stem from driver interactions or specific configurations related to how the GPU handles audio streams. The transition to PipeWire might expose or exacerbate these underlying issues.
If you have such a GPU and experience audio problems primarily over HDMI/DP, consider the following:
- Driver Updates: Ensure you are using the latest available stable drivers for your AMD GPU. This often means keeping your Mesa libraries updated if you are using open-source drivers. admin@technofossy.com:~$ sudo apt update && sudo apt upgrade
- Kernel Parameters: Investigate kernel parameters related to AMD audio. For older cards using the `radeon` driver or newer ones using `amdgpu`, parameters like `radeon.audio=1` or `amdgpu.audio=1` (or `amdgpu.audio=0` to disable it if it’s causing conflicts with another audio device) can be tested. These are typically added to the `GRUB_CMDLINE_LINUX_DEFAULT` line in `/etc/default/grub`, followed by `sudo update-grub`. # Example modification in /etc/default/grub:
GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash amdgpu.audio=1″
admin@technofossy.com:~$ sudo update-grub
Sourcing file `/etc/default/grub’
Generating grub configuration file …
Found linux image: /boot/vmlinuz-…
Found initrd image: /boot/initrd.img-…
doneCaution: Modifying kernel parameters incorrectly can lead to boot issues. Ensure you understand the parameter before applying it.
- PipeWire Configuration for HDMI: Check PipeWire’s configuration files (often in `~/.config/pipewire/` or `/usr/share/pipewire/`) for settings related to HDMI audio profiles or device priorities. Sometimes, explicitly setting the profile for the HDMI output in `pavucontrol` (under the “Configuration” tab) can also help.
- Community Resources: Search for solutions specific to your AMD GPU model and “PipeWire HDMI audio” on Linux forums. Issues with specific hardware are often documented and resolved by the community or driver developers over time.
General Best Practices for System Stability
Before making significant system changes, especially those involving core components like the audio server or kernel:
- Use Timeshift: Install and configure Timeshift to create system snapshots. This allows you to easily roll back your system to a previous state if a change causes problems. admin@technofossy.com:~$ sudo apt install timeshift
Reading package lists… Done
Building dependency tree… Done
[…]
Setting up timeshift (…) … - One Change at a Time: When troubleshooting, apply one potential solution at a time and test thoroughly before moving to the next. This helps isolate what fixed the issue.
- Keep Records: Note down the changes you make, especially commands run or configuration files edited. This is invaluable if you need to revert changes or seek further help.
Verifying Audio Functionality
After applying any potential fix:
- Test audio playback from various applications (web browser, media player).
- Listen for any crackling, popping, or distortion.
- Use tools like
pavucontrol
to check if output devices are correctly recognized and levels are appropriate. Navigate through its “Playback,” “Output Devices,” and “Configuration” tabs. - The command
pw-top
can be run in a terminal to monitor active PipeWire clients and their resource usage, which can sometimes offer clues about misbehaving applications or high CPU usage by the audio system.
S ID QUANT DRIVER NAME
! 35 1024 alsa alsa_output.pci-0000_00_1f.3.analog-stereo
! 37 1024 alsa alsa_input.pci-0000_00_1f.3.analog-stereo
40 256 Dummy-Driver
I 42 – alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
43 – firefox alsa_output.pci-0000_00_1f.3.analog-stereo
- Verify the active audio server using
pactl info | grep "Server Name"
.
Conclusion
Audio troubleshooting on Linux, especially during transitions like the move to PipeWire in Ubuntu 24.04, can require patience and a methodical approach. The solutions can range from simple configuration tweaks to updating system components, managing audio server backends, or addressing hardware-specific interactions.
If you like the content, we would appreciate your support by buying us a coffee. Thank you so much for your visit and support.