Stuck with audio on mute

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?

Not sure I don’t use pactl myself. It looks like you used pactl wrong? Maybe try your input ID without quotes? For your second attempt with the grep command in it it looks like you tried to use the default sink. Did you set a default source?

man page example:

set-sink-input-mute INPUT 1|0|toggle

so for you to unmute it should look like this? (not sure if 0 is mute or unmute so if zero doesn’t work try one instead?..)

pactl set-sink-input-mute 118 0

Here’s some additional info that may help with more troubleshooting:

1 Like

Found the muted sink

Sink #47
        State: SUSPENDED
        Name: alsa_output.usb-M-Audio_M-Track_2X2-00.analog-stereo
        Description: M-Track 2X2 Analog Stereo
        Driver: PipeWire
        Sample Specification: s32le 2ch 48000Hz
        Channel Map: front-left,front-right
        Owner Module: 4294967295
        Mute: yes

Unfortunately attempting the commands with 47 returns Failure: No such entity .

edit:

This was quite useful. Targeting the default sink with pactl set-sink-mute @DEFAULT_SINK@ toggle have resolved it. Thanks!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.