在终端控制 PipeWire 音量(wpctl)

在基于 PipeWire 的系统上,用 wpctl 设置、增减或静音默认音频输出。

Linux音频wpctl 音频控制PipeWire卷低风险
运行 wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.6 设为 60%(用 0.6+ / 0.6- 增减),运行 wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle 切换静音。

01命令

命令
$ wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.6 && wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle

02作用说明

新发行的版本默认使用 PipeWire,其会话管理器 WirePlumber 由 wpctl 控制——它就是 pactl 的替代品。音量范围是 0.0–1.0(设备支持时可到 1.5 过载),wpctl status 会列出所有输出、输入设备和正在发声的应用及其 ID,可以精确控制某个应用或耳机而不只默认设备。加 -l 1.0 可以限制最大音量,避免误按爆音。

03风险

风险低风险
使用条件PipeWire with wpctl (part of wireplumber). On PulseAudio-only systems use pactl instead.
!注意: 如果提示 'no such object',说明 PipeWire/WirePlumber 没在运行——用 systemctl --user status pipewire wireplumber 检查。通过 pipewire-pulse 兼容层 pactl 也能用,但 wpctl 才是原生工具。静音状态是按设备记录的,切换输出设备后记得取消静音。

04撤销

✓无需撤销——该命令不会改变持久状态。

05来源

  • wpctl(1) - a simple command line control for WirePlumber
    Arch Linux Man Pages · community · 2026-09-17
    依据: wpctl set-volume takes a volume between 0.0 and 1.0, supports +/− increments and -l limits; set-mute toggles or sets mute state.
  • WirePlumber documentation
    PipeWire/WirePlumber (freedesktop.org) · community · 2026-09-17
    依据: WirePlumber is the session manager for PipeWire; wpctl is its command-line client for inspecting and controlling audio devices.

最后验证: 2026-09-18 · 分类: 媒体