Page 1 of 3

Frequent freezes in display output since 6.0 (#18957)

Posted: 15. Feb 2019, 09:38
by cremor

ModEdit; related ticket: #18957: Frequent freezes in display output since 6.0
Since I updated from 5.2.22 to 6.0.2 (and now 6.0.4) I often have problems with my Windows 10 guest (I don't use any other guests, but a friend who uses 6.0 with Linux guests has no problems, so I assume this is Windows only). The problems manifest as freezes/pauses/hangs in the UI. The whole display output freezes and a bit later suddenly jumps to the desired output. This is especially visible in continuus animations, but annoying everywhere, especially while typing text.

Here is what I could find:
  • The freezes happen every few seconds and last for about half a second.
  • It affects all programs and also the windows desktop at the same time, so it looks like it is the VirtualBox display output itself that's causing the problem.
  • Both VBoxVGA and VBoxSVGA show the same problem.
  • The problems only start on boot or resume (from a saved state) of a guest. Once a guest is running fine, the problem does not suddenly appear as long as the guest stays running. But shutting down or saving the state of the guest has a high chance of showing the problem on the next boot/resume.
  • I'm not 100% sure on this one, but it seems like a guest reboot doesn't fix the problem. Instead a shutdown and "cold" boot is required.
Does anyone else have the same problem?
What is the best way to get this fixed soon? Should I create a ticket?

Guest additions are updated. Logs are attached in case someone can see a problem there.
I know that I've assiged all my CPU cores to the guest but that is intented. I hardly use my host at all and the guest should have all the performance that it can get. Reducing the cores the guest has access to doesn't fix the problem.

VirtualBox 6.0.4
No extension pack installed
Guest Additions 6.0.4
Host: Windows 10 x64 1803
GPU: Intel HD Graphics 530 with driver 25.20.100.6519 (latest version at this time)
Guest: Windows 10 x64 1709
Guest display settings: 2 monitors, VBoxVGA/VBoxSVGA, 128 MB, 2D/3D off

Re: Frequent freezes in display output since 6.0

Posted: 17. Feb 2019, 06:51
by socratis
cremor wrote:Should I create a ticket?
Hold your horses, don't have such itchy fingers! :D
00:00:02.212367 NumCPUs <integer> = 0x0000000000000004 (4)
00:00:02.846907 CPUM: Physical host cores: 4
You have assigned all your CPUs to the VM. The host is going to run low on resources, since VirtualBox cares about physical processors (cores), not logical ones (threads). See "CPU Cores versus threads" and "Why is it a bad idea to allocate as many VCPUs as there are physical CPUs?".
00:00:02.379166 3DEnabled <integer> = 0x0000000000000000 (0)
00:00:03.376901 GUI: 2D video acceleration is disabled
Shutdown the VM and enable 2D/3D acceleration in the VM settings ยป Display. You'll also notice that the max VRAM will jump from a max value of 128 to 256 MB after that; max the VRAM as well. Then re-install the Guest Additions (GAs) in the guest.
00:00:02.379170 MonitorCount <integer> = 0x0000000000000002 (2)
Do you actually use 2 virtual monitors? If you do, then it makes things even worse; way more pixels to update, no acceleration whatsoever, and all the CPUs assigned to the guest. Who's going to "move" all those pixels?

Re: Frequent freezes in display output since 6.0

Posted: 18. Feb 2019, 08:25
by cremor
Thanks for your answer. I'll comment on your points individually:
  1. As already written in my initial post, I know that this is not recommended. Reducing the virtual CPUs to 3 doesn't fix the problem.
  2. I'll try 3D again the next time I'll upgrade to 6.0 (right now I'm back to 5.2 to prevent this problem). But I've had a bad experience with 3D before (there was a reason why I disabled it, but I don't remember it right now).
  3. Did you always have to reinstall the guest additions after enabling or disabling 3D? I thought they could handle both?
  4. Yes, I do use both virtual monitors. 5.2 (and older versions) has no problems "moving" all those pixels, so why should 6.0 have?

Re: Frequent freezes in display output since 6.0

Posted: 18. Feb 2019, 09:42
by socratis
  1. Reducing the CPUs to "vCPUs < cores" may not remedy the problem immediately, but having "vCPUs = cores" will certainly create/enhance it.
  2. 2D/3D, if supported, takes away cycles from the CPU and makes the GPU work for it. Without it enabled, it's all/only CPU working.
  3. No, you don't have to re-install the GAs if you change the 2D/3D settings. But it never hurt anyone... ;)
  4. A lot of things changes in the graphics front between 5.2.x and 6.0.x. The main ones are the introduction of 3 flavors of vGPU (vs. just the VBoxVGA before) and the handling of HiDPI/ScaleFactor.
A couple of other points/questions:
  • What's running on the guest at the time when you see the erratic mouse movements? Do you have the TaskManager/ResourceMonitor running in the guest? You should.
  • Same for the host. How's the memory "pressure" on the host at the time? Any major swapping taking place?

Re: Frequent freezes in display output since 6.0

Posted: 18. Feb 2019, 09:52
by cremor
I'll check it in detail once I update to 6.0 again, but from my memory:
  1. No special resource usage in the guest. If the guest shows the problem, it starts immediately after booting and stays "forever" (at least for 3 hours). It doesn't matter if I have 10 applications running in the guest or none at all.
    I also explicitly tried to wait using the guest after booting a few times (so that Windows can finish its startup tasks). There I also checked the guest task manager and it was at near 0% CPU usage. The freezes still happened.
  2. My host rarely runs anything other than VirtualBox and Outlook. If there is a higher CPU usage, it comes from VirtualBox. Memory pressure is fine, there shouldn't be any swapping. I have 16 GB of physical RAM, VirtualBox gets 10 GB for the guest, the complete memory usage is 13-14 GB according to the hosts task manager.

Re: Frequent freezes in display output since 6.0

Posted: 18. Feb 2019, 09:57
by socratis
cremor wrote:I'll check it in detail once I update to 6.0 again
Please do that. I'm not so much interested in the CPU (that would be obvious), as I am in the I/O front. My physical Win10-64 PC, has a tendency to really work on the hard drives after it launches. From Defender to .NET optimization, this puppy needs at least 10 minutes to settle.

On. Every. Boot. :roll:

It's the weirdest behavior, by far. I don't know what on earth they're optimizing over there, but after a year you'd think that it would have been optimized by now. Nope. :?

Re: Frequent freezes in display output since 6.0

Posted: 26. Jul 2019, 08:00
by cremor
I've now tested the newest version for one week and here are my test results.

Updated configuration details:
  • VirtualBox 6.0.10
  • No extension pack installed
  • Guest Additions 6.0.10
  • Host OS: Windows 10 x64 1809
  • GPU: Intel HD Graphics 530 with driver 26.20.100.6912 (latest version at this time)
  • 2 monitors with 1920x1080 resolution
  • All monitors (both host and VM) at 100% scaling
  • Guest OS: Windows 10 x64 1809
  • Guest is running in full screen mode
  • Guest settings:
    3 of 4 CPU cores
    10 of 16 GB RAM
    VRAM at maximum (256 MB with 3D acceleration, 128 MB without)
    All other settings are at their default for a Windows 10 x64 VM
What I tested:
  • 1 and 2 virtual monitors
  • VBoxVGA and VBoxSVGA
  • 3D acceleration on and off (I reinstalled the guest additions after switching as suggested)
My findings:
  • Both VBoxVGA and VBoxSVGA without 3D acceleration still have those short display freezes that I described in the first post of this thread. But they are harder to reproduce than before, especially with VBoxVGA it now only happens every ~5 starts of the guest (as described before, the problem either starts immediately after starting/resuming the guest or not at all). With VBoxSVGA it happens more often, but I think not as often as it happened with 6.0.4.
  • VBoxVGA with 3D acceleration seems mostly ok, but some programs (e.g. Sourcetree) are extremely slow with it, so it's not useable for me. (The same happens in 5.2 so this is not a new problem.) But it could also be that this case also still has the short display freezes and it just didn't happen when I tested it (I had limited tests because of the problems with some programs.)
  • VBoxSVGA with 3D acceleration is completely unusable. Many programs (e.g. Microsoft Office and even the Windows start menu) have display glitches, some even crash immediately after the start (failing module according to the Windows event log: VBoxDispD3D-x86.dll, Version: 6.0.10.32072).
For the cases that still show the short display freezes:
I've let the VM run at least 10 minutes and watched the resource usage. Neither the host nor the VM showed any CPU or IO usage that could indicate the problem. I closed every program on the host - even the VirtualBox management window - and every program in the VM except the Windows photos app that showed a continuous GIF so I could easily see the problem.

I've attached multiple logs to this post:
  • One for the case "VBoxVGA without 3D acceleration" that has the short display freezes. Here I resumed a saved guest.
  • One for the case "VBoxSVGA without 3D acceleration" that has the short display freezes. This is from a fresh guest start.
  • One for the case "VBoxSVGA with 3D acceleration" that is completely unusable because of display glitches and program crashes. This is also from a fresh guest start.
I'm currently unsure if I should stay at 6.0 (with VBoxVGA and 3D acceleration off) or go back to 5.2. That will depend on how often the display freezes problem will occur on average.

Update:
I'm not 100% sure on this one, but it seems like a guest reboot doesn't fix the problem. Instead a shutdown and "cold" boot is required.
I think I can now confirm this. I got the short display freezes again today (with "VBoxVGA without 3D acceleration" after a fresh start). I tried 3 reboots of the guest, the problem always stayed. Then I did a shutdown and fresh boot and the problem was gone. I'll attach new logs that show all those 5 starts. Maybe someone can find a difference between the first 4 and the last one.

Re: Frequent freezes in display output since 6.0

Posted: 13. Aug 2019, 07:02
by cremor
Does anyone have an idea how to get this fixed? It can't be that I'm the only one with this problem, right? I have tested it with multiple machines and multiple guests (although everything was always Windows 10 based) and als my tests showed this problem.

Re: Frequent freezes in display output since 6.0

Posted: 13. Aug 2019, 11:06
by mpack
I would enable 2D acceleration, and reduce the guest to 2 cores to allow the host to run more smoothly.

Re: Frequent freezes in display output since 6.0

Posted: 13. Aug 2019, 14:35
by codyghind
Chipping in with my similar experience.

I am running Windows 10 guest on a GalliumOS 3.0 (Xubuntu-derivate) host, VirtualBox/Extension Pack/Guest Additions 6.8. Settings are reasonably configured in terms of vCPU/RAM/VRAM etc., 2D/3D acceleration enabled.

When using VBoxSVGA, DxO PhotoLab 3.2.0 image editing app (i.e. the sole purpose I installed the VM) shows all sorts of graphical glitches. Chrome 76 browser works fine.

When using VBoxVGA, the app runs without exhibiting any display issues. However, Chrome is just a black window when launched. Only when changing the compatibility settings to Windows Vista, browser becomes visible.

Any ideas?

Re: Frequent freezes in display output since 6.0

Posted: 13. Aug 2019, 17:39
by mpack
codyghind wrote: However, Chrome is just a black window when launched.
That would be because Chrome is using 2D or 3D accelerated rendering, and your other apps generally don't. Graphics acceleration is done by redirecting graphics calls to the OpenGL engine on the host, so results are greatly dependant on the quality of the host OpenGL drivers; assuming accelerated OpenGL exists on your host at all.

You can prove this is the problem by disabling 2D and 3D acceleration (and note that 2D acceleration only applies to the VBoxVGA graphics controller anyway).

Re: Frequent freezes in display output since 6.0

Posted: 19. Aug 2019, 07:21
by cremor
mpack wrote:I would enable 2D acceleration, and reduce the guest to 2 cores to allow the host to run more smoothly.
I can still reproduce the problem with the following settings:
  • VBoxSVGA
  • 2D acceleration enabled and 3D acceleration disabled
  • Only 2 of 4 cores assigned to the guest

Re: Frequent freezes in display output since 6.0

Posted: 16. Sep 2019, 07:40
by cremor
I can now confirm that version 6.0.12 behaves like 6.0.10 (see my post from 26. Jul 2019), except for the start menu graphics glitches with VBoxSVGA and 3D (but the glitches in other programs are still there, as well as the crash in VBoxDispD3D-x86.dll).

Since this thread is now already going for 7 months, I assume there is no fix or workaround available. Therefore I plan to create tickets in the near future for the following bugs:
  1. Short display freezes when 3D acceleration is disabled (both with VBoxVGA and VBoxSVGA).
  2. Graphics glitches in certain programs (e.g. Microsoft Office) with VBoxSVGA and 3D acceleration enabled.
  3. Crashes in VBoxDispD3D-x86.dll with certain programs with VBoxSVGA and 3D acceleration enabled.
Or does anyone already know of existing tickets for those problems?
I won't create a ticket for the problems with VBoxVGA and 3D acceleration enabled since this combination will be discontinued in 6.1.

Re: Frequent freezes in display output since 6.0

Posted: 23. Sep 2019, 14:07
by cremor
I've now created ticket https://www.virtualbox.org/ticket/18957 for the main problem (short display freezes).

Tickets for other problems:
Graphics corruption: https://www.virtualbox.org/ticket/18956
Application crashes: https://www.virtualbox.org/ticket/18955

Re: Frequent freezes in display output since 6.0

Posted: 24. Sep 2019, 13:29
by zakimirza88
I'm experiencing the same problem.
The VM freezes entirely with even the mouse pointer not visible.
I'm running a Windows 10 host in a dual monitor setup and this started happening recently after upgrading to 6.0.12 r133076.