Swapping out JACK for Pipewire in Ubuntu Studio 22.04

Pretty soon after setting up Ubuntu Studio on my laptop (which I plan to use for my music recording and composition) it became obvious that all was not…


Text size
JACK and Pipewire logos superimposed on the Ubuntu Studio wallpaper

Pretty soon after setting up Ubuntu Studio on my laptop (which I plan to use for my music recording and composition) it became obvious that all was not well in JACK land. My excitement at everything ‘working out of the box’ was somewhat premature on this machine! 

To headphone or not to headphone

The primary issue I was experiencing was with my audio - it seems to be my nemesis as this was what prompted me to switch to Ubuntu Studio in the first place!

The issue seemed to be with JACK, the default audio server, and surrounded the use of headphones … pretty vital if you don’t want to thoroughly annoy your partner and neighbours with constant click tracks and your amazing musical creations!

Every time I switched to headphones, any apps that were using Pulseaudio (Spotify, Chrome etc) would switch perfectly to and from the headset, both wired and Bluetooth. Ardour, however, absolutely REFUSED to play through my headphones, no matter what settings I changed.

Troubleshooting with Carla

Carla, a really awesome open source audio plugin host has a great feature called the Patchbay which allows you to see and modify all of the audio magic going on under the hood. 

Screenshot of Carla patchbay with red and blue inputs and outputs connecting to each other.

In my case, there was no differentiation between the audio that was coming from the likes of Spotify, Chrome etc at all - and nothing I did seemed to make the audio from Ardour route correctly from the laptop speakers to my headphones, either wired or Bluetooth.

After hours of troubleshooting (thanks to the awesome folks in Unfa’s community) I was still no closer to getting this working.

Recently, Unfa (the font of all Ardour knowledge!) had shared a video of switching from JACK to Pipewire and having it ‘just work’, so I figured it would be worth a shot!

Switching from JACK/Pulseaudio to Pipewire

Before starting - take a backup!

I followed the tutorial here mostly so there’s no point me repeating it again, go check it out!  Do watch out for some of the other tutorials which talk about using PPAs, I started down that route and it did not end well!

The tutorial saw me through basically everything that I needed with the exception that I needed to run these commands after step 3:

systemctl --user --now disable pulseaudio.service pulseaudio.socket - this shuts down Pulseaudio

systemctl --user --now enable pipewire pipewire-pulse - this starts Pipewire

This got Pipewire up and running for me - you can use the command pw-top to check out the pipewire node and device statistics.

And our survey says …

After a few reboots (the usual ‘did you switch it off and on again’ teaching applies even to geeks!) I fired up all the apps and started to test what was working and what was broken.

Guess what?

IT WAS ALL WORKING!

With my headphones plugged in, every app using audio could play at the same time, and it was all coming through to my headphones. I did have to set the output device for Ardour, but once that was done, everything was working perfectly.

Disconnecting my headphones, everything seamlessly transferred to my laptop speakers and continued to work.

Connecting the headphones with Bluetooth, everything seamlessly transferred to the headphones, and back to the speakers when I disconnected.

HURRAH!

Further, looking back at Carla, each application now had its own node with the connections being shown, which is what I think should have been happening all along with JACK.

Added bonus

As an added bonus, with JACK I had quite bad latency resulting in crackly audio and the occasional glitch, which I assumed to be due to old hardware (although to be honest, the XPS 15 is still a pretty good spec given its age!) however as soon as I switched over to Pipewire the xruns (where the system is not processing the buffers in time) basically dropped to almost nothing.

It’s no surprise to me that Pipewire is going to ship as the default audio server in Ubuntu 22.10 - so far everything is running like a dream since I switched!

0 comments

No comments yet - be the first.

Leave a comment

Only used if I need to reply - never shown or stored.

Comments are moderated before they appear. No account and no cookies - your name and comment are all that's kept.

Keep reading

Related posts

Photo from the back of the FOSDEM community devroom
09 February, 2023 Geek

FOSDEM 2023: Back to live!

Last weekend I headed over to Brussels on the Eurostar like hundreds of other open source enthusiasts, for the first in-person FOSDEM event since the…

Ubuntu studio logo on the dark wallpaper which is black with a mottled grey image of the ubuntu studio logo on the right side - a circle with several concentric circles outside it.
17 August, 2022 Geek

Switching from Kubuntu to Ubuntu Studio

Having started to learn the flute three years ago and taking up piano during lockdown to help me with learning how to compose, I've increasingly been…

Screenshot of the DDEV website
20 July, 2022 Geek

Using DDEV with Joomla for local development

In Mautic, we make use of the open source tool DDEV heavily as a tool to help you get a local development environment spun up quickly. It's an incredible…