Starting Ardour with pw-jack

Hi,

I’m slowly upgrading my machines to ubuntu 24.
I’ve long preferred to use the default Ubuntu for my audio stuff, especially for reports, interviews, podcasts, etc. with jackd, qjackctrl, pulseaudio-module-jack and Ardour.

With the switch to pipewire, I’ve the basic stuff up and running with additionally install pipewire-jack and qpwgraph instead of jackd etc.

For now, I’m runnig Ardour from the cmdline with
pw-jack -p 512 -s 44100 /opt/Ardour-8.10.0/bin/ardour8.

Is there a simpler way to start Ardour without to manual setup a desktop starter or menu entry with this cmd?

Thanx for advise!

You should set up your system so that the dynamic linker finds the pipewire implementation of libjack in preference to any “native” JACK implementation. This is documented for most distros, and involves editing e.g. /etc/ld.so.conf.d/pipewire-jack-x86_64-linux-gnu.conf

That way, any JACK client will start up and use the pipewire JACK implementation automatically (and thus connect to the running pipewire server)

2 Likes

Thanx, but maybe I do something wrong:

I’ve
sudo cp /usr/share/doc/pipewire/examples/ld.so.conf.d/pipewire-jack-*.conf /etc/ld.so.conf.d/
then
/opt/Ardour-8.10.0/bin/ardour8

and get this errors, Ardour won’t start:

/opt/Ardour-8.10.0/bin/ardour8
Ardour8.10.0 (kompiliert mit Version 8.10 und GCC Version 10.2.1 20210110)
Ardour: [INFO]: Ihre Systemkonfiguration limitiert Ardour auf 1048576 geöffnete Dateien
Ardour: [INFO]: Lade Systemkonfigurationsdatei /opt/Ardour-8.10.0/etc/system_config
Ardour: [INFO]: Lade Benutzerkonfiguration /home/uexplorer/.config/ardour8/config
Ardour: [INFO]: CPU vendor: GenuineIntel
Ardour: [INFO]: AVX capable processor
Ardour: [INFO]: CPU brand:       Intel(R) Core(TM) i7-3610QM CPU @ 2.30GHz
Ardour: [INFO]: Using AVX optimized routines
Ardour: [INFO]: Lade Plugin-Metadatendatei /opt/Ardour-8.10.0/share/plugin_metadata/plugin_tags
Ardour: [INFO]: add_lrdf_data '/home/uexplorer/.config/ardour8/rdf:/opt/Ardour-8.10.0/share/rdf:/usr/local/share/ladspa/rdf:/usr/share/ladspa/rdf'
Kann die SIGPIPE Fehlerbehandlung nicht installieren
Ardour: [INFO]: Lade 461 MIDI Patches von /opt/Ardour-8.10.0/share/patchfiles
Ardour: [INFO]: Lade voreingestellte UI-Konfigurationsdatei /opt/Ardour-8.10.0/etc/default_ui_config
Ardour: [INFO]: Lade benutzerdefinierte UI-Konfigurationsdatei /home/uexplorer/.config/ardour8/ui_config
Gtk-Message: 18:26:57.763: Failed to load module "canberra-gtk-module"
Ardour: [INFO]: Lade Farbdatei /opt/Ardour-8.10.0/share/themes/dark-ardour.colors
Ardour: [INFO]: Lade UI-Konfigurationsdatei /opt/Ardour-8.10.0/etc/clearlooks.rc
Ardour: [INFO]: Loading bindings from /opt/Ardour-8.10.0/etc/ardour.keys
Lade UI-Konfigurationsdatei /opt/Ardour-8.10.0/etc/clearlooks.rc
Cannot connect to server socket err = Datei oder Verzeichnis nicht gefunden
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Cannot connect to server socket err = Datei oder Verzeichnis nicht gefunden
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Cannot connect to server socket err = Datei oder Verzeichnis nicht gefunden
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Cannot connect to server socket err = Datei oder Verzeichnis nicht gefunden
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Found nothing along /home/uexplorer/.config/ardour8/templates:/opt/Ardour-8.10.0/share/templates
JACK command line will be:  -t 200 -p 2048 -R -T -d alsa -n 2 -r 44100 -p 1024 -d hw:PCH,0 -X raw
Cannot connect to server socket err = Datei oder Verzeichnis nicht gefunden
Cannot connect to server request channel
exec of JACK server (command = "-t") failed: Datei oder Verzeichnis nicht gefunden
Cannot connect to server socket err = Datei oder Verzeichnis nicht gefunden
Cannot connect to server request channel
Cannot connect to server socket err = Datei oder Verzeichnis nicht gefunden
Cannot connect to server request channel
Cannot connect to server socket err = Datei oder Verzeichnis nicht gefunden
Cannot connect to server request channel
Cannot connect to server socket err = Datei oder Verzeichnis nicht gefunden
Cannot connect to server request channel
Cannot connect to server socket err = Datei oder Verzeichnis nicht gefunden
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Cannot connect to server socket err = Datei oder Verzeichnis nicht gefunden
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Cannot connect to server socket err = Datei oder Verzeichnis nicht gefunden
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Cannot connect to server socket err = Datei oder Verzeichnis nicht gefunden
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JACK command line will be:  -t 200 -p 2048 -R -T -d alsa -n 2 -r 44100 -p 1024 -d hw:PCH,0 -X raw
Cannot connect to server socket err = Datei oder Verzeichnis nicht gefunden
Cannot connect to server request channel
exec of JACK server (command = "-t") failed: Datei oder Verzeichnis nicht gefunden
Cannot connect to server socket err = Datei oder Verzeichnis nicht gefunden
Cannot connect to server request channel
Cannot connect to server socket err = Datei oder Verzeichnis nicht gefunden
Cannot connect to server request channel
Cannot connect to server socket err = Datei oder Verzeichnis nicht gefunden
Cannot connect to server request channel
Cannot connect to server socket err = Datei oder Verzeichnis nicht gefunden
Cannot connect to server request channel
Cannot connect to server socket err = Datei oder Verzeichnis nicht gefunden
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JACK command line will be:  -t 200 -p 2048 -R -T -d alsa -n 2 -r 44100 -p 1024 -d hw:PCH,0 -X raw
Cannot connect to server socket err = Datei oder Verzeichnis nicht gefunden
Cannot connect to server request channel
exec of JACK server (command = "-t") failed: Datei oder Verzeichnis nicht gefunden
Cannot connect to server socket err = Datei oder Verzeichnis nicht gefunden
Cannot connect to server request channel
Cannot connect to server socket err = Datei oder Verzeichnis nicht gefunden
Cannot connect to server request channel
Cannot connect to server socket err = Datei oder Verzeichnis nicht gefunden
Cannot connect to server request channel
Cannot connect to server socket err = Datei oder Verzeichnis nicht gefunden
Cannot connect to server request channel
Cannot connect to server socket err = Datei oder Verzeichnis nicht gefunden
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock

The settings form after the start cmd shows me:

And the Message after clicking [Start] is
Konnte nicht zur Audio/MIDI Engine wiederverbinden

With
pw-jack -p 512 -s 44100 /opt/Ardour-8.10.0/bin/ardour8 all is fine.

I

Ah, sorry, I forgot
sudo ldconfig.

But now, it starts with 48 kHz.
How can I start Ardour with another Samplerate?

You can’t…

But when you create a new session and change the samplerate that session will retain whatever you have selected.

That change threw me at first too…

The fact that you see the dialog at all in that form indicates that there is no JACK server running. This means that your pipewire configuration has an issue.

Can’t you change the pipewire samplerate before starting Ardour? I thought that the script you made for AVLinux to provide a GUI interface to pw-metadata would do that. I’m currently using jackd instead of pipewire-jack so I can’t easily check directly.

Hi Chris,

Sorry, I meant in an Ardour session, my ALSA bias is showing, I wasn’t thinking in terms of the general Desktop session samplerate. Yes you’re right that can be changed with a PipeWire Metadata command whether in a terminal or some sort of GUI like that script. Depending on what Distro the OP is using there may be other UI’s available to do that.

After ldconfig, the form no longer appear. But I’m struggling with the samplerate…

Hm, also by creating a new session, I’m not able to set the samplerate…

Whether with Pipewire or “original” JACK, if you are already running the server when you start Ardour, that’s the SR you’ll get.

The difference with Pipewire is that it is effectively always running, so things get a bit more complicated.

I don’t know how you can set these from the command line, but there is a way. In my /etc/pipewire/jack.conf file I have:

jack.properties = {
     node.latency       = 1024/44100
     node.rate          = 1/44100
     node.quantum       = 1024/44100

You could run whatever the relevant cmd line tool is (sometime will name it) to reset that to the desired SR, at which point you’re good to go. It is equivalent to starting JACK before starting Ardour, with the correct SR.

Thanx, will try it later.

That’s, what I found for pipewire:

pw-metadata -n settings 0 clock.force-rate 44100
Found "settings" metadata 31
set property: id:0 key:clock.force-rate value:44100 type:(null)

Setting this before starting Ardour, it will take this SR for the project.

Hm, if I make /etc/pipewire/jack.conf with the jack.properties, Ardour prompting me with the audio settings dialog, greeting me with “not able to connect with the audio engine” and don’t start.

The file needs more than just that, I think.

I’ve been doing this for several months now, works perfectly for me.

@aPilger

Next question is… do you even need JACK (or PipeWire) at all? If you’re only using Ardour without connecting external software then IMHO using ALSA is so much saner… ALSA connects directly to your hardware and you can set the S/R to whatever you like… JACK, PipeWire and the rest are not involved at all…

The only rub is while you use Ardour it has control of the Audio device so no watching Youtube or Editing a Video or (listening to other music :laughing:) while you use Ardour.

I need several audio sources while working with ardour… checking audios with another player, record from browsers, software phones etc.

For now, this seems to fit my needs:

mkdir ~/.config/pipewire
cp /usr/share/pipewire/pipewire.conf ~/.config/pipewire
nano ~/.config/pipewire

Change SR in ~/.config/pipewire
then

systemctl --user restart pipewire.service

Thanx for your hints!

can you check with

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

if the soundcard is indeed using 44.1kHz in that case, or if pipewire resamples?

Pipewire allows its “JACK nature” to come and go. If there are no JACK clients, then PulseAudio clients (e.g. Firefox) will set the hardware SR, and when JACK clients come along, they get the current hardware SR (e.g. in Ardour, an SR mismatch warning).

But if the first JACK client starts with no other PW audio clients, then in my case 44100 is used, and any later non-JACK clients will get resampled if they want e.g. 48kHz.

Even if the ProAudio profile is set? That logic somehow seems wrong to me (i.e. let casual use applications override settings that you have specified you want for audio production).