VirtualBox is blocking audio

Bug #202957 reported by Roberto Cássio Jr.
12
Affects Status Importance Assigned to Milestone
PulseAudio
New
Undecided
Unassigned
virtualbox-ose (Ubuntu)
Invalid
Low
Unassigned

Bug Description

Binary package hint: virtualbox-ose

While running VirtualBox under Ubuntu Hardy, I can't hear sounds, like Rhythmbox playing songs or gnome's sounds. I'm not sure, but looks like VirtualBox is blocking PulseAudio.

Is it possible to change VirtualBox package in a way that it uses pulseaudio (or one of the PulseAudio's alsa emulated devices) by default, so this thing is fixed?

Revision history for this message
Roberto Cássio Jr. (rcsdnj) wrote :

Ok, I think it was kind of my fault. I noticed that current VirtualBox version has an option, per Virtual Machine, which allows to select the Audio Device. It was set to Alsa and I changed to PulseAudio, now it seems fine.

But, anyway, isn't this supposed to work without conflicts even if the output was set to Alsa? PulseAudio doesn't emulate for multiple alsa devices?

Revision history for this message
Matthew Nuzum (newz) wrote :

I'm having what appears to be the same problem.

When I open a virtualbox virtual machine (such as Win XP) that has sound enabled using the PulseAudio driver then sound stops working on the host. If I close virtualbox the sound still does not work. Only a reboot restores the sound.

Revision history for this message
Roberto Cássio Jr. (rcsdnj) wrote : Re: [Bug 202957] Re: VirtualBox is blocking audio

Matthew, does the sound stop working for all programs including the
pulse-audio ones (like Totem, gnome sounds, etc.) or only for the ones not
using pulseaudio (alsa-based, like Skype, wine, etc.)?

On Thu, Mar 27, 2008 at 1:51 PM, Matthew Nuzum <email address hidden>
wrote:

> I'm having what appears to be the same problem.
>
> When I open a virtualbox virtual machine (such as Win XP) that has sound
> enabled using the PulseAudio driver then sound stops working on the
> host. If I close virtualbox the sound still does not work. Only a reboot
> restores the sound.
>
> --
> VirtualBox is blocking audio
> https://bugs.launchpad.net/bugs/202957
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Matthew Nuzum (newz) wrote :

I don't know of any programs I use that don't use pulse. I don't use wine or skype.

Additionally it appears the computer has a hard time shutting down to reboot and rhythmbox doesn't work properly (hitting the play button produces no sound, hitting it again causes it to go gray.

Revision history for this message
John Pham (jhnphm) wrote :

I also have this problem.

Revision history for this message
Asif Youssuff (yoasif) wrote :

I am also having this problem. I'm on 2.6.24-16-generic #1 SMP Thu Apr 10 12:47:45 UTC 2008 x86_64 GNU/Linux

What can I submit to help out?

Revision history for this message
Jason Houston (jason-houston) wrote :

I'm having this problem as well. However, sound is returned to the host when I exit VirtualBox.

Revision history for this message
shooi (phil-shooi) wrote :

Hi,
I'm having this problem too. I'm running WinXP under Virtualbox. Latest Hardy release - 2.6.24-17-generic.

Virtualbox is using ALSA Audio Driver. Movie Player (Xine backend) and Rhythmbox don't play sound (Rhythmbox doesn't even pretend it's playing - audio file time just stays on 0:00, Movie Player tries to play some video, but then just gives up).
Just fired up Skype and that runs just fine! As with everyone else, if there's anything I can do to provide more info, just let me know (but you'll have to be very detailed - I'm still a Linux newbie!)

Revision history for this message
Fabian Hirschmann (fhirschmann) wrote :

I'm having this problem as well.

When setting VirtualBox to use alsa, all pulseaudio applications stop working, but alsa applications are still fine.
On the other hand, having VBox use pulseaudio causes all all alsa applications to stop working, but pulseaudio apps still work fine.
In either way, /dev/dsp is busy at all times.

After shutting down VirtualBox, everything returns to normal operation.

Daniel T Chen (crimsun)
Changed in virtualbox-ose:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
benste (benste) wrote :

PulseAudio seems to lock Alsa and OSS for it's own purpose.
But this would be ok if all OSS and ALSA apps would have a Pulseaudio option like Virtualbox.

it may be better to continue in one bug:

https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/228487

Changed in virtualbox-ose:
status: Confirmed → Invalid
Revision history for this message
Zack Evans (zevans23) wrote :

I'm not sure this is a valid duplicate. I just posted to 228487 as requested but I think we may have something specific going on with VirtualBox here. 228487 is more about PulseAudio troubleshooting in general.

I am on 2.1.4 and I have it set to use PulseAudio. When I boot the VM the application appears in pavucontrol as you would expect, so it's clearly using Pulse, and I do get audio.

And yet when I boot the VM, Amarok -> xine -> PulseAudio stops working. Yes, I am sure Amarok is using PulseAudio and not ALSA. So I think VirtualBox is trying to do something that PulseAudio does not like; now we just have to work out whether VirtualBox or PulseAudio is the problem.

Worth noting that when I shutdown the virtual box I SOMETIMES get sound back; sometimes I have to force-reload ALSA to get sound back, even for other PulseAudio apps.

@shooi: We'd need to know which version of skype you're using, exact package, since there are several variants and they all do audio differently.

@Matthew Nuzum: You might not need to reboot, try "alsa force-reload" at the prompt, and then you'll probably also need to kill and restart the pulseaudio daemon.

Revision history for this message
Shailendra (shail-haina06) wrote :

Previously i was using gusty(ubuntu 7.10), a few days back i moved to ubuntu 8.10.(both on virtualbox)
I enabled sound from virtualbox settings, when it was gusty everthing worked fine.
But now on ibex(ubuntu 8.10) it don't matter which driver i choose from virtualbox settings the sound do not come!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.