VirtualBox

Opened 6 years ago

Last modified 3 years ago

#18594 awaitsfeedback defect

Ubuntu 18.04 (guest) audio stops working (stuck) after Windows 10 (host) sleeps

Reported by: James Fade Owned by:
Component: audio Version: VirtualBox 6.0.6
Keywords: Cc:
Guest type: Linux Host type: Windows

Description

Host: Windows 10 Pro, 1809, 17763.437

Guest: Ubuntu 18.04

VirtualBox: 6.0.6

Sound card: either Intel HD or AC97.

All updates are installed. Guest additions are installed.

Problem: Ubuntu 18.04 (guest) sound works until Windows 10 (host) goes to sleep. For example, you're listening to YouTube music but after suspension the video and sound stucks forever.

Quick dirty workaround: Shutdown virtual machine, then launch again. Hot reboot doesn't work!

Resetting of pulseaudio and alsa inside the guest doesn't work!

sudo killall pulseaudio; sudo alsa force-reload;

Unloading ALSA sound driver modules: snd-hda-codec-idt snd-hda-codec-generic snd-hda-intel snd-hda-codec snd-hda-core snd-hwdep snd-pcm snd-seq-midi snd-seq-midi-event snd-rawmidi snd-seq snd-seq-device snd-timer (failed: modules still loaded: snd-hda-codec-idt snd-hda-codec-generic snd-hda-codec snd-hda-core snd-hwdep snd-pcm snd-timer).
Loading ALSA sound driver modules: snd-hda-codec-idt snd-hda-codec-generic snd-hda-intel snd-hda-codec snd-hda-core snd-hwdep snd-pcm snd-seq-midi snd-seq-midi-event snd-rawmidi snd-seq snd-seq-device snd-timer.

Any action inside the guest doesn't work. Only kill the guest and start again (not hot reboot!).

If audio has been playing during the getting sleep, then after system wakes up the 1 second of sound will be repeated infinitely from the guest (like a "cla-cla-cla-cla-cla-cla....").

Attachments (7)

VBox.log (141.7 KB ) - added by James Fade 6 years ago.
VBoxHardening.2.log (394.1 KB ) - added by James Fade 6 years ago.
VBoxHardening.log (394.1 KB ) - added by James Fade 6 years ago.
VBoxHardening.3.log (394.1 KB ) - added by James Fade 6 years ago.
volume_control.png (61.6 KB ) - added by yefkov 5 years ago.
vbox_6117_141725_logs.7z (50.4 KB ) - added by boxer01 4 years ago.
Logs of the 6.1.17 ver 141725
vbox_6117_141725_sounds.7z (368.9 KB ) - added by boxer01 4 years ago.
Debug sounds of the 6.1.17 ver 141725

Download all attachments as: .zip

Change History (48)

comment:1 by pentagonik, 6 years ago

Can you please supply all the debug files as described here? Thanks!

by James Fade, 6 years ago

Attachment: VBox.log added

by James Fade, 6 years ago

Attachment: VBoxHardening.2.log added

by James Fade, 6 years ago

Attachment: VBoxHardening.log added

by James Fade, 6 years ago

Attachment: VBoxHardening.3.log added

comment:2 by James Fade, 6 years ago

New logs are attached with enabled debug audio.

Audio result (%TMP%/DebugAudioOut-0.wav): host's audio file is recorded until sleep, and file ends up on the moment of system suspension (sleep). After sleeping time there is a distorted sound from the guest (repeated part of song) and there is no sound in the file.

comment:3 by James Fade, 6 years ago

(VBox.log and VBoxHardening.log are replaced with new ones).

(VBoxHardening.log is the only one, there are 2 copies of the same log which I cannot delete from attachments)

Last edited 6 years ago by James Fade (previous) (diff)

comment:4 by James Fade, 6 years ago

Reproduced starting from Virtual Box 6.0.0.

comment:5 by James Fade, 6 years ago

What do you think, guys?

comment:6 by jswami123, 6 years ago

Anyone got the genuine answer?

comment:7 by ewwhite, 5 years ago

Can confirm this is still a problem. Just installed Debian 10.1.0 in a VM, setup minimally, installed chrome and found that videos would not play and audio would not work after Windows 10 resumed from sleep when VM was still open. The video not playing issues seems directly related to sound not working.

Using VirtualBox 6.0.12

comment:8 by sr105, 5 years ago

Additional confirmation:

  • Version 6.0.14 r133895 (Qt5.6.2)
  • Host: Windows 10 Pro v1809 Build 17763.864
  • Guest: LinuxMint 19.2 Cinnamon (Based on Ubuntu 18.04)

Workaround:

  • Shutdown VirtualBox and restart it. Shutting down the guest is not enough.

Extra information:

  • Sometimes, it seems that switching audio outputs on the Windows host is all it takes to trigger this problem. But I've just tried to reproduce that, and now I can't.
  • I'm using the default Audio settings of DirectSound and AC97.

comment:9 by yefkov, 5 years ago

I'm facing with the same issue.

  • Version: 6.0.14 r133895 (Qt5.6.2)
  • Host: Windows 10 Home 1909 build 18363.476
  • Guest: Windows 7 Pro SP1

Power and sleep settings in Windows 10 (host):

  • Screen: 1 minute
  • Sleep: Never

According to the settings the host system turns monitor off after 1 minute idle. The guest sound stops working after host turns on monitor again. Furthermore the video in guest system becomes slow motion. As mentioned by James Fade the last portion of sound gets looped infinitely.

Update:
It seems to me that the issue happens if Windows 10 (host) changes the active audio output device. I have a notebook with speakers, a monitor with speakers (audio over HDMI) and bluetooth headphones. If I change the output device using volume control icon in the taskbar (see image)
https://www.virtualbox.org/raw-attachment/ticket/18594/volume_control.png
the guest system audio gets redirected as expected. After few switching I can hear a light distortion of the guest system sound but, in general, it works fine. But if the active audio device is switched in another way the issue occurs reproducible. I hear either a last sound portion repeatedly or no sound at all. Under "another way" I mean e.g.:

  • the host system turns off monitor (HDMI link gets down as well as HDMI audio) and the next available audio device becomes active.
  • connecting bluetooth headphones (the headphones become active audio device)
  • disconnecting blootooth headphones
Last edited 5 years ago by yefkov (previous) (diff)

by yefkov, 5 years ago

Attachment: volume_control.png added

comment:10 by mgrzegor, 5 years ago

I have observed what I suspect is the same issue.

  • Versions: 5.2.34, 6.0.14
  • Host: Windows 10 Pro v1809 (bug also observed in v1709)
  • Host audio: Stereo speakers connected to built-in Realtek ALC887 controller via analog 3.5 mm jack (i.e. no HDMI stuff)
  • Guest: Ubuntu 16.04; bug also observed in a Windows XP SP3 guest

In my case, the trigger is not host sleep (that I never do due to a BIOS bug that causes memory corruption on wake-up), but one of:

  • monitor turning off;
  • switching the Windows host to another user.

In fact, I can easily reproduce it using external tool like Don’t Sleep to turn monitor off manually:

  • In the guest, start speaker-test to put sound on alternate channels in a loop, e.g.
    speaker-test -c 2 -r 48000 -t pink -P 12 -l 0
  • In the host, right-click the Don’t Sleep systray icon, select Monitor → Monitor Off and wait.

After a couple of seconds the sound becomes stuck and speaker-test also stops alternating the channels and does not respond to Ctrl-C until it times out (after 30 s or so).

Workaround: For me, saving and restoring the virtual machine fixes the problem.

I am not quite sure when the problem started (because initially I did not realize what was happening, or what triggered it), but it certainly started before 5.2.34; I believe it might have started with either 5.2.22 or 5.2.24.

comment:11 by Michal, 5 years ago

i have same problem in virtualbox 6.1.2. windows 10 locks screen and guest has no more sound

comment:12 by nocontact, 5 years ago

I'm experiencing the same issue with Windows 10 1909 and Virtualbox Version 6.1.2 r135662

Last edited 5 years ago by nocontact (previous) (diff)

comment:13 by jemag, 5 years ago

I also have this same problem with win10 host and arch linux guest. It has been going on for a while now. Losing all sounds when I lock my computer and monitor goes to sleep. Could we have some feedback on this issue?

in reply to:  1 comment:14 by Vbc, 5 years ago

Version: 6.1.6
Host: Windows 10 Home
Guest: Ubuntu 16.04
Sound: Windows DirectSound + ICH AC97

Workaround:

  1. reboot guest system

or

  1. sleep and wake up guest system (faster than reboot)

comment:15 by Duuuval757, 5 years ago

I just want to confirm that I am also having this issue. Running Windows 10 host, Virtualbox 6.1.6 r137129. Also would like to note that I only have one audio input and output device enabled in windows, all others have been disabled. Thank You

Last edited 5 years ago by Duuuval757 (previous) (diff)

comment:16 by JaysonC, 5 years ago

I found out that if I Machine > Pause, the VM before Windows go to sleep and come back later.. and un-pause , the audio still works. Faster then a reboot.

comment:17 by valley.antoine, 5 years ago

Hello, any news about this issue ? Our team works in virtual machines and it make us lose a lot lot of time to switch between windows and the VM just to voice chat.

comment:18 by eriks, 4 years ago

I also have this issue.

I've disabled all of the screen savers and screen locking. I'm still not sure if this happenw when my Windows box goes to sleep, but what restores it is if (in the guest) I log out and back in. Then everything works fine.

Restarting Pulse Audio did not work.

comment:19 by delskorch, 4 years ago

Adding my report to the list. Virtualbox guest Linux sound stops after Win 10 host screen power-off.

VirtualBox 6.1.14 r140239 Windows 10 Pro 1909

comment:20 by leathan, 4 years ago

Same problem with Win 10 Pro host using Version 6.1.14 r140239 (Qt5.6.2)

comment:21 by ddemoss, 4 years ago

Having this problem as well. Version 6.1.6, also win10 host. Any help would be fantastic, thanks.

comment:22 by aeichner, 4 years ago

Hi,

just wanted to say that we are able to reproduce the issue and are investigating it. Seems to be indeed related to changing the default output device as mentioned already. Just suspending and resuming the host didn't show any issues.

comment:23 by aeichner, 4 years ago

The testbuilds page contains an updated Windows testbuild which should improve the situation. Instead of having to restart the VM, pausing and resuming the audio stream inside the guest should be enough (e.g. reload the youtube webpage). Feedback is appreciated!

comment:24 by arudnev, 4 years ago

Resolution: fixed
Status: newclosed

Fixed in 6.1.16

comment:25 by arQon, 4 years ago

Unfortunately not. Bug is still present as of 6.1.16r140961 on W10x64 hosts. (Ubuntu 18.04 guests at least: I didn't test other kernels/guests).

Is there perhaps some additional detail required, such as a specific setting for the VM?

Last edited 4 years ago by arQon (previous) (diff)

in reply to:  22 comment:26 by arQon, 4 years ago

Replying to aeichner:

Just suspending and resuming the host didn't show any issues.

I can reproduce this aspect with 100% reliability. Would you like logs for that case?

in reply to:  23 ; comment:27 by yefkov, 4 years ago

Replying to aeichner:

The testbuilds page contains an updated Windows testbuild which should improve the situation. Instead of having to restart the VM, pausing and resuming the audio stream inside the guest should be enough (e.g. reload the youtube webpage). Feedback is appreciated!

This is working as described in 6.1.16 r140961 after the monitor turns off and on again. (see my configuration at https://www.virtualbox.org/ticket/18594#comment:9)

Unfortunately the issue got worse with connecting/disconnecting of bluetooth headphones. The virtual machine freezes. Not the guest OS itself. If I close VM by clicking close button(x) on the toolbar the VM quietly crashes and goes from "running" to "aborted" state.

Last edited 4 years ago by yefkov (previous) (diff)

comment:28 by yefkov, 4 years ago

Resolution: fixed
Status: closedreopened

comment:29 by Banana James, 4 years ago

Please see also here: https://www.virtualbox.org/ticket/19267 It seems to be related and in my case eventually also crashed the host with BSOD. Logs included.

Workaround for me was to enable audio input for guest (i had it disabled because no input devices are connected).

comment:30 by arQon, 4 years ago

note: https://www.virtualbox.org/ticket/19686 is a dup of the original bug report here, but this ticket has since been mostly hijacked into "audio sink bugs in general" (which may or may not share root cause).

Resolution of the actual ticket here would close 19686, but this now seems to be more about restarting transient sinks and switching sinks than the original report, especially in light of #comment:22, so the opposite is no longer true.

in reply to:  28 comment:31 by boxer01, 4 years ago

Replying to yefkov:

I’m replaying here, because this ticket was linked in the change log. I have different host / guest combination as a ticket starter: Windows 10 (2004 with October 2020 patches now) is main combination, one hosts is Windows 8 and guest is Windows 7. But because somebody here already reported about Windows / Windows combination, I would like to report here.

My issue is “Audio from guest is lost after the switch of the output device of host”. It was first reported in ticket #17225#comment:55. There are also some other ticket with same problem: #19158, #18404, #18695. So the version 6.1.16 is the first version since 5.2.22, which can handle the output device change by simple restarting the audio stream in the guest. But this version has two slight issues with audio:

  1. One still has to do the manual restart of the stream; the versions before 5.2.24 handled this automatically.
  2. If OS turns monitor off for energy saving reasons, this produces a small CPU usage spike. And the spike causes desynchronization of the Vbox transmission of the guest sound to the host, just like this was described in the original ticket #17225 at the very beginning. The desynchronization can’t repair itself, so one needs to stop and start the audio stream again manually.

But all the other big issues are solved in this version, so the sound works nearly perfect.

But here even better news! Today I tested the newly available version 6.1.17 build 141128, and here everything works automatically. So there is no need to manual intervention anymore, everything happens by itself. I thank you deeply for you effort. I’ll do a little more testing with this version to report any other issues, if they should appear.

The only little issue left: in case of audio with decent bit-rate (not the 128k YouTube videos) the desynchronization, which I described before, happens randomly something like once an hour. The manual audio stream restart also helps here. It would of course be nice to correct this one. But I think it would be hard to catch this bug, especially because it’s so random and the audio debug output would be huge. Are here any other possibilities to get enough debug information about this? Or should I swallow the bitter pill and start the hour-long debug recording session?

P.S.: Thanks once again to anyone who participated in this issue correction like aeichner. Do pentagonik still works on the audio parts of Vbox?

in reply to:  27 comment:32 by William Ruppel, 4 years ago

Replying to yefkov:

Replying to aeichner:

The testbuilds page contains an updated Windows testbuild which should improve the situation. Instead of having to restart the VM, pausing and resuming the audio stream inside the guest should be enough (e.g. reload the youtube webpage). Feedback is appreciated!

This is working as described in 6.1.16 r140961 after the monitor turns off and on again. (see my configuration at https://www.virtualbox.org/ticket/18594#comment:9)

Unfortunately the issue got worse with connecting/disconnecting of bluetooth headphones. The virtual machine freezes. Not the guest OS itself. If I close VM by clicking close button(x) on the toolbar the VM quietly crashes and goes from "running" to "aborted" state.

I too am having the VM "freeze". The guest O/S is still running, but I cannot interact with it via the UI. But in my case, the freeze only occurs "sometimes" when the screen comes back online after being suspended.

As seems so typical with VBox... fix one thing, regress another! Really frustrating.

I am going back to 6.1.14, which at least doesn't completely freeze the VM!

Last edited 4 years ago by William Ruppel (previous) (diff)

comment:33 by boxer01, 4 years ago

Just found the first bug. If one saves the guest (I still talk about the Windows 10 on Windows 10 combination) with sound level slider open, then after restore one has no sound. If the sound level slider isn’t shown, then everything works as it should. The guest restart helps as usual, probably because the slider is also hidden after the restart. The moving of the slider itself is enough as a test to produce some sound.

I created some logs. The first and second one are the ones with the displayed slider and no sound. Third one is without a slider and forth one is with restart. I simply save the state of the guest and then start the guest again, without exiting the VBox itself.

The other bug I experience but still can't always reproduce, because it needs a random amount of time to appear: if you set a host sound level at maximum and guest one really low (3 or 5), then after something between 10 and 15 minutes the guest sound on the internet video disappears. After pausing and starting the video again the sound reappears. This never happens with the proper sound value in the guest like 20 or 50. But as I wrote this one has really random behavior, so I need more rehearsal before I have more details and logs on it.

by boxer01, 4 years ago

Attachment: vbox_6117_141725_logs.7z added

Logs of the 6.1.17 ver 141725

by boxer01, 4 years ago

Attachment: vbox_6117_141725_sounds.7z added

Debug sounds of the 6.1.17 ver 141725

comment:34 by William Ruppel, 4 years ago

Status: reopenedawaitsfeedback

Seems to be fixed now in 6.1.18. Yay!

comment:35 by arQon, 4 years ago

Still broken as of 6.1.18 for me.

I can't really comment on the bug that this has been hijacked into, which there's apparently been progress on, but if anything the "no sound" behavior is actually *worse* in 6.1.18 than 6.1.16 from a user perspective, as toggling the Audio Out enable state (which used to successfully restart the audio close to 100% of the time) has yet to work for me even once in .18. (COULD just be bad luck, but the chances of that are getting very thin already).

comment:36 by Hycotuss, 4 years ago

Just wanted to chime in here and say that this issue has been driving me crazy for a while now, maybe slightly different bug here.

When my monitor's go to sleep mode (idle for 20 min) before the PC goes to sleep (idle for 45 min) on my Host OS (Windows 10 pro 20H2) the audio for my guest OS (Manjaro Linux-XFCE, Parrot Security, Win 7) will lose all audio output. Easy but inconvenient fix is as stated above to reboot guest OS, or disable sleep settings but that is not ideal.

Just upgraded to VBox v6.1.18 platform and Extension Pack, which has made it worse because now instead of just loosing audio it freezes up the entire guest OS having to force a full guest OS reset by closing out of the hyper visor and relaunching.

Reverted back to 6.1.16 r140961 for now.

in reply to:  36 comment:37 by Banana James, 4 years ago

Replying to Hycotuss:

When my monitor's go to sleep mode (idle for 20 min) before the PC goes to sleep (idle for 45 min) on my Host OS (Windows 10 pro 20H2) the audio for my guest OS (Manjaro Linux-XFCE, Parrot Security, Win 7) will lose all audio output. Easy but inconvenient fix is as stated above to reboot guest OS, or disable sleep settings but that is not ideal.

Do you have audio *input* disabled on the guest? If so, enable it. I had very similar problem and this was the workaround for me. See issue #19267. I'm currently on 6.1.18 and have had no problem so far. But too soon to consider anything fixed yet.

comment:38 by William Ruppel, 4 years ago

An update.

While the sound issue is fixed for me with 6.1.18, I am now seeing a more alarming symptom: the VM is entirely locking up. This has occurred to me several times in the past week, and happens when the screen goes to sleep. Not always, to be sure, but it does happen.

Standard pattern of "fix one thing, break another". =(

I'm now using the same workaround (don't let the screen go to sleep), and haven't had another lockup.

comment:39 by Eddy Smith, 4 years ago

I'm wondering if this is related to problems that I'm experiencing with Windows 2000 and older. The audio doesn't always work and Windows 2000 RTM won't shut down properly. With Windows NT 4.0 there's quirkiness and audio weirdness.

https://forums.virtualbox.org/viewtopic.php?f=2&t=101942

comment:40 by PavloUnn, 3 years ago

Dear VirtualBox team - thank you very much for fixing audio and lock-up issues! It's awesome now! Host/Guest - Win10 64-bit with all the updates.

comment:41 by mgrzegor, 3 years ago

I updated straight from 6.0.24 to 6.1.22 a few weeks ago and poof, no more audio lock-ups when the monitor goes to sleep (manually disabling/enabling audio devices in mmsys.cpl, which used to be the easiest way to reproduce the bug, also no longer causes any problems in the VM), no more audio hiccups or distortions observed when playing videos in the VM, and Windows no longer reports the VM as using the microphone if audio input is disabled on the VM start-up. Also thus far no lock-ups and only one crash that does not appear to be related (#20388).

In short: It looks like this bug has been fixed for good. I would like to thank the VirtualBox team for their work, too!

Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette