**PipeWire** only *provides* the functionality for transporting and transforming audio and video. It is *used* by a session manager.
There is one PipeWire *server* which is used by a number of PipeWire *clients* (the processes that produce/consume multimedia).
PipeWire, as well as WirePlumber, run in *userspace,* so interfacing with them with `systemd` (and `journald` etc.)
happens in *user context* with the `--user` flag, for example
`systemctl --user status pipewire.service` or `journalctl --user -fu wireplumber.service`.
**WirePlumber** provides [Session Management](https://pipewire.pages.freedesktop.org/wireplumber/design/understanding_session_management.html): It enables new devices when they appear on ALSA, creates and configures nodes,
create links between nodes to route sound from an application to a consumer, etc.
### Terminology
For a more technical description, see \ref page_overview.
* **Nodes** produce and/or consume data, for example a stereo output to a headset (consumes), an audio player (produces),
a reverb effect filter (consumes, then produces modified audio), etc.
* **Ports** are the connectors on nodes where data enters or exits. A stereo output sound card has two input ports
typically labeled `FL` and `FR` for front left and front right, which may receive data from `vlc` which has
two output ports `FL` and `FR`. (Physically, the sound card can have a stereo jack output, for example, but that is not in the scope of PipeWire.)
* **Links** connect two ports. Audio/Video data only flows when there is a link between ports.
Ports can have multiple incoming/outgoing links, so PipeWire can e.g. send the same `vlc` audio stream to the stereo headset
and a bluetooth headset and an audio recorder.
* **Devices** represent e.g. ALSA PCM sound cards. They have *Profiles*, and the active profile defines properties
like channel setup. For example, a sound card can have a `stereo` profile where only two ports are exposed,
or a `surround7.1` profile with 8 ports available.
Nodes have various properties like name/description, a vendor (if available), an ID (changes between restart, therefore use `node.name` or `device.name`), etc.
Some specific properties:
*`media.class` describes the type of the node. A sound card (a *device* in PipeWire) has media class `Audio/Device`
with corresponding `Audio/Source` input and `Audio/Sink` output nodes. A process producing audio is `Stream/Output/Audio`.
Relationships between different object types (`type` property):
* [List of PipeWire programs](https://docs.pipewire.org/page_programs.html)
This is just a short selection of tools.
[qpwgraph](https://gitlab.freedesktop.org/rncbc/qpwgraph) gives a quick visual overview over the current system configuration with nodes and links between them.
It also allows creating and deleting links on the fly.
`pw-dump` dumps the whole configuration (json dump all, nodes etc)
`pw-cli` allows to query and configure PipeWire, for example setting a sound card profile with
`pw-cli s Profile CARD_ID '{index: PROFILE_ID, save: true}'`, or in interactive mode.
*Important:* In interactive mode, do *not* use quotes around JSON data.
`wpctl` interfaces with WirePlumber, for example `wpctl status` shows an ASCII representation of the nodes, sources, sinks, and routing.
### WirePlumber
WirePlumber creates links based on defaults and priorities as described in [Linking Policy](https://pipewire.pages.freedesktop.org/wireplumber/policies/linking.html).
For example, when an application starts audio playback, it links to the default sound output like the Bluetooth headset.
If that output disappears, it dynamically chooses the next suitable output device.
**WirePlumber configuration** configures general WirePlumber aspects (should it even bring up ALSA devices
or save/restore user settings configured with e.g. `pavucontrol`) and also ALSA/Bluetooth monitor aspects
(choosing a default profile like Stereo or 7.1, setting device priorities that affect default routing, setting device properties, etc.).
* Location: `wireplumber.conf`, e.g. `~/.config/wireplumber/wireplumber.conf.d/`
* Docs: [WirePlumber daemon configuration](https://pipewire.pages.freedesktop.org/wireplumber/daemon/configuration.html) and more like [ALSA configuration](https://pipewire.pages.freedesktop.org/wireplumber/daemon/configuration/alsa.html)
Rules can use regular expression when strings start with `~`, as explained in [PipeWire: Working with rules](https://pipewire.pages.freedesktop.org/wireplumber/daemon/configuration/modifying_configuration.html#working-with-rules).
```text
# Goes to ~/.config/wireplumber/wireplumber.conf.d/wireplumber-default-device.conf
# Restart wireplumber.service so it loads the rules
# This sample rule increases the priority of the stereo output on a Raspberry Pi,