On Linux, make sure you are using a distribution with a version of Pipewire at or beyond 1.2.5. Then tell Ardour to use the JACK/Pipewire backend (it was renamed in Ardour 8.x from just JACK).
You should not need to use the pw-jack command if you only have pipewire-jack installed and not jackd.
If you have both installed you may need that command to load the proper jack libraries.
Thanks @jmantra and @ccaudle. The suggestion from @jmantra allows me to start Ardour. I must have jackd installed as the command locate jackd produces a number of results and I can’t start Ardour from the desktop icon that references the ardour command directly.
Have not got it to actually produce any sound yet, but I haven’t experimented much.
EDIT: working now. And I can play sound from other sources (web sites) simultaneously. Quite likely I will switch to this approach in production work.
root@k0:~# apt list pipewire
En train de lister... Fait
pipewire/stable-backports,now 1.2.5-1~bpo12+1 amd64 [installé]
pipewire/stable 0.3.65-3+deb12u1 i386
But when I try to switch from alsa to jack
Adrour crash…
ardour-request-device: caught signal - shutting down.
Cannot connect to server socket err = Connexion refusée
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 = Connexion refusée
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 = Connexion refusée
Cannot connect to server request channel
NB : Ardour 7.3.0~ds0 “Nerve Net” (rev 7.3.0~ds0-1) Intel 64 bits, because I prefer do all stuff through debian apt command.
What application displays that dialog? Ardour does not have an OSS or FreeBoB backend, so not Ardour.
That indicates that there is no audio server running with the JACK API.
Pipewire is modular, so if you want the JACK server implementation for pipewire you have to also install pipewire-jack (as shown in the earlier post ).
After pipewire-jack is installed and running, then when Ardour starts you should be able to select the JACK/Pipewire backend (or Ardour may automatically connect if you have used jackd as the audio server for ardour in the past).
The application is Ardour. I have installed this :
root@k0:~# apt list pipewire
En train de lister... Fait
pipewire/stable-backports,now 1.2.5-1~bpo12+1 amd64 [installé]
pipewire/stable 0.3.65-3+deb12u1 i386
root@k0:~# apt list pipewire-jack
En train de lister... Fait
pipewire-jack/stable-backports,now 1.2.5-1~bpo12+1 amd64 [installé]
pipewire-jack/stable 0.3.65-3+deb12u1 i386
And impossible to listen youtube when Ardour is open. Now, the video is blocked.
That indicates that Ardour did not detect a running JACK server, and is requesting you provide the settings to start jackd. That indicates pipewire-jack is not actually running, or that Ardour is not running in a way that Ardour can detect the pipewire instance. You mentioned using apt to install Ardour, so I think the ardour version is not from flatpak, which can often cause problems.
Do you also have jackd installed? If so you would need to start ardour with the pw-jack command as noted above. If you decide that pipewire-jack works for you it would be more straight forward to uninstall jackd and use only pipewire.
root@k0:~# apt list jackd
En train de lister... Fait
jackd/stable,stable,now 5+nmu1 all [installé, automatique]
root@k0:~# jack_lsp
Cannot connect to server socket err = No such file or directory
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
Error: cannot connect to JACK, server is not running.
root@k0:~# ldd `which jack_lsp`
linux-vdso.so.1 (0x00007ffdee54c000)
libjack.so.0 => /lib/x86_64-linux-gnu/libjack.so.0 (0x00007fe528bb4000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe5289d3000)
libdb-5.3.so => /lib/x86_64-linux-gnu/libdb-5.3.so (0x00007fe528811000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fe528400000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fe528732000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fe528710000)
/lib64/ld-linux-x86-64.so.2 (0x00007fe528c2f000)
Another fact : youtube and other video are blocked now, without Ardour running ; it seem to be from the moment installed these two packages from debian backports :
root@k0:~# apt list pipewire
En train de lister... Fait
pipewire/stable-backports,now 1.2.5-1~bpo12+1 amd64 [installé]
pipewire/stable 0.3.65-3+deb12u1 i386
root@k0:~# apt list pipewire-jack
En train de lister... Fait
pipewire-jack/stable-backports,now 1.2.5-1~bpo12+1 amd64 [installé]
pipewire-jack/stable 0.3.65-3+deb12u1 i386
The red text says : jack is already running, Ardour will try to connect to it using the current settings.
After that, I have a message box saying :
This session was created with a sample rate of 44100 Hz, but Ardour is currently running at 48000 Hz.
Audio is resampled for both playback and recording to match the sampling rate, which reduces quality. Reconfigure the Audio Engine in Menu > Window > Audio/Midi Setup
And I can not listen youtube, the video is blocked…
Other consumers of audio are blocked because of d-bus reservation that a preferred application makes on the hardware device.
You need to decide what backend you want to use. If you don’t need ardour to share connections with other jack-aware applications concurrently running then there is no need to use the the JACK or jack/pipewire backends.
The ALSA backend is good. You only need JACK for connecting ardour with legacy applications that don’t have VST/LV2 versions available.
If you are using pipewire to supply jack you wan’t to configure the library loader to prefer pipewire’s libjack.so files over jackd’s.
The simple way is not to install the pipewire-jack package. Use the pipewire defaults your linux distribution provides for your desktop environment and configure ardour to use ALSA.
If you have multiple hardware audio devices your desktop environment should automatically delegate between them.
I think pw-jack has a -s switch that allows you to specify the sample rate. 48000 is the default. Try pw-jack -h to see the (few) command line options.
I do not think you have Pipewire configured properly, other applications should be able to output sound as long as pipewire is still running and is controlling the audio hardware.
What application do you use to configure your audio hardware for desktop use? Do you use pavucontrol, or something else?
That is the expected text when there is a jack server running, so that should indicate that pipewire-jack is now running.
Check the connection graph (using qpwgraph, qjackctl, or the Ardour audio connections window) and see if the other applications are still connected to the pipewire graph. Perhaps they were disconnected for some reason when adding pipewire-jack.
But when the preferred application is pipewire audio server, the applications should still be able to connect to either the pipewire-pulse or pipewire-ALSA API. As far as I remember the Firefox browser does not ever use direct ALSA hardware access, at least not for many, many years.
The very first post was specifically asking how to have other applications share audio access when Ardour was running, that is the entire point of this thread.
There is a huge difference between Ardour collaborating with other production applications and a linux desktop session playing consumer media content from multiple sources simultaneously.
You want to separate those two use cases to the greatest extent possible while still maintaining the usability of normie linux.
Unless you use a another application that requires JACK concurrently with Ardour there is no need to run a JACK server or pipewire’s jack services whatsoever. (Except for the case where you need synchronous deadline scheduling).
Uninstall JACK. Uninstall pipewire-jack. Install pipewire-pulse. Use Ardour’s ALSA backend.
Good advice in a general sense, but specifically does not solve the original request:
Using the ALSA backend will prevent playing YouTube while Ardour is open, which was the whole point of the original request.
Using pipewire solves that request, and to use pipewire with Ardour you need the pipewire-jack module installed.
Other methods, such as running jackd and instantiating an alsa-sink work, but for most current Linux distributions that will be swimming against the stream.