GPU Passthrough Custom OS Template
To get your custom template ready for GPU support, follow the steps outlined below.
Keep in mind there are two main scenarios for GPU passthrough:
- Machine Learning (no display required, e.g. OpenCL, and similar frameworks)
- Visual processing (for instance, OBS Studio, Blender, video editing, Multiverse presentations, etc.)
The Machine Learning use case is simpler because the display doesn't need to rely on the GPU, but we will walk through the full process to accommodate both situations.
Supported GPU
If you run DaDesktop on your own hardware or ask to buy specific cards for your private server, here are a few things to bear in mind.
Our testing mainly targets DaDesktop on AMD Radeon RX 6000 series cards (particularly the RX 6400) and Nvidia RTX cards. Models older than 2018 are usually not supported.
Integrated GPUs from Ryzen 7/9 and Intel iGPUs should also work without issues, though we don't perform automated tests on them.
DD Node side
Inside dadesktop_npnode_deploy/modules/build-os-template you will find scripts that modify the Linux guest to use the GPU as the main display and let you switch between GPU-powered machines and CPU-rendered screens.
Guest Settings
Make sure the "support_qemu" setting in /var/lib/kvm/templatename/sysinfo.json is set to false, so you can connect via VNC inside the guest. Qemu VNC is unable to show the screen from the passthrough GPU.
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 work with IddSampleDriver to create a display adapter and virtual monitor in the Windows 10 template. Simply install it if your GPU doesn't have a physical monitor connected.
-
Extract IddSampleDriver to the c:\IddSampleDriver folder
-
Install the certificate
-
Install the driver itself
-
Open "Display Settings" and you'll see several displays. Check "Advanced display settings". Usually Display 2 or 3 labeled "Linux FHD" is the virtual display we set up. Note that display number as N, then return to the "Select and rearrange displays" area, pick display N, and under the "Multiple displays" section choose "Show only on N" if available, and make it the main display. Adjust its resolution afterward.
-
If you cannot spot a display named "Linux FHD":
Head to "Device Manager" -> "Display Adapters" -> "IddSampleDriver Device": right-click and enable the device. (You can disable it later if you stop using the virtual display.)
-
If a display named "AMD vDisplay", typically Display 2:
it might perform slowly and you can "Disconnect this display" if that option is there.
(Pick Display x, then under the "Multiple displays" section use the dropdown to select the Disconnect this display option.)
-
A display labeled "Qemu Monitor", commonly Display 1:
You may also "Disconnect this display" if the option is available.