I was looking for a method to adjust volume from the command line and found this bit in the Arch wiki article for Spotify.
$ pactl set-sink-input-volume "$current_sink_num" +1% #volume up by 1%
$ pactl set-sink-input-volume "$current_sink_num" -1% #volume down by 1%
$ pactl set-sink-input-mute "$current_sink_num" toggle #mute toggler
So I identified the sink device and tried it with
pactl set-sink-input-mute "118" toggle
This muted the audio, however, it does not toggle it because repeating the command does not unmute the audio. In fact, I am now stuck with no audio. I have tried removing & reinstalling both pulse and pipewire and their related packages, which have not helped.
I have also tried this little bit which should have done the same thing, to no success.
pactl list sinks | grep -q Mute:.no && pactl set-sink-mute 0 1 || pactl set-sink-mute 0 0
In addition, it does not seem like it’s still muted (despite there being no audio coming out):
Sink Input #118
Driver: PipeWire
Owner Module: n/a
Client: 119
Sink: 42
Sample Specification: float32le 2ch 44100Hz
Channel Map: front-left,front-right
Format: pcm, format.sample_format = "\"float32le\"" format.rate =
"44100" format.channels = "2" format.channel_map = "\"front-left,front-right\""
Corked: yes
Mute: no
Volume: front-left: 43253 / 66% / -10.83 dB, front-right: 43253
/ 66% / -10.83 dB
balance 0.00
Buffer Latency: 0 usec
Sink Latency: 0 usec
Resample method: PipeWire
Any ideas?