3

I need to deploy linux ubuntu servers (no desktop) with the ability to play audio files from command line. After installing the ubuntu 12.04 server edition I installed:

sudo apt-get install libasound2
sudo apt-get install alsa-utils
sudo apt-get install mplayer

and then added my user to the audio group

sudo usermod -a -G audio myusername

After these operations I opened amixer and did rise all outputs to 100% on. The problem is that I still cannot have any audio output. I know for sure that the audio card works since when I run lubuntu live 12.04 on the same pc I can hear the audio output. Does anybody know what I'm missing to have the server edition play audio files?

EDIT: Well I found out the problem was the "Simple mixer control 'PCM',0" was off and this was the reason why the audio was not working. The command

amixer -c 0 set 'PCM' 90% on

did solve my problem. Well at least I think in this post there are all the command needed to activate audio on an ubuntu server. To display the current audio levels just type

amixer

and finally, after 'PCM', it is important to check that 'Master' is 100% on:

amixer -c 0 set Master 100% on
giuspen
  • 139
  • 1
  • 5

1 Answers1

1

I recently had a similar issue on my Ubuntu 12.04 system. Clearly sound was working on the system since I had no issues with games and mpg123, but I was unable to get any audio output from mplayer. I solved it in this simple way:

sudo apt-get install mplayer2