GPU Passthrough: Custom OS Template
To ensure your custom template is fully equipped for GPU support, please adhere to the following guidelines.
It is important to distinguish between the two primary scenarios for GPU passthrough:
- Machine Learning (typically requiring no display output, e.g., OpenCL workloads)
- Image Processing (e.g., OBS Studio, Blender, video editing, and Multiverse presentations)
While the Machine Learning scenario is less complex since it does not rely on the GPU for display, we will outline the complete end-to-end process to accommodate both use cases.
Supported GPUs
If you are deploying DaDesktop on-premises or have requested specific hardware for your private server, please consider the following:
Our testing primarily focuses on the DaDesktop system using AMD Radeon RX 6000 series cards (specifically the RX 6400) and Nvidia RTX graphics cards. Generally, models released prior to 2018 are not supported.
Integrated GPUs for Ryzen 7/9 processors and Intel integrated graphics (iGPUs) are expected to function correctly; however, these configurations are not subject to our automated testing procedures.
DD Node Side
The directory dadesktop_npnode_deploy/modules/build-os-template contains scripts designed to configure the Linux guest for GPU support as the primary display, enabling switching between GPU-accelerated machines and CPU-rendered screens.
Guest Settings
Ensure that the "support_qemu" parameter in /var/lib/kvm/templatename/sysinfo.json is set to false. This is necessary to establish a VNC connection within the guest, as QEMU VNC is unable to render 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)
We utilize IddSampleDriver to create a virtual display adapter and monitor in the Windows 10 template. If your GPU is not connected to a physical monitor, simply install this driver.
-
Copy the IddSampleDriver to the c:\IddSampleDriver folder
-
Install the certificate
-
Install the driver
-
Navigate to "Display Settings" to identify multiple displays. Under "Advanced display settings", locate Display 2 or 3, which is typically named "Linux FHD" (the virtual display we create.). Note the display number (N), then return to the "Select and rearrange displays" section. Select display N and, in the "Multiple displays" section, choose "Show only on N" if available. Designate it as the main display and 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 are not utilizing the virtual display.)
-
If a display is named "AMD vDisplay" (typically Display 2:):
Performance may be sluggish; if the option is available, select "Disconnect this display".
(Selete Display x, and in the "Multiple displays" section, use the drop-down menu to choose the Disconnect this display option.)
-
If a display is named "Qemu Monitor" (typically Display 1:):
You may also choose "Disconnect this display" if the option is present.