You are not logged in.
In my Openbox rc, I have set the mute button on my keyboard to run the command amixer -c 1 set Master toggle. If audio is playing, then running this command in a terminal mutes it as desired. However, it doesn't unmute it.
To identify the problem, I tried the following diff:
amixer -c 1 scontents > before.txt
amixer -c 1 set Master toggle
amixer -c 1 set Master toggle
amixer -c 1 scontents > after.txt
diff before.txt after.txtWhich results in:
18,19c18,19
< Front Left: Playback 115 [91%] [0.00dB] [on]
< Front Right: Playback 115 [91%] [0.00dB] [on]
---
> Front Left: Playback 115 [91%] [0.00dB] [off]
> Front Right: Playback 115 [91%] [0.00dB] [off]
25,26c25,26
< Front Left: Playback 115 [91%] [0.00dB] [on]
< Front Right: Playback 115 [91%] [0.00dB] [on]
---
> Front Left: Playback 115 [91%] [0.00dB] [off]
> Front Right: Playback 115 [91%] [0.00dB] [off]It seems that when audio is playing, toggling mute sets both the mono and stereo channels to off, but when the audio is already muted, toggling only re-enables the mono channels.
Questions:
Is this a bug?
How can I produce the desired muting behavior?
The mute toggle in the pavucontrol-qt GUI works perfectly fine. How can I figure out what command it is using?
Edit: I thought that maybe the solution would be to use something other than Master as the argument as suggested here, but I don't see anything useful in the controls listed in amixer -c 1 scontrols:
Simple mixer control 'Master',0
Simple mixer control 'Headphone',0
Simple mixer control 'Speaker',0
Simple mixer control 'Bass Speaker',0
Simple mixer control 'PCM',0
Simple mixer control 'Mic Boost',0
Simple mixer control 'IEC958',0
Simple mixer control 'IEC958 Default PCM',0
Simple mixer control 'IEC958',1
Simple mixer control 'IEC958',2
Simple mixer control 'IEC958',16
Simple mixer control 'Capture',0
Simple mixer control 'Auto-Mute Mode',0Last edited by zw (2022-06-05 02:54:11)
Offline
By running alsamixer in a terminal and watching how its settings change when I use the mute function from pavucontrol-qt, I was able to determine that the controls that fail to get unmuted are the 'Speaker' and 'Bass Speaker'. Therefore, the following workaround produces a functional command-line toggle:
amixer set 'Speaker' unmute; amixer set 'Bass Speaker' unmute; amixer set 'Master' toggleIt has to be these three commands and in this order: notice how the first two are unmutes and only the last one is a toggle.
I still would like to know if there is a way I can monitor pavucontrol-qt to see what command it uses, and if there is a more elegant solution.
Offline
The mute toggle in the pavucontrol-qt GUI works perfectly fine.
I'd say PA responds to the Master deactivation by muting the speakers.
Solutions:
a) don't use pulseaudio…
b) https://man.archlinux.org/man/extra/lib … _sink_mute
Offline