alsamixer and alsactl — adjust and save alsa mixer settings 

In this entry I will show you how to change ALSA mixer settings using alsamixer and how to save them using alsactl so that the changes remain in place after reboot. First things first, while there are many graphical audio mixer tools, such as kmix, ALSA does come with a neat command based tool for adjusting mixers settings. ALSA mixer is called simply that, alsamixer. It is easy to operate. Simply use the left/right arrow keys to move between devices, and up/down keys (or numeric keys) to adjust their volumes. A screenshot of alsamixer is shown below.

alsamixer

After adjusting the settings for the playback and capture devices, advanced controls for ALSA soundcard driver utility, alsactl, can be used to store them permanently. For the default audio device this can be done as follows.

alsactl store

However, you do have to run the above command as the root user, or the write access to /var/lib/alsa/asound.state will fail with the following error message.

alsactl:
save_state:1280:
Cannot open /var/lib/alsa/asound.state for writing: Permission denied

Thus, run alsactl as root or use sudo.

sudo alsactl store

Further information on both ALSA mixer and device control utility can be found in the man pages.

man alsamixer
man alsactl

Did you find the above information useful and interesting? If so, please support this site by using the blog directory links at the bottom of this page. Thanks for your support!

If you have any Linux related problems or questions then please feel free to post them on our Linux Forums: http://linux.dsplabs.com.au/forums.




VPS Hosting Referral Code DZZCC3

Add me to Technorati Favorites Vote for me on Blog Catalog

10 Responses to “alsamixer and alsactl — adjust and save alsa mixer settings”

  1. Pierre243 Says:

    I was looking for the way to adjust left and right channels separately. Unfortunately, I did not find it on this nice site, sorry !

  2. Kamil Says:

    Hi Pierre, to adjust left and right channels separately run:

    alsamixer

    then select a channel that allows for separate control of left and right channels… f.e. in the above picture PCM does allow since it has a label 45<>45 written underneath it: that is, the left volume is 45 and right volume is 45, the Master channel also allows for this as it has the label 81<>81. On the other hand the Master M channel only has a single number (volume) as label: 81 i.e. you can only control both channels at the same time or that particular device only has one channel.

    OK, that was a bit of explaining, hope you can correlate the above description with the screenshot of alsamixer at the top of this post!

    Now,
    to adjust the volume up on the left channel press Q
    to adjust the volume up on the right channel press E
    to adjust the volume down on the left channel press Z or Y
    to adjust the volume down on the right channel press C

    See for instance the Front channel below, it has loud (red) left channel volume of 90 and quite (white) right channel volume of 17:

    Alsamixer left / right channel control

  3. S010 Says:

    Ah, thanks! I was getting irritated, having to set everything up over and over every time I reboot x)

  4. shaun Says:

    Thanks ;) so easy to save the settings, i thought it was going to be a mission ;)

  5. Luke Says:

    I love you!! Finally I have sound in XBMC. FYI for anyone else with the same issue, you need to unmute SPDIF for sound to work over HDMI with video :-)

  6. foca Says:

    tnx works :)

  7. karatsin Says:

    Thank you so much for this little save command. I had been manually going into alsamixer every time I booted up and changing the default clock from 44800 to 44100. Very much appreciated!

  8. Himanshu Says:

    Hi.. i tried to save the mixer settings using this method but it didnt work for me unfortunatily. i m using 9.1 version. idesprately needhelp on this one . are there any other methods???? thnkx…

  9. Steph Says:

    Thanks loads of this, was getting fed up of having to run aslamixer every time I rebooted so the mic would work in Skype.. now its saved!

  10. Dale Says:

    I can't get sound out or recording in over the mic - is there a tutorial for command line only troubleshooting?

Leave a Reply