Page 1 of 1

VB 5.0.4 - Debian has no sound

Posted: 25. Sep 2015, 22:05
by Josvds
I have installed debian inside VirtualBox 5.0.4 with the following audio settings:
- Enabled: Yes
- Host Audio Driver: Windows DirectSound
- Audio Controller: ICH AC97

Debian has no user interface, so only console.
I have installed alsa-base, alsa-utils, pulseaudio.
I have started alsamixer and set master and PCM to 100%.

I have used mocp and mpg123 to try to play a mp3 but no sound.

I have installed ubuntu inside the same VirtualBox with the same audio settings.
Inside ubuntu the audio works perfectly.

Re: VB 5.0.4 - Debian has no sound

Posted: 26. Sep 2015, 00:36
by Porsche_maniak
are you using hdmi cable ?

Re: VB 5.0.4 - Debian has no sound

Posted: 26. Sep 2015, 10:59
by Josvds
Porsche_maniak wrote:are you using hdmi cable ?
No, the system i`m working on has a Creative network card which is connected to a 7.1 audio system.

After installing ubuntu, the sound works fine.
After installing debian without UI, the sound didn`t work.
No i have installed a new virtual system with debian with UI even there is no sound available.

Re: VB 5.0.4 - Debian has no sound

Posted: 26. Sep 2015, 12:30
by Josvds
I don`t get it, i have played with some settings in debian en virtualbox at once the sound did work.

What did i change:
- Tried all audio-controllers in virtualbox (ICH-AC97, SoundBlaster 16, Intel HD Audio) but at the end it worked with ICH-A97.
- Installed guest additions again
- Alsamixer with F6 changed default audio and volume up

But i have reverted the system to check what did solve the problem. After reproducing all the steps, still nog sound.

Re: VB 5.0.4 - Debian has no sound

Posted: 27. Sep 2015, 14:14
by loukingjr
FWIW, I'm running Debian 8.1 Cinnamon as a guest. I had to run alsamixer as well. When you select the sound card are you selecting the sound card or are you selecting "Default"? Default won't work.

When you say you "reverted the system" do you mean back to no GUI? Perhaps it's needed for the audio to work?

Re: VB 5.0.4 - Debian has no sound

Posted: 27. Sep 2015, 14:18
by Josvds
I did figure it out,, the problem was 'codec="AD1980"' setting inside *.vbox file.

Solution:

1. I have a clean installation of debian.

2. After this i have installed alse
# apt-get install libasound2 alsa-base alsa-utils alsa-oss

3. After this i have given root audio permissions
# adduser root audio

4. Shutdown the machine

5. Closed VirtualBox complete

6. Changed the *.vbox file
from: <AudioAdapter controller="AC97" codec="AD1980" driver="DirectSound" enabled="true"/>
to: <AudioAdapter controller="AC97" driver="DirectSound" enabled="true"/>

7. Started the machine

8. Initialized alsa
# alsactl init

9. Test audio with audio samples of alsa self
# aplay /usr/share/sounds/alsa/Noise.wav

Re: VB 5.0.4 - Debian has no sound

Posted: 27. Sep 2015, 14:21
by Josvds
loukingjr wrote:FWIW, I'm running Debian 8.1 Cinnamon as a guest. I had to run alsamixer as well. When you select the sound card are you selecting the sound card or are you selecting "Default"? Default won't work.

When you say you "reverted the system" do you mean back to no GUI? Perhaps it's needed for the audio to work?
Thanks for the response..
I make snapshots after i make changes to the system..
So i can install, remove, etc. to try some solutions.
After i figured out what did help, i revert to a previous snapshot and try it again.

Re: VB 5.0.4 - Debian has no sound

Posted: 27. Sep 2015, 14:27
by loukingjr
Sorry, I removed codec="AD1980" from the .vbox file so long ago I had forgotten. It works with most Linux guests I have. Not sure why it doesn't work in Debian.