How to Use PipeWire to replace PulseAudio in Ubuntu 22.04

Last updated: February 4, 2024 — 39 Comments

Ubuntu 22.04 has better support for the low latency PipeWire multimedia framework. Here’s how to setup it for PulseAudio, ALSA, JACK and Bluetooth output.

Firstly, Pipewire is pre-installed out-of-the-box, and runs as background service automatically. You may check it out by running command below in terminal:

systemctl --user status pipewire pipewire-session-manager

PipeWire installed out-of-the-box

IMPORTANT: This is NOT officially supported by Ubuntu so far. It still may not work on some devices. Don’t do it on production machine!

Step 1: install client libraries

Though available out-of-the-box, it’s not in use by default for audio output. To get start, first press Ctrl+Alt+T on keyboard to open terminal, and run command to install client libraries:

sudo apt install pipewire-audio-client-libraries libspa-0.2-bluetooth libspa-0.2-jack

Step 2: install wireplumber to replace pipewire-media-session

The project maintainer now recommends more advanced “wireplumber” session manager when to use Pipewire as system sound server.

To install the package and remove “pipewire-media-session”, run the command below in terminal:

sudo apt install wireplumber pipewire-media-session-

NOTE: there’s a ‘-‘ in the end of the command indicates to remove the package. The command will also install the required pipewire-pulse automatically.

Step 3: Copy configuration files:

wireplumber makes things quite easy! If you just want to replace PulseAudio with Pipewire, enable the media session service and restart and that’s all!!

For ALSA clients to be configured to output via PipeWire, run command to copy the configure file:

sudo cp /usr/share/doc/pipewire/examples/alsa.conf.d/99-pipewire-default.conf /etc/alsa/conf.d/

For JACK client, run command:

sudo cp /usr/share/doc/pipewire/examples/ld.so.conf.d/pipewire-jack-*.conf /etc/ld.so.conf.d/

And then sudo ldconfig.

For Bluetooth, just remove the pulseaudio-module-bluetooth package via command:

sudo apt remove pulseaudio-module-bluetooth

And, finally enable the media session by running command:

systemctl --user --now enable wireplumber.service

Step 4: Verify

After restarted Ubuntu 22.04, run the command below in terminal.

pactl info

It should output Sound server: PulseAudio (on PipeWire x.x.x) indicates Pipewire is in use as sound output.

How to Restore:

To undo the changes, firstly remove the client libraries via command:

sudo apt remove pipewire-audio-client-libraries libspa-0.2-bluetooth libspa-0.2-jack

Remove wireplumber and install back the previous media session package (there’s also ‘-‘ in the end):

sudo apt install pipewire-media-session wireplumber-

Finally, re-enable pipewire-media-session service by running commands:

rm -f ~/.config/systemd/user/pipewire-session-manager.service
systemctl --user --now enable pipewire-media-session

Thanks to @lestcape, if sound’s still not working, try to disable pipewire-pulse services via command:

systemctl --user --now disable pipewire-pulse.service pipewire-pulse.socket

If you tried to enabled it globally, also disable it via command:

sudo systemctl --global --now disable pipewire-pulse.service pipewire-pulse.socket

And re-enable the original pulseaudio service via command:

systemctl --user --now reenable pulseaudio.service pulseaudio.socket
sudo systemctl --global --now reenable pulseaudio.service pulseaudio.socket

Twitter

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via ubuntuhandbook1@gmail.com Buy me a coffee: https://ko-fi.com/ubuntuhandbook1 |

39 responses to How to Use PipeWire to replace PulseAudio in Ubuntu 22.04

  1. Hi, I installed everything, but I don’t hear the audio in my usb audio camera, fully functional before. ubuntu 22.04. greet

  2. how about restore need to install again?

  3. On Ubuntu 21.10 using PipeWire to replace PulseAudio also enabled the possibility to use aptX for BT headphones (by also installing libopenaptx). However on 22.04 this is no longer possible (also not by using libfreeaptx, as libopenaptx seems to be blacklisted now due to licensing).

    Any idea to make aptX work?

  4. Hi-
    Running UbuntuStudio; pactl info does not return PulseAudio (on PipeWire ..); hotp reports pipewire and wireplumber running on usr/bin/

  5. A big thank you for clear instructions that work! After upgrading from Ubunto 21.10 to Ubuntu 22.04, the audio system stopped automatically selecting my headphones when I plugged them in. These instructions fixed that perfectly.

  6. How to disable automatic Bluetooth profile A2DP-HFP autoswitch? For now PipeWire switch to HFP when I call somebody. But I wish to use A2DP only because my laptop has internal mic.

  7. Under “How to restore” I think the right command is “sudo apt remove”, not “sudo apt install”, right?

  8. my laptop was not outputting sound (either to BT speaker or internal speakers).
    after trying your method, it managed to connect to BT and output from both.
    now, what happened is that I can’t play any audio from any of the players – they basically don’t play as if the timeline of the files doens’t move forward..
    any help on this?

  9. How does one revert the server name:

    I now have
    Server Name: PulseAudio (on PipeWire 0.3.48)

    This breaks all sound, i.e. I want to get back the setting where there is NO mention of pipewire. I have done the uninstall stuff. Rebooting does not revert this.

  10. My audio stopped working after upgrading to 22.04. I had previously been running PipeWire, before 22.04. Running steps 1 and 2 in your article and rebooting revived my audio. Thanks!

  11. If you’re trying to go back to pulse audio, instead of running that last command you gave, you should input this instead:

    systemctl –user –now enable pulseaudio

    Replacing “pipewire-media-session” with “pulseaudio.” Running the other command and not re-enabling pulseaudio, which is the default in ubuntu at this point, breaks audio if you’re trying to go back and only leaves you with “Dummy Audi” as an output…. which is no audio at all.

    This is the result of my experience. Otherwise, good article! Pipewire left me with crackling, lower bitrate output, so I’ll just wait untin the next Ubuntu version where it’ll be implimented by default.

  12. In my case to revert it and have again pulseaudio automatically on boot time, i needed to do the following:

    sudo apt remove pipewire-audio-client-libraries libspa-0.2-bluetooth libspa-0.2-jack
    sudo apt install pipewire-media-session wireplumber-
    rm -f ~/.config/systemd/user/pipewire-session-manager.service
    systemctl --user --now enable pipewire-media-session
    systemctl --user --now disable pipewire-pulse.service pipewire-pulse.socket
    sudo systemctl --global --now disable pipewire-pulse.service pipewire-pulse.socket
    systemctl --user --now reenable pulseaudio.service pulseaudio.socket
    sudo systemctl --global --now reenable pulseaudio.service pulseaudio.socket
  13. I did not get it to function with pulseaudio installed, but I removed pulseaudio, rebooted and got it to pic up alsa directly. Witch is what I wanted for Kodi. No sound controls if I log in to Cinnamon though, but sound is in function.
    Quite good as I can pick the alsa sound card directly in Kodi, as I have an external dac for music, an I let Pipwire take care of the hdmi to main soundreciever.

  14. For future reference:
    I had to manually disable pulseaudio service and enable pipewire pulse to get it working:

    systemctl --user --now disable pulseaudio.service pulseaudio.socket

    systemctl --user --now enable pipewire-pulse.service pipewire-pulse.socket

    • This is what I had to do as well (though, on Fedora 36 not ubuntu). Wasn’t working until i enabled pipewire and rebooted. Thanks @nmm!

    • thank you! this helped me resolve my issue on ubuntu 22.04.3 lts! was still dealing with connection refused or pulseaudio only without pipewire messages; unmasked pulse and pipe services, then manually disabled pulseaudio service and manually enabled pipewire pulse, now it shows up as pulseaudio on pipewire. i can finally use my IEM bluetooth adapter earbuds!

  15. Richard C Anderson September 14, 2022 at 6:27 pm

    I am sorry to say that this information did not fix my audio problems. I am using a asus P8 H67-M Le motherboard with azalia hd audio and it does not work. any suggestions ?

  16. does the PipeWire improve the Bluetooth headset connectivity?

  17. Doesn’t work on my kubuntu 22.04

    It keeps saying still run on pulseaudio and there is no sound.

    Thankfully I can restore the pulseaudio.

    Maybe I’ll just simply do fresh install 22.10 when it’s released.

  18. I have followed your instruction, everything works, but I see no difference. Even the “puselaudio volume control” is still there. The only difference is “Server Name: PulseAudio (on PipeWire 0.3.48)”

  19. Hi! “If you just want to replace PulseAudio with Pipewire, enable the media session service and restart and that’s all!!” How do I actually do this?

  20. hi. I have this answer by invoking:
    systemctl –user status pipewire-media-session.service
    Unit pipewire-media-session.service could not be found.
    what is the problem and how can it be solved? thank you

  21. solved, sorry but i still have this error

    jack-device 0x55dd4035e1c8: can’t open client: Conexión rehusada

    ● pipewire.service – PipeWire Multimedia Service
    Loaded: loaded (/usr/lib/systemd/user/pipewire.service; enabled; vendor preset: enabled)
    Active: active (running) since Wed 2022-10-26 09:30:43 CEST; 26s ago
    TriggeredBy: ● pipewire.socket
    Main PID: 16669 (pipewire)
    Tasks: 2 (limit: 9240)
    Memory: 4.3M
    CPU: 58ms
    CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/pipewire.service
    └─16669 /usr/bin/pipewire

    oct 26 09:30:43 tao systemd[1360]: Started PipeWire Multimedia Service.
    oct 26 09:30:43 tao pipewire[16669]: Cannot connect to server socket err = No existe el archivo o el directorio
    oct 26 09:30:43 tao pipewire[16669]: Cannot connect to server request channel
    oct 26 09:30:43 tao pipewire[16669]: jack server is not running or cannot be started
    oct 26 09:30:43 tao pipewire[16669]: JackShmReadWritePtr::~JackShmReadWritePtr – Init not done for -1, skipping unlock
    oct 26 09:30:43 tao pipewire[16669]: JackShmReadWritePtr::~JackShmReadWritePtr – Init not done for -1, skipping unlock
    oct 26 09:30:43 tao pipewire[16669]: jack-device 0x55dd4035e1c8: can’t open client: Conexión rehusada

    ● pipewire-media-session.service – PipeWire Media Session Manager
    Loaded: loaded (/usr/lib/systemd/user/pipewire-media-session.service; enabled; vendor preset: enabled)
    Active: active (running) since Wed 2022-10-26 09:30:43 CEST; 26s ago

  22. This manual is obsolete and not working on clean installation of Ubuntu 22.04.

    Use this guide instead:
    https://linuxconfig.org/how-to-install-pipewire-on-ubuntu-linux

  23. While probably effective, I don’t think this is good enough.

    Asking someone to remove and replace deep down bits of the operating system via the command line just to hear youtube videos is too much. I’m an experienced linux user and I don’t want to do this because I don’t want to:
    – potentially bork my installation
    – make my installation non-standard so that when it’s eventually fixed in mainstream, my install will be quirky until I reinstall everything.
    – waste my time on this. It is easier/quicker to find a pair of USB headphones, and just live with the disappointment.

    I think ubuntu/firefox needs to be better.

    A link to a ticket in the relevant bug tracker would be helpful if anyone knows it.

  24. Great Ji m! I followed your instructions everthing is working now!

  25. Thanks, this helped get a very non-responsive 22.04 working again, steps 1-4 and reboot. Just had to do this to get gnome-sound-control working:
    sudo apt install libcanberra-pulse

  26. Thank you so much

  27. Captain Packers October 20, 2023 at 2:45 pm

    Awesome! Thanks!

  28. For any reason, in step 3 after copying 99-pipewire-default.conf perms were set to -rw-r—–, which caused the pipewire service (which is running as a current user) not being able to read from it and no sound devices were showing. chmod o+r /etc/alsa/conf.d/99-pipewire-default.conf fixed the issue.

  29. It works!! OMG! Finally, this is an amazing solution! Thanks!

  30. Thanks so much for this guide! Been struggling the past few days trying to get audio working on a fresh install of Mint 23 running on a Morphius Chromebook. Pulseaudio was causing massive frame drops and buffer underruns in every single video and audio file. Replacing pulse with pipewire fixed everything.

  31. perfect, worked perfectly on ubuntu 22.04.3

  32. Thank you, Ji! Your instructions worked great for KDE Neon (22.04 LTS base).

  33. thanks for ing up my bluetooth earbuds that i needed for school. they worked fine before, i TRIED to switch, because of crackilng and audio issues, then pipewire would have no sound, and now my bt earbuds are wont be listed as output device

  34. Works great. Solved a recurring issue with Shure MV7 on Ubuntu 22.04.
    With PulseAudio, it would work sporadically and caused much grief. So far, with Pipewire it is stable. Thank you.

  35. kernelupdatestrikesagain November 15, 2024 at 2:07 pm

    This fixed my out of nowhere Linux Mint sound issue (no sound in Firefox only) where everything else failed. Also added (restored?) device sound profiles in Sound Preferences. Had none before and it was Dummy Output for Firefox in Pavucontrol (other apps didn’t seem to care though).

Leave a Reply

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

*