PipeWire Late Summer Update 2020

Wim Taymans

Wim Taymans talking about current state of PipeWire


Wim Taymans did an internal demonstration yesterday for the desktop team at Red Hat of the current state of PipeWire. For those still unaware PipeWire is our effort to bring together audio, video and pro-audio under Linux, creating a smooth and modern experience. Before PipeWire there was PulseAudio for consumer audio, Jack for Pro-audio and just unending pain and frustration for video. PipeWire is being done with the aim of being ABI compatible with ALSA, PulseAudio and JACK, meaning that PulseAudio and Jack apps should just keep working on top of Pipewire without the need for rewrites (and with the same low latency for JACK apps).

As Wim reported yesterday things are coming together with both the PulseAudio, Jack and ALSA backends being usable if not 100% feature complete yet. Wim has been running his system with Pipewire as the only sound server for a while now and things are now in a state where we feel ready to ask the wider community to test and help provide feedback and test cases.

Carla on PipeWire

Carla running on PipeWire

Carla as shown above is a popular Jack applications and it provides among other things this patchbay view of your audio devices and applications. I recommend you all to click in and take a close look at the screenshot above. That is the Jack application Carla running and as you see PulseAudio applications like GNOME Settings and Google Chrome are also showing up now thanks to the unified architecture of PipeWire, alongside Jack apps like Hydrogen. All of this without any changes to Carla or any of the other applications shown.

At the moment Wim is primarily testing using Cheese, GNOME Control center, Chrome, Firefox, Ardour, Carla, vlc, mplayer, totem, mpv, Catia, pavucontrol, paman, qsynth, zrythm, helm, Spotify and Calf Studio Gear. So these are the applications you should be getting the most mileage from when testing, but most others should work too.

Anyway, let me quickly go over some of the highlight from Wim’s presentation.

Session Manager

PipeWire now has a functioning session manager that allows for things like

  • Metadata, system for tagging objects with properties, visible to all clients (if permitted)
  • Load and save of volumes, automatic routing
  • Default source and sink with metadata, saved and loaded as well
  • Moving streams with metadata

Currently this is a simple sample session manager that Wim created himself, but we also have a more advanced session manager called Wireplumber being developed by Collabora, which they developed for use in automotive Linux usecases, but which we will probably be moving to over time also for the desktop.

Human readable handling of Audio Devices

Wim took the code and configuration data in Pulse Audio for ALSA Card Profiles and created a standalone library that can be shared between PipeWire and PulseAudio. This library handles ALSA sound card profiles, devices, mixers and UCM (use case manager used to configure the newer audio chips (like the Lenovo X1 Carbon) and lets PipeWire provide the correct information to provide to things like GNOME Control Center or pavucontrol. Using the same code as has been used in PulseAudio for this has the added benefit that when you switch from PulseAudio to PipeWire your devices don’t change names. So everything should look and feel just like PulseAudio from an application perspective. In fact just below is a screenshot of pavucontrol, the Pulse Audio mixer application running on top of Pipewire without a problem.

PulSe Audio Mixer

Pavucontrol, the Pulse Audio mixer on Pipewire

Creating audio sink devices with Jack
Pipewire now allows you to create new audio sink devices with Jack. So the example command below creates a Pipewire sink node out of calfjackhost and sets it up so that we can output for instance the audio from Firefox into it. At the moment you can do that by running your Jack apps like this:

PIPEWIRE_PROPS="media.class=Audio/Sink" calfjackhost

But eventually we hope to move this functionality into the GNOME Control Center or similar so that you can do this setup graphically. The screenshot below shows us using CalfJackHost as an audio sink, outputing the audio from Firefox (a PulseAudio application) and CalfJackHost generating an analyzer graph of the audio.

Calfjackhost on pipewire

The CalfJackhost being used as an audio sink for Firefox

Creating devices with GStreamer
We can also use GStreamer to create PipeWire devices now. The command belows take the popular Big Buck Bunny animation created by the great folks over at Blender and lets you set it up as a video source in PipeWire. So for instance if you always wanted to play back a video inside Cheese for instance, to apply the Cheese effects to it, you can do that this way without Cheese needing to change to handle video playback. As one can imagine this opens up the ability to string together a lot of applications in interesting ways to achieve things that there might not be an application for yet. Of course application developers can also take more direct advantage of this to easily add features to their applications, for instance I am really looking forward to something like OBS Studio taking full advantage of PipeWire.

gst-launch-1.0 uridecodebin uri=file:///home/wim/data/BigBuckBunny_320x180.mp4 ! pipewiresink mode=provide stream-properties="props,media.class=Video/Source,node.description=BBB"

Cheese paying a video through pipewire

Cheese playing a video provided by GStreamer through PipeWire.

How to get started testing PipeWire
Ok, so after seeing all of this you might be thinking, how can I test all of this stuff out and find out how my favorite applications work with PipeWire? Well first thing you should do is make sure you are running Fedora Workstation 32 or later as that is where we are developing all of this. Once you done that you need to make sure you got all the needed pieces installed:

sudo dnf install pipewire-libpulse pipewire-libjack pipewire-alsa

Once that dnf command finishes you run the following to get PulseAudio replaced by PipeWire.


cd /usr/lib64/

sudo ln -sf pipewire-0.3/pulse/libpulse-mainloop-glib.so.0 /usr/lib64/libpulse-mainloop-glib.so.0.999.0
sudo ln -sf pipewire-0.3/pulse/libpulse-simple.so.0 /usr/lib64/libpulse-simple.so.0.999.0
sudo ln -sf pipewire-0.3/pulse/libpulse.so.0 /usr/lib64/libpulse.so.0.999.0

sudo ln -sf pipewire-0.3/jack/libjack.so.0 /usr/lib64/libjack.so.0.999.0
sudo ln -sf pipewire-0.3/jack/libjacknet.so.0 /usr/lib64/libjacknet.so.0.999.0
sudo ln -sf pipewire-0.3/jack/libjackserver.so.0 /usr/lib64/libjackserver.so.0.999.0

sudo ldconfig

(you can also find those commands here

Once you run these commands you should be able to run

pactl info

and see this as the first line returned:
Server String: pipewire-0

I do recommend rebooting, to be 100% sure you are on a PipeWire system with everything outputting through PipeWire. Once that is done you are ready to start testing!

Our goal is to use the remainder of the Fedora Workstation 32 lifecycle and the Fedora Workstation 33 lifecycle to stabilize and finish the last major features of PipeWire and then start relying on it in Fedora Workstation 34. So I hope this article will encourage more people to get involved and join us on gitlab and on the PipeWire IRC channel at #pipewire on Freenode.

As we are trying to stabilize PipeWire we are working on it on a bug by bug basis atm, so if you end up testing out the current state of PipeWire then be sure to report issues back to us through the PipeWire issue tracker, but do try to ensure you have a good test case/reproducer as we are still so early in the development process that we can’t dig into ‘obscure/unreproducible’ bugs.

Also if you want/need to go back to PulseAudio you can run the commands here

Also if you just want to test a single application and not switch your whole system over you should be able to do that by using the following commands:

pw-pulse

or

pw-jack

Next Steps
So what are our exact development plans at this point? Well here is a list in somewhat priority order:

  1. Stabilize – Our top priority now is to make PipeWire so stable that the power users that we hope to attract us our first batch of users are comfortable running PipeWire as their only audio server. This is critical to build up a userbase that can help us identify and prioritize remaining issues and ensure that when we do switch Fedora Workstation over to using PipeWire as the default and only supported audio server it will be a great experience for users.
  2. Jackdbus – We want to implement support for the jackdbus API soon as we know its an important feature for the Fedora Jam folks. So we hope to get to this in the not to distant future
  3. Flatpak portal for JACK/audio applications – The future of application packaging is Flatpaks and being able to sandbox Jack applications properly inside a Flatpak is something we want to enable.
  4. Bluetooth – Bluetooth has been supported in PipeWire from the start, but as Wims focus has moved elsewhere it has gone a little stale. So we are looking at cycling back to it and cleaning it up to get it production ready. This includes proper support for things like LDAC and AAC passthrough, which is currently not handled in PulseAudio. Wim hopes to push an updated PipeWire in Fedora out next week which should at least get Bluetooth into a basic working state, but the big fix will come later.
  5. Pulse effects – Wim has looked at this, but there are some bugs that blocks data from moving through the pipeline.
  6. Latency compensation – We want complete latency compensation implemented. This is not actually in Jack currently, so it would be a net new feature.
  7. Network audio – PulseAudio style network audio is not implemented yet.

18 comments ↓

#1 Bruno on 09.04.20 at 17:31

Nice to see good progress.
There might be 2 type juste before “Next Steps” near the end.
“Not” instead of “Now” also what was in brackets after pw-pulse has disappeared.

#2 uraeus on 09.04.20 at 18:47

Thanks for catching that typo, now fixed.

#3 Be on 09.05.20 at 00:11

Cool stuff! I’m one of the developer of Mixxx. Issues configuring audio devices are the most frequent support requests for us. I hope the day comes where everything Just Works on Linux without users having to know anything about the sound server or ALSA.

Does Pipewire handle hotplugging audio interfaces? This is my biggest issue with JACK. If the USB cable of my audio interface comes unplugged during a gig, JACK and all the applications using it have to be restarted. If this could Just Work with low latency audio processing resuming as soon as the audio interface is plugged in again, that would be fantastic!

#4 aoeudhtns on 09.05.20 at 00:45

I have an issue that I’d consider reporting, but I’m not sure if it’s “obscure” or not: after switching to pipewire, pavucontrol bugs out when selecting the Port of my output device (a USB DAC/amp). I can file gitlab.freedesktop.org and run anything that might interest you if you think that is worth writing up.

#5 frnx on 09.05.20 at 07:42

Nice, thanks for the detailed write-up!

I often use a Bluetooth headset to monitor audio when recording without cables in the way : configuring that with JACK is a bit hacky at the moment, and since it looks like Pipewire supports it out of the box I can’t wait to give it a go!

#6 Robert on 09.05.20 at 11:40

It seems programs depending on SDL1 no longer work once you switch to PW.

$ dosbox
DOSBox version 0.74-3
Copyright 2002-2019 DOSBox Team, published under GNU GPL.

dosbox: ../src/pipewire/proxy.c:237: pw_proxy_destroy: Assertion `!proxy->destroyed’ failed.

$ dosbox-x
LOG: Early LOG Init complete
LOG: Logging init: beginning logging proper. This is the end of the early init logging
LOG: Logging: No logfile was given. All further logging will be discarded.
LOG: DOSBox-X version 0.83.5
dosbox-x: ../src/pipewire/proxy.c:237: pw_proxy_destroy: Assertion `!proxy->destroyed’ failed.
Aborted

SDL2 programs seem to fair a bit better.

#7 Robert on 09.05.20 at 11:43

SDL1 programs seem to be broken…

$ dosbox
DOSBox version 0.74-3
Copyright 2002-2019 DOSBox Team, published under GNU GPL.

dosbox: ../src/pipewire/proxy.c:237: pw_proxy_destroy: Assertion `!proxy->destroyed’ failed.

SDL2 programs seem to fair better.

#8 unfa on 09.06.20 at 15:33

Fantastic!
I wonder if and how I can test PipeWire on Manjaro. Can it replace the JACK server for me?

There’s a typo with a the word “net” being there instead of “neat” in the Next Steps / Latency Compensation section.

#9 UK Law Essay Help on 09.07.20 at 08:40

Great update about 2020

#10 Fabian Bornschein on 09.07.20 at 20:18

You should really test Discord. While audio output in general works, audio Input is broken (via puls->PW interface)

#11 Hi-Angel on 09.07.20 at 21:27

@FabianBornschein please report it on the gitlab, so developers are able to see and track the issue.

#12 badpixel on 09.09.20 at 11:46

I can confirm that while stable pipewire causes problems with many apps interfacing trough alsa, pipewire from GIT resolves this problems.
The only remaining problems are related to inability to set volume higher than 25% trough plasma(I can use alsamixer as workaround), but bigger problem that plasmashell constantly restarts because some conflict with kded5 and symlink snippets

#13 Nathan Myers on 09.12.20 at 18:23

Thank you for the summary. It is great to see such progress on a thing where so much could go wrong, but hasn’t!

Note it is impolitic, provoking unhelpful hostility, to assert that Flatpak is the future of application delivery. Sure it may be supported, but many reasonable people have been burned and will not touch anything visibly associated with Flatpak, never mind dependent on it.

The moldering graphic-equalizer pulseaudio module, if revived or replaced in pipewire, could help generate enthusiasm for upgrading.

#14 Take Online Class on 09.15.20 at 10:45

Can I pay someone to take my online class for me? Yes, we’re a reliable online class help provider connecting you with subject tutors to take your course & tests.

#15 Take My Class on 09.15.20 at 10:46

Can I pay someone to take my online class for me? Yes, we’re a reliable online class help provider connecting you with subject tutors to take your course & tests.

#16 Take My Course on 09.15.20 at 11:46

Have you ever thought to yourself, “Is it possible to have someone take my online course?” Now it is. Hire online course help with Online Class Takers today.

#17 Avi Wadhwa on 09.16.20 at 12:41

Any way i can undo this Pipewire configuration? it’s a wonderful program, but without Flatpak support a lot of my online classes will just be sillent.

#18 write my essay on 09.17.20 at 07:26

I am looking this service can you please share more details