Page 1 of 1

Audio within VB guest sounds terrible

Posted: 14. Feb 2022, 16:37
by Ken355
I'm running Linux Mint in VB version 6.1.32 as the guest, on a Windows 10 host system. PC is a Microsoft Surface Go tablet with Pentium 1.70 GHz processor and 8 GB RAM.

Audio playing in the guest sounds choppy, halting, and scratchy. i.e., YouTube and any other audio. If I play the same thing on the Windows 10 host machine, it sounds perfect, even if the VB guest is running at the same time.

What should I check? I'm thinking it's either a setting somewhere, or the processor can't handle it. I have this same arrangement on four other (different type) PC's, and none of them have this audio issue.

Re: Audio within VB guest sounds terrible

Posted: 14. Feb 2022, 17:34
by mpack
Audio hardware is emulated at a register level, so scratchy audio in the guest OS is usually a consequence of getting too ambitious especially in combination with a poor configuration of CPU or RAM for the VM. Hyper-v in the host can also slow down a VM.

By "too ambitious" I mean going for 5.1 sound when 2.0 sound would be perfectly adequate.

To comment on the CPU config I'd need to see a zipped VM log attached here.

Re: Audio within VB guest sounds terrible

Posted: 14. Feb 2022, 18:28
by Ken355
Attached is a zipped log file (I hope it's the right one).

Also I turned off "Hyper-V" in Windows and it made no difference in the audio quality.

Re: Audio within VB guest sounds terrible

Posted: 14. Feb 2022, 18:36
by scottgus1
That's the correct log, thanks!

Hyper-V is still enabled. See HMR3Init: Attempting fall back to NEM (Hyper-V is active).

RAM is a hint overprovisioned:
00:00:08.140535 Host RAM: 8061MB (7.8GB) total, 4868MB (4.7GB) available
00:00:08.564255 RamSize <integer> = 0x000000013d800000 (5 326 766 080, 5 080 MB, 4.9 GB)
But Linux VM OS's don't demand all RAM at the start, so this might not be the problem.

The OS did go flatline for a while:
00:05:14.590335 VMMDev: vmmDevHeartbeatFlatlinedTimer: Guest seems to be unresponsive. Last heartbeat received 4 seconds ago
00:06:31.571142 VMMDev: GuestHeartBeat: Guest is alive (gone 80 989 785 023 ns)
The 6.1.32 bug glitch diagnostic info is this:
00:00:07.888777 VirtualBox VM 6.1.32 r149290 win.amd64 (Jan 17 2022 11:29:30) release log
(remove left 9 characters, time offset in seconds, less than 1 second normal)
00:08:51.094605 /TM/VirtualSync/CurrentOffset 490082958 ns
While that's only a half second's worth of offset, that seems a lot for only 8 minutes of running time.

Try one of the following configurations. Our forum guru 'fth0' has done some troubleshooting and pins down these possibilities to try (HCVI = Microsoft 'Memory Integrity'):
6.1.32 without Hyper-V
6.1.30 with Hyper-V but without HVCI
6.1.26 with Hyper-V and HVCI.

Re: Audio within VB guest sounds terrible

Posted: 14. Feb 2022, 19:36
by mpack
Ken355 wrote:Attached is a zipped log file (I hope it's the right one).
Yes, it seems to be correct. I notice that you do indeed have the CPU allocation problem that I anticipated.
00:00:10.916947 CPUM: Physical host cores: 2
...
00:00:08.564249 NumCPUs <integer> = 0x0000000000000002 (2)
I.e. your host has 2 cores and you are allocating both to the VM. Unfortunately with only 2 cores available there is no good solution for running two 64-bit OS on the same hardware. Ideally your host would have at least 4 cores (threads don't count) so that each could get the 2 cores to themselves that they really want.

However, turning off Hyper-v should still help. As would restricting yourself to stereo output, and no microphone.
Ken355 wrote:Also I turned off "Hyper-V" in Windows and it made no difference in the audio quality.
That does nothing useful I'm afraid. Disabling the ability to create Hyper-v VMs doesn't mean that the underlying "engine" is removed. You need to follow the FAQ: HMR3Init: Attempting fall back to NEM (Hyper-V is active).

Re: Audio within VB guest sounds terrible

Posted: 14. Feb 2022, 19:43
by Ken355
Thanks to both of you for the replies. I will work on the tips you have suggested and see what I can do. This VirtualBox and Linux stuff is pretty new to me.

EDIT:
I tried the suggestions here: viewtopic.php?f=25&t=99390 to turn off Hyper-V. The process seemed to be successful, according to the message in the command line, but it made no difference in the slowness and bad audio quality. The green turtle icon is still present in the Status Bar!

I have attached another log file in the event that someone may review it and make some other suggestions.