GPU Passthrough Custom OS Template
To prepare your custom template for GPU support, follow the steps given below.
Keep in mind that GPU passthrough typically covers two main scenarios:
- Machine Learning (where no screen is required, e.g., OpenCL, etc.)
- Image processing (e.g., OBS Studio, Blender, video editing, Multiverse presentations, etc.)
Although the Machine Learning scenario involves less effort (since the display need not utilise the GPU), we will walk through the full process to accommodate both use cases.
Supported GPU
If you operate DaDesktop on your own infrastructure, or if you request the purchase of specific cards for your private server, here are a few points to consider.
Our testing for the DaDesktop system primarily focuses on AMD Radeon RX 6000 series cards (notably the RX 6400) and Nvidia RTX cards. Typically, models released before 2018 are not supported.
Furthermore, the integrated GPUs found in Ryzen 7/9 processors and Intel iGPUs should perform adequately, but we do not carry out automated tests against them.
DD Node side
The dadesktop_npnode_deploy/modules/build-os-template directory includes scripts designed to modify the Linux guest so it can use the GPU as the primary display and toggle between GPU-backed machines and a CPU-rendered screen.
Guest Settings
Please ensure that "support_qemu" in /var/lib/kvm/templatename/sysinfo.json is set to false; this will allow you to connect to the VNC inside the guest, because 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 scenarios)
We utilise IddSampleDriver to set up a display adapter and a virtual monitor within the Windows 10 template. Simply install it if your GPU does not have a physical monitor connected.
-
Extract IddSampleDriver into the c:\IddSampleDriver folder
-
Install the certificate
-
Install the driver
-
Navigate to "Display Settings"; you will notice multiple displays listed. Check "Advanced display settings". Usually, Display 2 or 3, labelled "Linux FHD", is the virtual display we have created. Take note of this display number as N, then return to the "Select and rearrange displays" section, choose display N, and under "Multiple displays", set "Show only on N" if that option is available, and make it the main display. Change its resolution as required.
-
If you cannot find a display named "Linux FHD":
Go to "Device Manager" -> "Display Adapters" -> "IddSampleDriver Device": right-click and enable the device. (You may disable the device if you are not using the virtual display.)
-
If a display name appears as "AMD vDisplay", typically Display 2:
it will perform slowly; you can choose to "Disconnect this display" if the option is available.
(Choose Display x, under "Multiple displays", use the drop-down menu and pick the Disconnect this display option.)
-
There is a display name called "Qemu Monitor", usually Display 1:
You can also "Disconnect this display" if that option exists.