LinuxCommandLibrary

wpctl

Control WirePlumber objects and settings

TLDR

List all objects managed by WirePlumber

$ wpctl status
copy

Print all properties of an object
$ wpctl inspect [id]
copy

Set an object to be the default in its group
$ wpctl set-default [id]
copy

Get the volume of a sink
$ wpctl get-volume [id]
copy

Set the volume of a sink to n percent
$ wpctl set-volume [id] [n]%
copy

Increase/Decrease the volume of a sink by n percent
$ wpctl set-volume [id] [n]%[+|-]
copy

Increase the volume of a sink by n percent but limit the volume below 100%
$ wpctl set-volume [[-l|--limit]] 1 [id] [n]%-
copy

Mute/Unmute a sink (1 is mute, 0 is unmute)
$ wpctl set-mute [id] [1|0|toggle]
copy

SYNOPSIS

wpctl [OPTIONS] COMMAND [ARGS...]

Where COMMAND can be one of:
  status: Show status of the PipeWire daemon.
  device: Manage PipeWire devices.
  node: Manage PipeWire nodes (e.g., applications, hardware I/O).
  port: Manage PipeWire ports (input/output endpoints of nodes).
  link: Manage links between ports.
  inspect: Inspect properties of a PipeWire object by ID or name.
  set-volume: Set volume of a node.
  set-mute: Mute/unmute a node.
  set-default: Set a default audio sink/source.

PARAMETERS

-h, --help
    Displays help information about wpctl or a specific command.

-v, --version
    Shows the version of the wpctl utility and PipeWire library.

-r, --remote=NAME
    Connects to a specific PipeWire instance identified by NAME, if multiple instances are running.

-l, --list-actions
    Lists all available commands (actions) that wpctl supports, along with brief descriptions.

DESCRIPTION

wpctl is the primary command-line interface for interacting with the PipeWire media server. It allows users to manage and monitor various aspects of the PipeWire graph, including audio and video devices, nodes, ports, and links. With wpctl, you can view the status of the PipeWire daemon, list available devices, control their volume and mute states, inspect properties of any object in the graph, and manage connections (links) between different audio/video streams. It serves as a unified tool to replace functionalities previously covered by separate utilities in PulseAudio (like pactl) and JACK (like jack_lsp), providing a modern, consistent way to manage your system's multimedia routing and processing.

CAVEATS

wpctl relies on the PipeWire daemon being actively running. If the daemon is not running or the user lacks appropriate permissions to communicate with it, commands will fail. While powerful for monitoring and basic control, advanced graph manipulation or intricate routing might still benefit from GUI tools or direct API interaction. The command's output is primarily human-readable text, which may require parsing for scripting purposes.

COMMON USE CASES

wpctl is frequently used for:
    • Checking System Status: Use wpctl status to quickly see if PipeWire is running, active nodes, and errors.
    • Listing Devices/Nodes: wpctl device list and wpctl node list provide overviews of hardware and software components.
    • Controlling Volume/Mute: wpctl set-volume <id> <volume> and wpctl set-mute <id> <0|1> are essential for managing audio levels.
    • Switching Defaults: wpctl set-default <id> allows changing default audio input/output devices.
    • Inspecting Objects: wpctl inspect <id> is invaluable for debugging and understanding object properties.

HISTORY

wpctl's history is intrinsically linked to the development of PipeWire itself. Introduced as the primary command-line interface for the PipeWire media server, it emerged to offer a unified control mechanism, aiming to replace disparate tools like pactl (for PulseAudio) and jack_lsp (for JACK). Its development paralleled PipeWire's increasing adoption as the default sound server on many Linux distributions, providing a modern, consistent, and powerful way to manage audio and video streams from the terminal, addressing limitations of older systems.

SEE ALSO

pw-link(1), pw-dump(1), pactl(1), jack_lsp(1)

Copied to clipboard