Configuring JACK2 Virtual Audio Routing

I’ve been trying to find a good comprehensive guide for configuring and setting up JACK Audio for setting up Virtual Audio routing, but most guides and videos I can seem to find online are very old and outdated, and don’t even explain very well with how setting up audio with JACK Audio.

I’m in need of a specific setup for Virtual Audio routing for recording and such with applications like OBS. I want to be able to use virtual audio routing for specific applications to feed audio from one thing and pipe it to another so that audio management can be independently controlled per application when recording with OBS, so they are put into specific audio tracks. You get up to 6 separate audio tracks you can record audio, and each one can be dedicated to output a specific audio to.

[System] → [Track 1]
[Mic/Aux] → [Track 2]
     \ - [Mic/Aux] → [Audio Mixer Filters]

[App 1] → [Track 3]
[App 2] → [Track 4]

Information on setting up virtual audio routing on Linux seems to be so difficult to get configured correctly, because JACK Audio seems to do any 1 of 3 things;

  • JACK Audio Server cannot start
  • XRUN errors
  • No Audio input/output and causes video and audio sources to stutter

JACK ain’t a foolproof solution indeed. But once you get it right, it should work beautifully.

First things first, install realtime-privileges package from community repo then relogin (reboot if necessary).

I suggest using Cadence for setting up, enable the PulseAudio bridge so both can coexist (PulseAudio will have its own input/output node):

Go to Configure, select and setup your device in the Driver tab:

Do note that sample rate, buffer size, periods/buffer, basically everything that determines the final latency depends on your hardware. I have a fairly decent one here and the setting you see above gives me 5.3ms latency.

Once you’re done, go back to the main page and press the Start button. Wait for a while and see if there are quickly raising XRUNs (if only a few per every seconds that’s still normal) or even JACK refusing to start. In the latter case, open Tools->Logs to see why. Most of the time this is due to overly aggressive latency setting your system cannot handle, loosen it up a bit (10-15 ms latency should still be OK, even 40 is fine if all you need is just playing instead of recording).

If you finally make it, Tools->Catia or Tools->Claudia will present a nice GUI where you can connect things as you wish. I usually have my guitar connected via 1/4" to USB cable as an input for Rakarrack (it has 3 inputs, but the last one is kinda useless), where in turn its output is then sent to one of the recording channels in Ardour (which already has similar GUI, but less nice to use IMO), like this:

At this point JACK is already usable, you just wire the nodes as you wish.

I used have tutorials for JACK and QjackCtl for another distribution, but they were deleted when the distribution replaced QjackCtl with their own package

I am working on a JACK tutorial for Manjaro, but I have not incorporated recent changes to packages, so this is just an outline of a work-in-progress:

JACK Audio Server cannot start

A standard Linux distribution must be reconfigured for realtime scheduling or JACK will refuse to start

  1. Add user to audio group
sudo gpasswd -a $USER audio
  1. Install package realtime-privileges
pamac install realtime-privileges
  1. Add user to realtime group created by the package
sudo gpasswd -a $USER realtime
  1. Reboot system to ensure group memberships are loaded

That is only enough to get JACK to start and more configuration is needed to prevent xrun problems

JACK - XRUN errors

To configure system for minimal* errors use realtimeconfigquickscan script

(*user will still have to fine-tune JACK settings to find a balance between low-latency and no xruns. There is no ‘one size fits all’ solution for that)

git clone git://
cd realtimeconfigquickscan
perl ./

The script has links explaining how to implement any changes needed
I have worked out terminal commands to save manually editing system files, but Manjaro does not have the same system configuration for all DEs and window managers
If users post the script response on this forum I can work out what is needed

PulseAudio - No Audio causes video and audio sources to stutter

Use these command to set the default Pulseaudio connections to use JACK

pacmd set-default-sink jack_out
pacmd set-default-source jack_in

Then get the sink-name for the device taken for JACK use from this

pactl list short sinks

and change the sink-profile to off

pacmd set-card-profile [sink-name] off

(changing the sink-profile can also be done in GUI controls)

That is all the one-time configuration most users need

The next part is a personal choice for users
Some will want to use a GUI package (QjackCtl or Cadence) for controlling JACK
But JACK can also be started and stopped with simple BASH scripts

1 Like