Sound Problems VBox 2.2.4/Ubuntu 9.04

Discussions related to using VirtualBox on Linux hosts.
Post Reply
sthames
Posts: 1
Joined: 9. Jun 2009, 00:07
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows XP

Sound Problems VBox 2.2.4/Ubuntu 9.04

Post 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?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Sound Problems VBox 2.2.4/Ubuntu 9.04

Post 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.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Sound Problems VBox 2.2.4/Ubuntu 9.04

Post 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.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
chrispitude
Posts: 42
Joined: 2. Jan 2009, 14:22

Re: Sound Problems VBox 2.2.4/Ubuntu 9.04

Post 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
chrispitude
Posts: 42
Joined: 2. Jan 2009, 14:22

Re: Sound Problems VBox 2.2.4/Ubuntu 9.04

Post 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
nasa01
Posts: 4
Joined: 28. Feb 2009, 22:46

Re: Sound Problems VBox 2.2.4/Ubuntu 9.04

Post by nasa01 »

Hi,

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

Thanks

Nasa
chrispitude
Posts: 42
Joined: 2. Jan 2009, 14:22

Re: Sound Problems VBox 2.2.4/Ubuntu 9.04

Post 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
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Sound Problems VBox 2.2.4/Ubuntu 9.04

Post 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).
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Post Reply