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

17,039

Solution 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:

Solution 2

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.

Share:
17,039

Related videos on Youtube

BarsMonster
Author by

BarsMonster

Software/Hardware geek, Microelectronics, Optics, Lasers and Holography. My personal blog is at 3.14.by I do some microchip photography at zeptobars.com

Updated on September 18, 2022

Comments

  • BarsMonster
    BarsMonster over 1 year

    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.

    • Romen
      Romen over 4 years
      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.
    • Natsu Kage
      Natsu Kage over 4 years
      "I am getting stable 60 FPS in VM" Is vsync on by any chance...? Check out : askubuntu.com/questions/764302/…
  • BarsMonster
    BarsMonster over 4 years
    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.