Month: October 2021

Pipewire? Replacement for Jack and PU.

Category : Uncategorized

Things have progressed since this was written. Ubuntu 22.04.2 is out and Pipewire has matured. An important thing to note is that as installed from the Ubuntu installer, pipewire is not fully setup. Do the following:

sudo systemctl --user --no-pager status pipewire

This will show if pipewire is running. <esc> or ctl-z to get back to the prompt. Then install the rest of pipewire libraries.

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

If bluetooth hardware is installed on the computer:

sudo apt -y install libspa-0.2-bluetooth

Pipewire-media-session is obsolete and should be replaced with wireplumber

sudo apt -y remove pipewire-media-session

sudo apt -y install wireplumber

Configuration files should be linked so ALSA and pipewire configuration is set.

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

you might need to add this, although my installation had a config file there.

sudo ln -s /usr/share/doc/pipewire/examples/ld.so.conf.d/pipewire-jack-X86_64-linux.conf /etc/ld.so.conf.d/pipewire-jack-X86_64-linux.conf

And enable and start wireplumber:

sudo systemctl --user --now enable wireplumber

sudo systemctl start wireplumber

I have been reading up on Pipewire, a unified graph based infrastructure for audio and video streams. Pipewire is indended to work alongside ALSA for a a unified way of handling low latency audio and video within a computer. Pipewire is a unified audio and video handler for Linux that will replace pulseaudio and jack audio connection kit

  • Provide consumer, system and pro audio high performance, low latency routing of streams.
  • Provide for high performance, low latency routing of video streams.
  • Provide a simple easy to use interface for users.
  • Pipewire will be a default audio port for Flatpack applications.
  • It has fully functional jack2 and pulseaudio emulator plugins, so jack applications work as expected.
  • Already is the default in Fedora 34 distribution, so they figure it is kind of ready for prime time.
  • Has revolutionary implications for Linux, particularly when X11 (Xorg) is replaced by Wayland desktop manager

I reviewed many recent posts and comments online. It is pretty clear that a computer that uses Wayland used as a desktop machine would do well to move to pipewire. Its performance is much better than pulseaudio. For pro audio implementations there are still some bugs involving starting and tearing down setups leaving zombie ports that may require a reboot to clear them. This is ok for fairly stable desktops but would be unacceptable for a pro audio production environment.

Pipewire is wired to play nice with Wayland, but apparently also works ok with X11. Many of its features come to the fore with the new desktop. Ubuntu 22.04 uses Wayland but X11 can be run on top to get ssh -x forwarding to work.

My suggestion for pro audio users is: Ubuntu 22.04 LTS and use pipewire there.

The Ubuntu 22.04.2 LTS release has Wayland and Gnome 4.2 by default. Pipewire is pretty mature and Ubuntu will be better tuned for pipewire. A lot more native pipewire and flatpack applications will be available, so pulseaudio canl be finally of the picture. I read that pipewire works with Wine. Be ready to build test systems. This way you can hit the road running with pipewire while avoiding most of the “bleeding edge” problems.

If you are using OBS for video in a Ubuntu desktop environment you should probably upgrade now. You can get the full benefit of pipewire’s unified audio and video handling, and improved camera interface now. Setup should be a cinch. The reported problems should not be a big deal for that use. Your audio will sync accurately to your video.