18

I'm running 14.04, and I was told I could use amixer to control volume via the command line. For example, to mute sound you would use

amixer set Master mute

The output for me is

amixer: Unable to find simple control 'Master',0 

So I did some man reading and found out I needed to replace Master with the name of my laptop's mixer control. Typing amixer returns:

Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]

So naturally, I enter amixer set IEC958 mute but all I get is

Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [off]

Once again. I've tried sset and some other commands but every single one returns the same text. Also, why is there no "Master" or "Speaker" controls? Is there something I'm doing wrong?

4 Answers 4

31

If you want to use amixer to control the volume, this should work in a terminal:

amixer -D pulse sset Master 0%

(0% to mute or use any percentage you like)

To reduce/increase the volume, you can add - or + after % (but that doesn't work to increase the sound beyond 100%).

2
  • 3
    Thank you a lot. It works also with amixer -D pulse set Master mute Nov 23, 2015 at 10:33
  • 2
    Why do we supply pulse as a parameter in amixer command?I have noticed if I doesn't supply pulse parameter to amixer command it doesn't work and throws error.
    – Udesh
    Dec 21, 2021 at 4:09
3

I have found 3 useful commands:

amixer -D pulse sset Master 5%-

amixer -D pulse sset Master 5%+

amixer -D pulse sset Master toogle

Other 2 commands:

amixer -D pulse sset Master mute

amixer -D pulse sset Master unmute

2
  • 1
    this worked for me thanks!
    – Prakhar
    May 9, 2021 at 4:55
  • 1
    no need for pulse for me. The trick was to do 5%+ and not +5% (which sounds more natural, pun intended). Now looking back at the manual page, I can read indeed that When plus(+) or minus(-) letter is *appended* after volume value, the volume is incremented or decremented from the current value, respectively.. Emphasis mine.
    – ychaouche
    Feb 22, 2022 at 10:57
3

might be possible you use the wrong card. make sure you use the right card. If you have attached a webcam with mic for example, then it might eat the first slot ;-)

list all cards first:

cat /proc/asound/cards

for me itlooks like:

 0 [Webcam         ]: USB-Audio - Philips SPC 1030NC Webcam
                      Philips CE Philips SPC 1030NC Webcam at usb-orion-ehci.0-1.2, high speed
 1 [Audio          ]: USB-Audio - USB Audio
                      USB Audio at usb-orion-ehci.0-1.5.7, full speed

then chose your card. 1st card would be default -c 0, so if you want to chose the 2. card then do:

amixer -c 1 sset Master +10 

Substitute Master with the found name including the single quotes after the Simple mixer control label in the output.

3
  • I mean (forgot to enter the set): amixer -c 1 set Master 100
    – oktay
    Sep 12, 2015 at 15:43
  • Thanks! I was trying to mute my Webcam mic with no success.
    – dieresys
    Aug 3, 2016 at 18:00
  • 3
    Note the s to list all cards... cat /proc/asound/cards
    – ow3n
    Dec 16, 2019 at 1:43
0
amixer set IEC958,0 mute

You have to specify your card as shown in the amixer output. Use "unmute" instead of "mute" to turn the sound back on again.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .