Page 1 of 1

Sound Problems VBox 2.2.4/Ubuntu 9.04

Posted: 9. Jun 2009, 00:27
by sthames
Sound conflicts between VBox and Ubuntu.

Hardware: HP dv7-1245dx, 4GB memory
OS: Ubuntu 9.04 "Jaunty" 64-bit, all software updates current.
VirtualBox: 2.2.4
Guest OS: Windows XP/SP3, 1.5GB memory, 32MB video memory allocated from VBox

Setting the Host Driver in VirtualBox does the following:

Null Audio Driver:
Good sound in Ubuntu, no sound in Windows.

ALSA Audio Driver:
Sound in Ubuntu, Windows aborts immediately after entering password. No sound.

OSS Audio Driver:
Good sound in Windows, no sound in Ubuntu.

PulseAudio Driver:
Good sound in Ubuntu, Windows takes a long time to load after login and there is no sound. Windows locks up when it is shutdown and VBox has to be killed.


Ideally, it would be great if I could have sound from both OS's. Anyone have any ideas?

Re: Sound Problems VBox 2.2.4/Ubuntu 9.04

Posted: 9. Jun 2009, 00:41
by Perryg
Select the Pulse Audio and once you get Windows open tell it to search for new hardware. You may need to delete the audio driver that it has installed in Windows before it will work properly. If this fails it may be necessary to download and install the realtek.com audio drivers in Windows, the have Windows check its home planet for upgrades.

Re: Sound Problems VBox 2.2.4/Ubuntu 9.04

Posted: 9. Jun 2009, 12:40
by Sasquatch
With pulseaudio on Ubuntu 9.04, the daemon dies because of CPU overload. It's a bug in the dependency libraries of PulseAudio. You can avoid this by editing
/etc/pulse/daemon.conf
and put this in it, or edit the already existing line to match.

Code: Select all

no-cpu-limit = yes
Now PulseAudio won't get killed because of CPU overload and you have sound in the Guest, but it does add additional CPU load, because until the VM is closed, PA will run on 100% on one core all the time. The VM will shut down normally so you don't have to kill it and once the VM is closed, the CPU usage will go down.
For more information on this issue, check https://bugs.launchpad.net/ubuntu/+sour ... bug/373450 which also has a fix, somewhat.

There is an alternative to all this. You can set up PulseAudio on the Guest too. There is a version for Windows. Check their website, www.pulseaudio.org. You can set the VM to use NULL Audio, with the AC'97, install PA and set it to hook itself to the Host PA server. You may need to change a few settings on the Host to accept remote connections.
All audio should then go to the Host.

Re: Sound Problems VBox 2.2.4/Ubuntu 9.04

Posted: 15. Jun 2009, 20:45
by chrispitude
This also happens for me in VBox 2.2.4 with a Fedora Core 11 host. I get the same exact symptoms (ALSA kills the WinXP guest, OSS doesn't work, PulseAudio eventually stops working and the guest hangs on shutdown).

I removed the CPU limit from the pulse config as Sasquatch recommended, and will report back. I'm running a dual-core AMD processor. For what it's worth, I don't see a core getting pegged during audio playback. The box idles along at 1GHz at low CPU usage while the guest is playing music from pandora.com. I'm not sure if this means I'm hitting some other problem or not.

- Chris

Re: Sound Problems VBox 2.2.4/Ubuntu 9.04

Posted: 16. Jun 2009, 14:36
by chrispitude
chrispitude wrote:The box idles along at 1GHz at low CPU usage while the guest is playing music from pandora.com. I'm not sure if this means I'm hitting some other problem or not.
I take this back. Both cores are going full-bore at 2.6GHz just to play back streaming audio from pandora. In Fedora Core 9 with the previous version of Virtualbox, the box did loaf along at 1GHz while using just part of one core.

It sure would be nice to get this fixed. I don't care what sound driver I'm using as long as I don't have to burn 45 watts of CPU power just to have sound.

- Chris

Re: Sound Problems VBox 2.2.4/Ubuntu 9.04

Posted: 3. Jul 2009, 13:40
by nasa01
Hi,

I am running into this issue with Mandriva -- is there any new news on it?

Thanks

Nasa

Re: Sound Problems VBox 2.2.4/Ubuntu 9.04

Posted: 11. Aug 2009, 13:26
by chrispitude
I just upgraded to VirtualBox 3.04, along with some other FC11 package upgrades, and the sound now works properly with no abnormal CPU usage. I think it was the VB upgrade that fixed it. Wonderful work, guys!

- Chris

Re: Sound Problems VBox 2.2.4/Ubuntu 9.04

Posted: 11. Aug 2009, 20:25
by Sasquatch
As I stated before, this is NOT a VB problem, is a problem from PulseAudio. Just open pavucontrol, your CPU will go berserk too. If you all bothered to read the bug report, along with all the replies there, you would see what the cause is exactly, and the fix for it (which is don't run pulse audio 0.9.14).