pipewire-client.conf(5)

πŸ’– pipewire-client.conf(5) β€” your client.conf bestie guide πŸ’–

okay so real talk, this is the manual for <pink>pipewire-client.conf(5)</pink>, aka the client.conf file. it's giving "configuration for PipeWire native clients" and honestly? iconic. let me walk you through it fr fr.


✨ NAME ✨

pipewire-client.conf β€” it's literally client.conf, no cap πŸŽ€

🌸 SYNOPSIS 🌸

the way these paths are laid out, bestie β€” here's where this file lives:

$XDG_CONFIG_HOME/pipewire/client.conf

/etc/pipewire/client.conf

/usr/share/pipewire/client.conf

/usr/share/pipewire/client.conf.d/

/etc/pipewire/client.conf.d/

$XDG_CONFIG_HOME/pipewire/client.conf.d/

like, pick your fighter πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

so this is the PipeWire client configuration file, periodt.

it's the config for PipeWire native clients and for PipeWire's ALSA plugin. a PipeWire native client program selects the default config to load, and if nothing is specified, it usually loads client.conf. simple as that ✨

the configuration file format and lookup logic is the same as for pipewire.conf(5) β€” so if you already know that one, you're lowkey set.

drop-in configuration files client.conf.d/*.conf can be used, and are recommended. see pipewire.conf(5) for the deets 🫢

🧚 CONFIGURATION FILE SECTIONS 🧚

here's the section lineup, no skips:

  • stream.properties β€” configures options for native client streams. the main character of stream config ngl.
  • stream.rules β€” configures rules for native client streams.
  • alsa.properties β€” ALSA client configuration. yes queen.
  • alsa.rules β€” ALSA client match rules.

in addition, the PipeWire context configuration sections may also be specified β€” see pipewire.conf(5) for the full tea β˜•

πŸ’œ STREAM PROPERTIES πŸ’œ

the client configuration files contain a stream.properties section that configures the options for client streams. here's the whole vibe:

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

stream.properties = {
    #node.latency = 1024/48000
    #node.autoconnect = true
    #resample.disable = false
    #resample.quality = 4
    #resample.window = exp # blackman kaiser
    #resample.cutoff = 0.0
    #resample.n-taps = 0
    #resample.param.exp.A = 0.0
    #resample.param.blackman.alpha = 0.0
    #resample.param.kaiser.alpha = 0.0
    #resample.param.kaiser.stopband-attenuation = 0.0
    #resample.param.kaiser.transition-bandwidth = 0.0
    #monitor.channel-volumes = false
    #channelmix.disable = false
    #channelmix.min-volume = 0.0
    #channelmix.max-volume = 10.0
    #channelmix.normalize = false
    #channelmix.lock-volume = false
    #channelmix.mix-lfe = true
    #channelmix.upmix = true
    #channelmix.upmix-method = psd  # none, simple
    #channelmix.lfe-cutoff = 150.0
    #channelmix.fc-cutoff  = 12000.0
    #channelmix.rear-delay = 12.0
    #channelmix.stereo-widen = 0.0
    #channelmix.hilbert-taps = 0
    #dither.noise = 0
    #dither.method = none # rectangular, triangular, triangular-hf, wannamaker3, shaped5
    #debug.wav-path = ""
}

some of the properties refer to different aspects of the stream, bestie β€” here's the breakdown:

  • general stream properties to identify the stream.
  • general stream properties to classify the stream.
  • how it is going to be scheduled by the graph.
  • how it is going to be linked by the session manager.
  • how the internal processing will be done.
  • properties to configure the media format.

a list of object properties that can be applied to streams can be found in pipewire-props(7) Common Node Properties and pipewire-props(7) Audio Adapter Properties πŸ”₯

πŸŽ€ STREAM RULES πŸŽ€

you can add match rules β€” see pipewire(1) to set properties for certain streams and filters. yes bestie, we're doing rules now πŸ’…

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

add a stream.rules or filter.rules section in the config file like this:

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

stream.rules = [
    {
        matches = [
            {
                # all keys must match the value. ! negates. ~ starts regex.
                application.process.binary = "firefox"
            }
        ]
        actions = {
            update-props = {
                node.name = "My Name"
            }
        }
    }
]

will set the node.name of Firefox to "My Name". slay πŸ’€

🌈 ALSA CLIENT PROPERTIES 🌈

an alsa.properties section can be added to configure client applications that connect via the PipeWire ALSA plugin. okay so:

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

alsa.properties = {
    #alsa.deny = false
    #alsa.format = 0
    #alsa.rate = 0
    #alsa.channels = 0
    #alsa.period-bytes = 0
    #alsa.buffer-bytes = 0
    #alsa.volume-method = cubic         # linear, cubic
}

and here's what each one does, no cap:

  • alsa.deny β€” denies ALSA access for the client. useful in rules or PIPEWIRE_ALSA environment variable. it's giving "you shall not pass" πŸ™ˆ
  • alsa.format β€” the ALSA format to use for the client. this is an ALSA format name. default 0, which is to allow all formats.
  • alsa.rate β€” the samplerate to use for the client. the default is 0, which is to allow all rates.
  • alsa.channels β€” the number of channels for the client. the default is 0, which is to allow any number of channels.
  • alsa.period-bytes β€” the number of bytes per period. the default is 0 which is to allow any number of period bytes.
  • alsa.buffer-bytes β€” the number of bytes in the alsa buffer. the default is 0, which is to allow any number of bytes.
  • alsa.volume-method = cubic | linear β€” this controls the volume curve used on the ALSA mixer. possible values are cubic and linear. the default is to use cubic.

⭐ ALSA CLIENT RULES ⭐

it is possible to set ALSA client specific properties by using match rules β€” see pipewire(1). you can set any of the above ALSA properties or any of the stream.properties. icon behavior honestly ✨

πŸ“ Example πŸ“

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

alsa.rules = [
    {   matches = [ { application.process.binary = "resolve" } ]
        actions = {
            update-props = {
                alsa.buffer-bytes = 131072
            }
        }
    }
]

πŸ’… ENVIRONMENT VARIABLES πŸ’…

see pipewire(1) for common environment variables. many of these also apply to client applications. the environment variables also influence ALSA applications that are using PipeWire's ALSA plugin β€” so yes, they matter bestie 🫢

  • PIPEWIRE_ALSA β€” this can be an object with properties from alsa.properties or stream.properties that will be used to construct the client and streams.

for example:

PIPEWIRE_ALSA='{ alsa.buffer-bytes=16384 node.name=foo }' aplay ...

starts aplay with custom properties. cute.

  • PIPEWIRE_NODE β€” instructs the ALSA client to link to a particular sink or source object.serial or node.name.

for example:

PIPEWIRE_NODE=alsa_output.pci-0000_00_1b.0.analog-stereo aplay ...

makes aplay play on the give audio sink. (yes, the original says "give" β€” keeping that exactly as-is, no edits πŸ™ˆ)

πŸ‘‘ AUTHORS πŸ‘‘

the PipeWire Developers <https://gitlab.freedesktop.org/pipewire/pipewire/issues>; PipeWire is available from <https://pipewire.org>

🌟 SEE ALSO 🌟

libpipewire-module-protocol-pulse(7), pipewire.conf(5), pipewire-pulse(1), pipewire-pulse-modules(7)


okay bestie, that's the whole thing β€” literally every flag and path and property, none skipped πŸ’– this manual page is from PipeWire 1.6.8 and ngl it ate. go configure your streams and slay βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from