GPU Passthrough Custom OS Template

To configure a custom template for GPU support, please adhere to the guidelines outlined below.

It is important to recognize that GPU passthrough primarily serves two distinct scenarios:

  • Machine Learning tasks (where a physical screen is not required, such as with OpenCL)
  • Image and media processing (including tools like OBS Studio, Blender, video editing software, and Multiverse presentations)

Although Machine Learning implementations generally require less configuration effort (since the display does not need to be driven by the GPU), this guide covers the end-to-end process to accommodate both of these use cases.

Supported GPU

If you are deploying DaDesktop on-premises or requesting specific hardware for a private server, please keep the following compatibility factors in mind:

Our DaDesktop system has been extensively tested with AMD Radeon RX 6000 series cards (specifically the RX 6400) and Nvidia RTX graphics cards. Generally, models released prior to 2018 are not supported.

Additionally, integrated GPUs from Ryzen 7/9 processors and Intel iGPUs should function correctly, though they are not part of our automated testing suite.

DD Node side

The directory dadesktop_npnode_deploy/modules/build-os-template contains the necessary scripts to modify the Linux guest OS to support the GPU as the primary display and to switch between GPU-accelerated rendering and CPU-rendered screens.

Guest Settings

Ensure that the "support_qemu" parameter in /var/lib/kvm/templatename/sysinfo.json is set to false. This setting is required to enable VNC connectivity within the guest, as QEMU VNC is unable to display the passthrough GPU screen directly.

Testing

Method 1: 
vblank_mode=0 glxgears

Method 2:

/apps/dd-guest/check-gpu

Windows guest settings when no physical monitor is attached (most cases)

We utilize IddSampleDriver to generate a virtual display adapter and monitor within the Windows 10 template. If your GPU does not have a physical monitor connected, you should install this driver.

  • Copy the additional IddSampleDriver files to the c:\IddSampleDriver folder

  • Install the certificate

  • Install the driver

  • Navigate to "Display Settings," where you should see multiple displays listed. Open "Advanced display settings"; typically, Display 2 or 3, labeled as "Linux FHD", is the virtual display we have created. Note the display number as N. Return to the "Select and rearrange displays" section, choose display N, and within the “Multiple displays” section, set the option to "Show only on N" if available, designating it as the main display. Adjust its resolution accordingly.

  • In the event that you cannot locate a Display named "Linux FHD":

Proceed to "Device Manager" -> "Display Adapters" -> "IddSampleDriver Device": right-click and enable the device. (You may disable this device if you do not wish to use the virtual display.)

  • If a Display named "AMD vDisplay" is present (typically Display 2):

   Performance may be slow; if the option is available, you can select "Disconnect this display".

   (Choose Display x. Under the “Multiple displays” section, utilize the drop-down menu to select the Disconnect this display option.)

  • If a Display named "Qemu Monitor" exists (typically Display 1):

   You can also choose "Disconnect this display" if this option is available.