How to get VirtualBox VM's display refresh rate >60Hz?

4

0

When I run a Kubuntu guest on Windows host in VirtualBox - I only get 60Hz refresh rate on a virtual display. UI feels very slow and laggy compared to native 120/144Hz UI. How can I achieve 120/144Hz display refresh rate inside VM?

Tried both 5.x and latest 6.1.2 versions of VirtualBox, with old and new virtual display drivers, with and without 3D acceleration.

Is there any way to have 144Hz display refresh rate on Kubuntu (or other Linux) guest VM?

I already tried:

xrandr --output VGA-1 --mode 1821x1015 -r 144

In .kwinrc:

MaxFPS=144

RefreshRate=144

with no luck.

BarsMonster

Posted 2020-01-26T21:07:22.910

Reputation: 172

I have been digging through similar questions in google search results and there seems to be a consensus that changing the "virtual" display refresh rate from within a VM has no effect. It's basically just a placeholder number in the virtual graphics adapter to satisfy applications that go looking for it. Everything that the guest OS "draws" is forwarded to the host OS through a virtual GPU, so it may only feel "laggy" due to the overhead of emulating a GPU. – Romen – 2020-01-28T23:02:20.017

"I am getting stable 60 FPS in VM" Is vsync on by any chance...? Check out : https://askubuntu.com/questions/764302/screen-tearing-on-kubuntu-16-04-with-intel-drivers

– Natsu Kage – 2020-01-29T04:53:48.150

Answers

1

I have found it said that the virtual graphics adapter in VirtualBox tells Windows that it only supports 60Hz, so you cannot configure it for more.

The only solution would be PCI passthrough which lets the virtual machine use directly the physical video adapter, requiring usually a computer with at least two video adapters and two monitors.

Although VirtualBox seems to have dropped support for PCI passthrough, because its implementation of the feature was too incomplete, its article does a good job of listing the prerequisites for this feature:

  • Your motherboard has an IOMMU unit.
  • Your CPU supports the IOMMU.
  • The IOMMU is enabled in the BIOS.
  • The VM must run with VT-x/AMD-V and nested paging enabled.
  • Your Linux kernel was compiled with IOMMU support, including DMA remapping. See the CONFIG_DMAR kernel compilation option. The PCI stub driver (CONFIG_PCI_STUB) is required as well.
  • Your Linux kernel recognizes and uses the IOMMU unit. The intel_iommu=on boot option could be needed.

PCI passthrough is much easier when using a bare-metal hypervisor such as ESXi. For hosted hypervisors, the situation is better on Linux machines. For Windows Hyper-V, PCI passthrough is only supported on Windows Server.

PCI passthrough under Linux is described in many articles, some of which I list below:

harrymc

Posted 2020-01-26T21:07:22.910

Reputation: 306 093

1

VirtualBox may not be the best path to go if you are seeking serious graphics performance from your VMs, you may be looking for PCI/GPU pass-through. VirtualBox appears to have dropped the experimental support in v6.1

Are you sure the refresh rate is the limiting factor? Are you able to test over 60fps with 3D Acceleration enabled on the Virtual Machines? (the graphics drivers may be the limiting factor). Enabling GPU/PCI pass-through you would be able to attain native graphics performance within your VMs.

For maximum performance consider migrating to QEMU, the project is well advanced of the other solutions when it comes to performance. There are guides on how to enable GPU passthrough on QEMU.

Yevhen Stasiv

Posted 2020-01-26T21:07:22.910

Reputation: 36

I tested graphics performance and I am getting stable 60 FPS in VM.That is a valuable information, although in my case there is no requirements for high graphics performance. Simple KDE UI drawn in 2d with 144Hz would be good enough. This could be done through virtualized graphics card. This 2D UI will take something like 1% of GPU power. – BarsMonster – 2020-01-27T11:16:05.683