Page 1 of 1

Sound Out Lost On Host After Screen Saver

Posted: 2. Sep 2022, 22:01
by Khun_Doug
I first reported this problem in the Beta group. But since I can create the problem on older versions of VB, I am reposting here, as requested.

Windows host is Windows 11, VB is 6.1.38 153438. The host PC has an Asrock X570 motherboard with a Ryzen 5950X CPU, 64GB RAM. The sound board is an Asus Essence STX II. The speakers are connected via an analog cable to the audio out line to the Essence STX II. The host screen power save is set to 10 minutes.

Guest PC is also Windows 11 with the VB 6.1.38 GA installed. The guest is configured for screen blanking set to never. I open a browser and start streaming music. I leave both the host and guest alone and the host goes into power save and turns off the display at 10 minutes as expected. The guest VM stops playing music. At this point I bring the display back by touching any key but still no sound from the VM. I check the VM and it is working as expected. I tried closing the browser and starting the music stream again and still no sound. I tried to disable/enable the VM sound device, and still nothing. Essentially, once the host screen goes into power save, the guest VM will never play sound until it is power-cycled.

FWIW, this behavior does not happen on the host PC. Sound will continue as expected, regardless of the displays being active or in power-save. Also, I use VMware for evaluating software. This behavior does not happen with VMware guests. I.E., they continue to play music regardless of the host displays.

All sound is handled via the Asus Essence STX II and it's analog line out. I do not use HDMI or the on-board sound device. The sound device on the motherboard is disabled in BIOS.

Attached are logs, as requested.

Re: Sound Out Lost On Host After Screen Saver

Posted: 4. Sep 2022, 01:08
by Khun_Doug
As a test for more information I built a Windows 10 VB VM, installed the 6.1.38 GA package. I installed FireFox and attempted to play SiriusXM. To my total surprise, the Windows 10 VB VM did so poorly that, essentially, playing music on Windows 10 is not an option. The sound started by slowing down and then speeding up. Eventually and very quickly, the sound was slowed and choppy, full of static. I had the guest set to never turn off the display. But even before the host had an opportunity to put the displays into power save, the guest just stopped playing music. Stopping and starting the SiriusXM player did nothing. Closing the browser and reopening and retrying yielded no sound.

FWIW, the display on the Windows 10 VM is not functional with 3D acceleration enabled. What I noticed was that navigating the menus in Settings did not refresh the display to reflect the new window. I had to minimize Settings and then restore it to see what was supposed to be seen originally. And additionally, none of this happens with a Windows 10 guest using VMware. The guest displays fine and the sound moves along as expected.

I am attaching the compressed logs.

Re: Sound Out Lost On Host After Screen Saver

Posted: 4. Sep 2022, 13:31
by mpack
Audio out problems usually mean that the VM is poorly specified resource wise. Let's take a look.

Try reducing CPU cores to 2. Contrary to expectations, adding cores usually makes a VM run slower because idle cores still need to be managed. Most guests benefit from one core to look after OS tasks, plus 1 core to run user apps.

Another thing you can do, if possible, is reduce the audio mode. E.g. basic stereo requires far less virtual register twiddling than does 7.1 HD audio.

Re: Sound Out Lost On Host After Screen Saver

Posted: 4. Sep 2022, 21:09
by Khun_Doug
@mpack, I decreased the virtual CPU down to 2 and it made no difference. I was able to record a 9 second sample of the sound output but posting .mp3 files is not permitted. I created a OneDrive link to the sound file her: https://1drv.ms/u/s!Ap5bLSG81912geYCaFg ... g?e=3vMGdh

There is no control in the Windows 10 VB VM to change the audio device to anything other than what VB creates. I used the defaults of Windows DirectSound and Intel HD Audio.

Again, I don't get these peculiar problems on the VMware guests. I'm trying to get away from VMware, the reason I am investing time in testing VirtualBox.

Re: Sound Out Lost On Host After Screen Saver

Posted: 4. Sep 2022, 23:07
by scottgus1
00:00:03.124585 NP - Nested Paging = 0 (1)
Under the VM's System settings, Acceleration tab, try enabling Nested Paging.

For the graphics glitches while 3D acceleration is running, disable Settings > Personalization > Colors > Transparency Effects in your VM. Unactivated Windows should have the same setting here:
Ease of Access > Display > Simplify and personalize Windows > Show transparency in Windows
Khun_Doug wrote:Again, I don't get these peculiar problems on the VMware guests.
Yes, we get it. A glitch in Photoshop may not show up in Corel Draw either. That Corel works won't help the Photoshop guys, though: different devs, different programming, etc. Same for Virtualbox & VMware. They're not the same program under different labeling, so there may be a problem in one that isn't in the other.

Please post a new log with all the above suggested changes, if the VM still doesn't play audio well.

Re: Sound Out Lost On Host After Screen Saver

Posted: 5. Sep 2022, 01:02
by Khun_Doug
@scottgus1 - I checked both my Windows 10 VM and Windows 11 VM, and both already have the Nested Paging option enabled. There was no need to change that.

The disable transparency resolved the odd display problems on both Windows 10 and Windows 11. And for the sake of testing, I have both my Win 10 and Win 11 machines Activated. They have genuine keys installed.

The sound problem with Windows 10 is so obvious that the VB VM cannot correctly pass the Test function in the sound control panel. The sound is buzzy, scratchy, choppy. No need to try and play music, the test tones don't make it out properly. Curiously, they do sound correct with Windows 11. I conclude there could be more than one issue.

I am attaching the clean logs from Windows 10. Seriously, the sound is not usable. I can create a sound capture and place it on my OneDrive if interested - I don't know if that would be of any help. At least with Windows 11 the sound is correct until the host puts the displays to power save.

Re: Sound Out Lost On Host After Screen Saver

Posted: 5. Sep 2022, 03:30
by scottgus1
My mistake about the nested paging, I read the wrong line in the log. It was on.

I don't know about diagnosing the sound playback. Will have to let a forum guru pick it up. I do notice that the VM is back to 4 processors again. 2 is optimum for a modern OS in a VM unless 3rd-party multi-processor-aware apps are installed, per Mpack's comments above.

Re: Sound Out Lost On Host After Screen Saver

Posted: 6. Sep 2022, 17:43
by fth0
FWIW, I just read that Microsoft's August 2022 Windows patch (KB5016616) can bring several audio problems like audio stuttering.

Re: Sound Out Lost On Host After Screen Saver

Posted: 7. Sep 2022, 00:53
by Khun_Doug
The patch could explain the garbled/mangled sound on the Windows 10 VM. But it doesn't explain why the sound on the Windows 11 VM stops after the host displays go into Power-Save. I will archive all the tests with 7z until VB 7 Beta 2 is available. And hopefully, in the meantime, Microsoft will release an update that resolves the sound on Windows 10. I've put enough time into this for now.