pipewire-jack.conf(5)

๐ŸŽ€ pipewire-jack.conf(5) โ€” File Formats Manual ๐ŸŽ€

โœจ NAME โœจ

pipewire-jack.conf โ€” literally jack.conf, bestie. ๐Ÿ’…

๐Ÿ’– DESCRIPTION ๐Ÿ’–

The PipeWire JACK client configuration file. That's the whole vibe. ๐Ÿซถ

๐ŸŒธ SYNOPSIS ๐ŸŒธ

  • $XDG_CONFIG_HOME/pipewire/jack.conf
  • /etc/pipewire/jack.conf
  • /usr/share/pipewire/jack.conf
  • /usr/share/pipewire/jack.conf.d/
  • /etc/pipewire/jack.conf.d/
  • $XDG_CONFIG_HOME/pipewire/jack.conf.d/

๐Ÿ’– DESCRIPTION (the sequel, bestie) ๐Ÿ’–

Configuration for PipeWire JACK clients. Periodt. โœจ

The configuration file format and lookup logic is the same as for pipewire.conf(5).

Drop-in configuration files jack.conf.d/*.conf can be used, and are recommended. See pipewire.conf(5). Lowkey use the drop-ins, bestie โ€” the manpage itself says they're recommended. ๐Ÿซถ

๐ŸŽ€ CONFIGURATION FILE SECTIONS ๐ŸŽ€

  • jack.properties โ€” JACK client configuration. ๐ŸŽ›๏ธ
  • jack.rules โ€” JACK client match rules. ๐Ÿ•ต๏ธ

In addition, the PipeWire context configuration sections may also be specified, see pipewire.conf(5).

๐Ÿฆ‹ JACK PROPERTIES ๐Ÿฆ‹

okay so the configuration file can contain an extra JACK-specific section called jack.properties, like this:

# ~/.config/pipewire/jack.conf.d/custom.conf

jack.properties = {
    #rt.prio             = 88
    #node.latency        = 1024/48000
    #node.lock-quantum   = true
    #node.force-quantum  = 0
    #jack.show-monitor   = true
    #jack.merge-monitor  = true
    #jack.show-midi      = true
    #jack.short-name     = false
    #jack.filter-name    = false
    #jack.filter-char    = " "
    #
    # allow:           Don't restrict self connect requests
    # fail-external:   Fail self connect requests to external ports only
    # ignore-external: Ignore self connect requests to external ports only
    # fail-all:        Fail all self connect requests
    # ignore-all:      Ignore all self connect requests
    #jack.self-connect-mode  = allow
    #jack.locked-process     = true
    #jack.default-as-system  = false
    #jack.fix-midi-events    = true
    #jack.global-buffer-size = false
    #jack.passive-links      = false
    #jack.max-client-ports   = 768
    #jack.fill-aliases       = false
    #jack.writable-input     = false
    #jack.flag-midi2         = false
}

See stream.properties in pipewire-client.conf(5) for an explanation of the generic node properties. It is also possible to have per-client settings, see Match Rules below. ๐Ÿ‘‘

  • rt.prio โ€” To limit the realtime priority that jack clients can acquire. ๐ŸŽš๏ธ
  • node.latency โ€” To force a specific minimum buffer size for the JACK applications, configure node.latency = 1024/48000. This configures a buffer-size of 1024 samples at 48KHz. If the graph is running at a different sample rate, the buffer-size will be adjusted accordingly. ๐Ÿงฎ
  • node.lock-quantum โ€” To make sure that no automatic quantum is changes while JACK applications are running, configure node.lock-quantum = true. The quantum can then only be changed by metadata or when an application is started with node.force-quantum. JACK Applications will also be able to use jack_set_buffersize() to override the quantum. ๐Ÿ”’
  • node.force-quantum โ€” To force the quantum to a certain value and avoid changes to it, configure node.force-quantum = 1024. The quantum can then only be changed by metadata or when an application is started with node.force-quantum (or JACK applications that use jack_set_buffersize() to override the quantum). ๐Ÿ’ฅ
  • jack.show-monitor โ€” Show the Monitor client and its ports. ๐Ÿ‘€
  • jack.merge-monitor โ€” Exposes the capture ports and monitor ports on the same JACK device client. This is how JACK presents monitor ports to the clients. The default is however not to merge them together because this results in more user friendly user interfaces, usually. An extra client with a Monitor suffix is created that contains the monitor ports.

For example, this is (part of) the output of jack_lsp with the default setting (jack.merge-monitor = false):

Compare:

  • jack.merge-monitor = true: Built-in Audio Analog Stereo:playback_FL, Built-in Audio Analog Stereo:monitor_FL, Built-in Audio Analog Stereo:playback_FR, Built-in Audio Analog Stereo:monitor_FR
  • jack.merge-monitor = false: Built-in Audio Analog Stereo:playback_FL, Built-in Audio Analog Stereo Monitor:monitor_FL, Built-in Audio Analog Stereo:playback_FR, Built-in Audio Analog Stereo Monitor:monitor_FR
  • jack.show-midi โ€” Show the MIDI clients and their ports. ๐ŸŽน
  • jack.short-name โ€” To use shorter names for the device client names use jack.short-name = true. Compare:
    • jack.short-name = true: HDA Intel PCH:playback_FL, HDA Intel PCH Monitor:monitor_FL, HDA Intel PCH:playback_FR, HDA Intel PCH Monitor:monitor_FR
    • jack.short-name = false: Built-in Audio Analog Stereo:playback_FL, Built-in Audio Analog Stereo Monitor:monitor_FL, Built-in Audio Analog Stereo:playback_FR, Built-in Audio Analog Stereo Monitor:monitor_FR
  • jack.filter-name โ€” the original manpage gives this one a heading and then... nothing, bestie. I'm not making up a description. ๐Ÿ™ˆ
  • jack.filter-char โ€” Will replace all special characters with jack.filter-char. For clients the special characters are ()[].:*$ and for ports they are ()[].*$. Use this option when a client is not able to deal with the special characters. (and older version of PortAudio was known to use the client and port names as a regex, and thus failing when there are regex special characters in the name). ๐Ÿงน
  • jack.self-connect-mode โ€” Restrict a client from making connections to and from itself. Possible values and their meaning are summarized as:
    • allow โ€” Don't restrict self connect requests.
    • fail-external โ€” Fail self connect requests to external ports only.
    • ignore-external โ€” Ignore self connect requests to external ports only.
    • fail-all โ€” Fail all self connect requests.
    • ignore-all โ€” Ignore all self connect requests.
  • jack.locked-process โ€” Make sure the process and callbacks can not be called at the same time. This is the normal operation but it can be disabled in case a specific client can handle this. ๐Ÿ”
  • jack.default-as-system โ€” Name the default source and sink as system and number the ports to maximize compatibility with JACK programs.

Compare:

  • jack.default-as-system = false: HDA Intel PCH:playback_FL, HDA Intel PCH Monitor:monitor_FL, HDA Intel PCH:playback_FR, HDA Intel PCH Monitor:monitor_FR
  • jack.default-as-system = true: system:playback_1, system:monitor_1, system:playback_2, system:monitor_2
  • jack.fix-midi-events โ€” Fix NoteOn events with a 0 velocity to NoteOff. This is standard behaviour in JACK and is thus enabled by default to maximize compatibility. Especially LV2 plugins do not allow NoteOn with 0 velocity. ๐ŸŽต
  • jack.global-buffer-size โ€” When a client has this option, buffersize changes will be applied globally and permanently for all PipeWire clients using the metadata. ๐ŸŒ
  • jack.passive-links โ€” Makes JACK clients make passive links. This option only works when the server link-factory was configured with the allow.link.passive option. ๐Ÿ”—
  • jack.max-client-ports โ€” Limit the number of allowed ports per client to this value. ๐Ÿšฆ
  • jack.fill-aliases โ€” Automatically set the port alias1 and alias2 on the ports. ๐Ÿท๏ธ
  • jack.writable-input โ€” Makes the input buffers writable. This is the default because some JACK clients write to the input buffer. This however can cause corruption in other clients when they are also reading from the buffer. Set this to true to avoid buffer corruption if you are only dealing with non-buggy clients. ๐Ÿงผ
  • jack.flag-midi2 โ€” Use the new JACK MIDI2 port flag on MIDI2 (UMP) ports. This is disabled by default because most JACK apps don't know about this flag yet and refuse to show the port. Set this to true for applications that know how to handle MIDI2 ports. ๐ŸŽ›๏ธ

๐Ÿ”ฅ MATCH RULES ๐Ÿ”ฅ

jack.rules provides an update-props action that takes an object with properties that are updated on the client and node object of the jack client.

Add a jack.rules section in the config file like this:

# ~/.config/pipewire/jack.conf.d/custom.conf

jack.rules = [
    {
        matches = [
            {
                # all keys must match the value. ! negates. ~ starts regex.
                application.process.binary = "jack_simple_client"
            }
        ]
        actions = {
            update-props = {
                node.latency = 512/48000
            }
        }
    }
    {
        matches = [
            {
                client.name = "catia"
            }
        ]
        actions = {
            update-props = {
                jack.merge-monitor = true
            }
        }
    }
]

Will set the latency of jack_simple_client to 512/48000 and makes Catia see the monitor client merged with the playback client. โœจ

๐ŸŒˆ ENVIRONMENT VARIABLES ๐ŸŒˆ

okay so first: peek at pipewire(1) for the common environment variables โ€” lots of them also apply to JACK client applications. ๐Ÿ’–

These env vars are how you boss around the behavior of the PipeWire JACK client library. ๐Ÿ’…

  • PIPEWIRE_NOJACK, PIPEWIRE_INTERNAL โ€” when either of these is set, the JACK client library will refuse to open a client. The PIPEWIRE_INTERNAL variable is set by the PipeWire main daemon to avoid self connections. ๐Ÿ›‘
  • PIPEWIRE_PROPS โ€” adds/overrides the properties specified in the jack.conf file. check out the output of this:
> PIPEWIRE_PROPS='{ jack.short-name=true jack.merge-monitor=true }' jack_lsp
...
HDA Intel PCH:playback_FL
HDA Intel PCH:monitor_FL
HDA Intel PCH:playback_FR
HDA Intel PCH:monitor_FR
...
  • PIPEWIRE_LATENCY โ€” a quick way to configure the maximum buffer-size for a client. It will run this client with the specified buffer-size (or smaller). ๐Ÿงš
PIPEWIRE_LATENCY=<samples>/<rate> <application>

PIPEWIRE_LATENCY=256/48000 jack_lsp is equivalent to PIPEWIRE_PROPS='{ node.latency=256/48000 }' jack_lsp.

A better way to start a jack session in a specific buffer-size is to force it with:

pw-metadata -n settings 0 clock.force-quantum <quantum>

This always works immediately and the buffer size will not change until the quantum is changed back to 0. ๐Ÿ”ฅ

  • PIPEWIRE_RATE โ€” a quick way to configure the rate of the graph. It will try to switch the samplerate of the graph. This can usually only be done when the graph is idle and the rate is part of the allowed sample rates. ๐ŸŒธ
PIPEWIRE_RATE=1/<rate> <application>

PIPEWIRE_RATE=1/48000 jack_lsp is equivalent to PIPEWIRE_PROPS='{ node.rate=1/48000 }' jack_lsp.

A better way to start a jack session in a specific rate is to force the rate with:

pw-metadata -n settings 0 clock.force-rate <rate>

This always works and the samplerate does not need to be in the allowed rates. The rate will also not change until it is set back to 0. โœจ

  • PIPEWIRE_QUANTUM โ€” is similar to using PIPEWIRE_LATENCY=<buffersize>/<rate> and PIPEWIRE_RATE=1/<rate> (see above), except that it is not just a suggestion but it actively forces the graph to change the rate and quantum. It can be used to set both a buffersize and samplerate at the same time. ๐Ÿ‘‘
PIPEWIRE_QUANTUM=<buffersize>/<rate> <application>

When 2 applications force a quantum, the last one wins. When the winning app is stopped, the quantum of the previous app is restored. ๐Ÿซถ

  • PIPEWIRE_LINK_PASSIVE โ€” make this client create passive links only. All links created by the client will be marked passive and will not keep the sink/source busy. ๐Ÿ’…
PIPEWIRE_LINK_PASSIVE=true qjackctl

You can use this to link filters to devices. When there is no client connected to the filter, only passive links remain between the filter and the device and the device will become idle and suspended. ๐Ÿ˜ด

  • PIPEWIRE_NODE โ€” will sort the ports so that only the ports of the node with <id> are listed. You can use this to force an application to only deal with the ports of a certain node, for example when auto connecting. ๐ŸŽฏ
PIPEWIRE_NODE=<id> <application>

๐Ÿ‘‘ AUTHORS ๐Ÿ‘‘

The PipeWire Developers โ€” issues live at https://gitlab.freedesktop.org/pipewire/pipewire/issues; PipeWire is available from https://pipewire.org. ๐Ÿซถ

๐Ÿ”— SEE ALSO ๐Ÿ”—


โœจ and thatโ€™s the whole page, bestie โ€” source/version vibes: PipeWire 1.6.8, manual page pipewire-jack.conf(5). byeee ๐Ÿ’…๐ŸŽ€

๐Ÿ“ฆ where this page comes from