How does PipeWire perform with Ardour?

Heyy, everyone!
I hope, you’re doing well.

I see, it’s easy these days to get PipeWire up and running on an Arch based distro, replacing both Jack and Pulse-audio (not Alsa if I’m not wrong), doing just as good as them or better with basic audio usage (YouTube in a browser, playing an audio file, notification sounds etc…)

But when it comes to complex audio (in a DAW like Ardour) I guess, things won’t run out of the box. is that true? how much of a pain and headaches would PipeWire give me using Ardour if I switch to it?

Appreciate your thoughts!

Have it running in Arch and with Ardour - no problems at all at least for my simple demands (mostly Audio, rather seldom MIDI as well)

2 Likes

I run on Pipewire under Kubuntu and use Ardour with no major problems. There were big problems (for example - disabling all inputs after couple of seconds from system start) but they are solved now.

The main drawback (for me) is that you cannot freely choose session sample rate or open sessions with different sample rate than the system is running.

2 Likes

There is a control application to change sample rate. I posted in an earlier thread the steps I found. I will look for those earlier posts and link here.

2 Likes

Check this post and the one immediately preceding:
pipewire options

1 Like

I’ve been using PipeWire for about 8 months or so on Debian. I removed Pulse and JACK entirely. In Ardour I can still select JACK as a backend but most of the time I use ALSA as I find I sometimes get export issues (like it freezes) when selecting JACK.

2 Likes

That was a problem with some pipewire versions, jack freewheel mode did not work. That was fixed many months ago. Debian is usually very slow to pick up updates, you may need to find a non-distribution repository to get the latest version if you don’t want to build it yourself.

1 Like

I’m using Debian unstable so have a pretty recent version of PipeWire. I’ll give export with JACK a try later, but I don’t have any issues using ALSA anyway.

1 Like

@ccaudle Just tested with JACK and the situation is the same as last time I tried it. It exports 5 or so ranges and then freezes up. I’m using PipeWire 0.3.53

1 Like

Thank you Guys for sharing these valuable experiences :pray: :pray: :pray:

I’m using Kubuntu 22.04, pipewire v0.3.53, pipewire-media-session v0.4.1.r6, wireplumber v0.4.10.r48, kernel 5.15.0-40-lowlatency, M-Audio Air 192|14 interface - and no issues at all right now. Exporting, recording, playing, and everything else works well.

Keep in mind that configuring low latency with Pipewire still requires some significant knowledge, particularly with USB devices.

Another aspect that is rather complex is to configure systemic-latency. For jackd those are simply command-line options -d alsa -I <num> -O <num>. and jack_iodelay directly suggests those.

You will notice that when recording overdubs in Ardour. They won’t align with pipewire. The solution here is to first measure the round-trip latency (using jack_iodelay).

Then you have to find the Node-ID of the device in pipewire, and set the ProcessLatency parameter. This is done by running pw-cli then call list-objects search the relevant Node, and then set-param <Node-ID> ProcessLatency {rate: <THE-MEASURED-SYSTEMIC-LATENCY>}

e.g.

$ pw-cli
Welcome to PipeWire version 0.3.53. Type 'help' for usage.
pipewire-0>> list-objects
[..snip..]
	id 50, type PipeWire:Interface:Node/3
 		object.serial = "50"
 		object.path = "alsa:pcm:1:front:1:playback"
 		factory.id = "18"
 		client.id = "32"
 		device.id = "44"
 		priority.session = "945"
 		priority.driver = "945"
 		node.description = "EDIROL UA-25 Analog Stereo"
 		node.name = "alsa_output.usb-Roland_EDIROL_UA-25-00.analog-stereo"
 		node.nick = "UA-25"
 		media.class = "Audio/Sink"
	id 51, type PipeWire:Interface:Node/3
 		object.serial = "51"
 		object.path = "alsa:pcm:1:front:1:capture"
 		factory.id = "18"
 		client.id = "32"
 		device.id = "44"
 		priority.session = "1945"
 		priority.driver = "1945"
 		node.description = "EDIROL UA-25 Analog Stereo"
 		node.name = "alsa_input.usb-Roland_EDIROL_UA-25-00.analog-stereo"
 		node.nick = "UA-25"
 		media.class = "Audio/Source"
[..snip..]

Here Node IDs are 50 for playback, and 51 for capture. We can query information:

pipewire-0>> info 50
[..snip..]
*	params: (8)
*	  3 (Spa:Enum:ParamId:EnumFormat) r-
*	  1 (Spa:Enum:ParamId:PropInfo) r-
*	  2 (Spa:Enum:ParamId:Props) rw
*	  4 (Spa:Enum:ParamId:Format) -w
*	  10 (Spa:Enum:ParamId:EnumPortConfig) r-
*	  11 (Spa:Enum:ParamId:PortConfig) rw
*	  15 (Spa:Enum:ParamId:Latency) rw
*	  16 (Spa:Enum:ParamId:ProcessLatency) rw
[..snip..]

and then set the ProcessLatency to e.g. 544 samples:

pipewire-0>> set-param 50 ProcessLatency {rate: 544}
Object: size 32, type Spa:Pod:Object:Param:ProcessLatency (262156), id Spa:Enum:ParamId:ProcessLatency (16)
  Prop: key Spa:Pod:Object:Param:ProcessLatency:rate (2), flags 00000000
    Int 544

Now one can inspect the value

pipewire-0>> enum-params 50 Spa:Enum:ParamId:Latency
remote 0 object 50 param 15 index 54
  Object: size 176, type Spa:Pod:Object:Param:Latency (262155), id Spa:Enum:ParamId:Latency (15)
    Prop: key Spa:Pod:Object:Param:Latency:direction (1), flags 00000000
      Id 0        (Spa:Enum:Direction:Input)
    Prop: key Spa:Pod:Object:Param:Latency:minQuantum (2), flags 00000000
      Float 1.000000
    Prop: key Spa:Pod:Object:Param:Latency:maxQuantum (3), flags 00000000
      Float 1.000000
    Prop: key Spa:Pod:Object:Param:Latency:minRate (4), flags 00000000
      Int 544
    Prop: key Spa:Pod:Object:Param:Latency:maxRate (5), flags 00000000
      Int 544
    Prop: key Spa:Pod:Object:Param:Latency:minNs (6), flags 00000000
      Long 0
    Prop: key Spa:Pod:Object:Param:Latency:maxNs (7), flags 00000000
      Long 0

And finally then the same for the capture device:

pipewire-0>> set-param 51 ProcessLatency {rate: 544}
Object: size 32, type Spa:Pod:Object:Param:ProcessLatency (262156), id Spa:Enum:ParamId:ProcessLatency (16)
  Prop: key Spa:Pod:Object:Param:ProcessLatency:rate (2), flags 00000000
    Int 544

Last but not least you can check with pw-jack jack_lsp -l that it worked

$ pw-jack jack_lsp -l
EDIROL UA-25 Analog Stereo:capture_FL
	port playback latency = [ 0 0 ] frames
	port capture latency = [ 1568 1568 ] frames
EDIROL UA-25 Analog Stereo:capture_FR
	port playback latency = [ 0 0 ] frames
	port capture latency = [ 1568 1568 ] frames
EDIROL UA-25 Analog Stereo:playback_FL
	port playback latency = [ 1568 1568 ] frames
	port capture latency = [ 0 0 ] frames
EDIROL UA-25 Analog Stereo:playback_FR
	port playback latency = [ 1568 1568 ] frames

The latency reported by PW-JACK is now 1568 This is the sum of the nominal buffer-size 1024 + the configured systemic latency of 544.


In Ardour with the ALSA backend you can just use the built int “Calibrate Audio” feature and use the GUI. That is a lot easier if you ask me.

image

6 Likes

PS. after setting things up, check with

cd /tmp && wget https://community.ardour.org/files/adevices.sh && bash ./adevices.sh

That lists all soundcards, applications using them, and their current hardware settings, etc (and does not modify the system)

In my case pw-jack jack_bufsize reported 1024. So PW runs jack clients with cycles of 1024 frames/period – but then accumulates those for 32 cycles. the actual hardware latency is a lot longer. adevices.sh showed this:

Card 1 (UA25):
  * Playback Device 0 (USB Audio):
    - Subdevice 0 (hw:UA25,0,0):
      used by: pipewire-uninst (PID 1255565)
      access: MMAP_INTERLEAVED
      format: S24_3LE
      subformat: STD
      channels: 2
      rate: 48000 (48000/1)
      period_size: 512
      buffer_size: 32768

  * Recording Device 0 (USB Audio):
    - Subdevice 0 (hw:UA25,0,0):
      used by: pipewire-uninst (PID 1255565)
      access: MMAP_INTERLEAVED
      format: S24_3LE
      subformat: STD
      channels: 2
      rate: 48000 (48000/1)
      period_size: 512
      buffer_size: 32768

jack_iodelay also confirmed this, and showed latencies around 500ms.

I had to reduce the api.alsa.period-num and disable-batch processing. See also Config Devices · Wiki · PipeWire / pipewire · GitLab

3 Likes

DHealey,

Debian testing/unstable user here too. How do you manage the connections between devices and Ardour inputs? I kept both jack and pulse, and use qjackctl to mange such connections.

I also have problems trying to record an instrument from M-Audio firewire simultaneously with the microophone plugged in the onboard soundcard. The effects looks like some sample rate differences between the soundcards.

Best, Alexandre

I use qpwgraph (made by the same developer as qjackctl)

1 Like

It works very well in here! But I still have Jack and Pulse. I think if there is some volume mixer like the one in pulse audio, then I’ll be ready to bid a farewell to both Jack and Pulse. Any hint?

Best, Alexandre

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.