I wanted to be able to change the volume of a sink from the terminal. I had been using mate-volume-control, but it was annoying to have to open that gui every time I wanted to change the volume. I had also previously been using mate-volume-control to toggle output sources (speaker/headphones). The headphones are on /dev/dsp3 - which I knew from the mate-volume-control.
I began by trying to use pactl, which seemed to be the most obvious choice. I identified the sink using
When I attempted to do this from pactl using the set-sink-volume though, nothing happened. I ran
Then I tried using mixer(8)(). I don't really understand this utility at all. I tried setting each device listed when running
Finally, I found pacmd on some Arch forums and gave that a shot. Running
I really don't know why things worked or didn't work here, but I wanted to bring this up in case anyone else has similar issues. I'd also welcome any explanations or suggestions.
On a sidenote, if I wanted to add history to the pacmd REPL, any recommendations for getting started on that?
I began by trying to use pactl, which seemed to be the most obvious choice. I identified the sink using
pactl list sinks
. The last sink in the last, Sink #3, was the sink I wanted to be using. I saw the volume set on left:right was 100%:100%. I was able to go into mate-volume-control and change the volume to 66%. I ran pactl list sinks
and the volume was now 66%:66%.When I attempted to do this from pactl using the set-sink-volume though, nothing happened. I ran
pactl set-sink-volume 3 10
. Since this is using integers and not percentage, this should have basically reduced the volume to zero. However, nothing happened and listing the sinks again showed that nothing, in fact, had changed.Then I tried using mixer(8)(). I don't really understand this utility at all. I tried setting each device listed when running
mixer
to 10:10 ( mixer vol 10
, etc.). These changes were made and running mixer
again showed that whatever these devices are had been changed to volume 10:10. However, none of this actually affected the volume of the headphones.Finally, I found pacmd on some Arch forums and gave that a shot. Running
pacmd set-sink-volume 3 66000
finally brought the volume of the headphones back to around 100%.I really don't know why things worked or didn't work here, but I wanted to bring this up in case anyone else has similar issues. I'd also welcome any explanations or suggestions.
On a sidenote, if I wanted to add history to the pacmd REPL, any recommendations for getting started on that?