If you want to change the volume in Ubuntu 11.10 it seems that amixer
is kind of bugged when it comes to toggle (mute/unmute). When
toggling Master, it also mutes all the separate groups (Front,
headphone, PCM and so on), but when toggled again it only unmutes
Master, which leaves the rest muted…
was written by Jim Hunziker on this page:
http://askubuntu.com/a/71551/42842 1) Make a volumetoggle.sh with the following content:
#!/bin/bash CURRENT_STATE=`amixer get Master | egrep 'Playback.*?[o' | egrep -o '[o.+]'|head -n 1`if [[ $CURRENT_STATE == '[on]' ]]; then amixer set Master muteelse amixer set Master unmute amixer set Front unmute amixer set Headphone unmute amixer set PCM unmutefi