GPU Passthrough: Custom OS Template Configuration
To configure your custom template for GPU support, please adhere to the guidelines outlined below.
It is important to recognize that GPU passthrough serves two primary scenarios:
- Machine Learning workloads (where a physical screen is unnecessary, such as for OpenCL operations, etc...)
- Visual processing tasks (including use cases like OBS Studio, Blender, video editing, and Multiverse presentations, etc...)
While the Machine Learning scenario typically demands less configuration effort (specifically, the display does not need to route through the GPU), the following guide details the end-to-end process to accommodate both use cases comprehensively.
Supported GPUs
Whether you are deploying DaDesktop on-premises or requesting the purchase of specific hardware for your private server, please consider the following compatibility notes.
Our testing primarily focuses on the DaDesktop system with AMD Radeon RX 6000 series cards (particularly the RX 6400) and Nvidia RTX graphics cards. Generally, models released prior to 2018 are not supported.
Furthermore, integrated GPUs found in Ryzen 7/9 processors and Intel iGPUs are expected to function correctly, although we do not include these in our automated testing suites.
DD Node Side
The scripts located in dadesktop_npnode_deploy/modules/build-os-template are responsible for modifying the Linux guest OS to utilize the GPU as the primary display and to toggle between GPU-accelerated machines and CPU-rendered screens.
Guest Settings
Ensure that the "support_qemu" flag in /var/lib/kvm/templatename/sysinfo.json is set to false. This is necessary to enable VNC connectivity 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 establish a virtual display adapter and monitor within the Windows 10 template. If your GPU lacks a connected physical monitor, please proceed with the installation.
-
Extract the IddSampleDriver files into the c:\IddSampleDriver directory
-
Install the required certificate
-
Install the driver software
-
Navigate to "Display Settings" to view the list of detected displays. Review the "Advanced display settings"; typically, Display 2 or 3, labeled as "Linux FHD", represents the virtual display created for this purpose. Note the display number as N, return to the "Select and rearrange displays" section, choose display N, and under the "Multiple displays" settings, select "Show only on N" if available, designating it as the main display. Adjust the resolution accordingly.
-
If you cannot locate a display labeled "Linux FHD", proceed as follows:
Access "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", it is usually designated as Display 2:
Performance may be reduced. If the option is available, select "Disconnect this display".
(Choose Display x, then in the "Multiple displays" section, utilize the drop-down menu to select the Disconnect this display option.)
-
If a display is named "Qemu Monitor", it is typically assigned to Display 1:
You may also choose "Disconnect this display" if this option is presented.