GPU Passthrough Custom OS Template

To prepare your custom template for GPU support, please adhere to the instructions provided below.

It is important to note that there are two primary use cases for GPU passthrough:

  • Machine Learning (where a screen is not required, such as with OpenCL, etc...)
  • Image Processing (for applications like OBS Studio, Blender, Video Editing, or Multiverse presentations, etc...)

Although the Machine Learning use case is less complex since the display does not need to utilize the GPU, we will outline the end-to-end process to accommodate both scenarios.

Supported GPU

If you are deploying DaDesktop on-premise or requesting the purchase of specific cards for your private server, please consider the following details

Our DaDesktop system is primarily tested against AMD Radeon RX 6000 series (specifically the RX 6400) and Nvidia RTX cards. Generally, models released prior to 2018 are not supported.

Additionally, integrated GPUs for Ryzen 7/9 and Intel iGPUs should function correctly, but we do not perform automated testing on these components.

DD Node side

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

Guest Settings

Please ensure that the "support_qemu" parameter in /var/lib/kvm/templatename/sysinfo.json is set to false. This allows you to connect via VNC inside the guest, as qemu vnc is unable to display the passthrough GPU screen.

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 display adapter and virtual monitor within the Windows 10 template. Please install it if your GPU does not have a physical monitor connected.

  • Extract IddSampleDriver to the c:\IddSampleDriver folder

  • Install the certificate

  • Install the driver

  • Navigate to "Display Settings"; you will observe multiple displays. Check "Advanced display settings"; typically, Display 2 or 3, labeled as "Linux FHD", is the virtual display we have created. Note this display number as N, then return to the "Select and rearrange displays" section. Select display N and, under the “Multiple displays” section, choose "Show only on N" if that option is available, and set it as the main display. Adjust its resolution.

  • If 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 intend to use the virtual display.)

  • If a display is named "AMD vDisplay", typically Display 2:

It may exhibit slow performance; if the option "Disconnect this display" is available, you can use it.

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

  • If a display is named "Qemu Monitor", typically Display 1:

You may also "Disconnect this display" if this option is present.