GPU Passthrough Custom OS Template
When preparing your custom template to support GPU, please adhere to the following instructions.
It is worth noting that there are two main use cases for GPU passthrough:
- Machine Learning (no display required, e.g., OpenCL, etc.)
- Image processing (e.g., OBS Studio, Blender, Video Editing, Multiverse presentations, etc.)
While the Machine Learning scenario demands less effort (since the display does not need to utilise the GPU), we will walk through the complete process to accommodate both use cases.
Supported GPU
If you operate DaDesktop on-premise or request the purchase of specific cards for your private server, here are some factors to consider.
We primarily test the DaDesktop system with the AMD Radeon RX 6000 series (notably the RX 6400) and Nvidia RTX cards. Models from before 2018 are generally not supported.
Additionally, integrated GPUs for Ryzen 7/9 and Intel iGPUs should function correctly, although we do not run automated tests against them.
DD Node side
dadesktop_npnode_deploy/modules/build-os-template contains scripts to modify the Linux guest to support GPU as the primary display and to switch between GPU-supported machines and a CPU-rendered screen.
Guest Settings
Please confirm that "support_qemu" in /var/lib/kvm/templatename/sysinfo.json is set to false, so you can connect to the VNC inside the guest, as qemu vnc cannot 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 utilise IddSampleDriver to create a display adapter and virtual monitor in the Windows 10 template. Simply install it if your GPU does not have a monitor plugged in.
-
Extract IddSampleDriver to the C:\IddSampleDriver folder
-
Install the certificate
-
Install the driver
-
Navigate to "Display Settings"; you will see multiple displays. Check "Advanced display settings". Typically, Display 2 or 3, named "Linux FHD", is the virtual display we create. Note the display number as N, then return to the "Select and rearrange displays" section, select display N, and under the "Multiple displays" section, set "Show only on N" if that option is available, and make it the main display. Change its resolution.
-
If you cannot find a display named "Linux FHD":
Go to "Device Manager" -> "Display Adapters" -> "IddSampleDriver Device": right-click and enable the device. (You can disable the device if you are not using the virtual display.)
-
If a display named "AMD vDisplay", typically Display 2:
it will be slow and you can "Disconnect this display" if that option is present.
(Choose Display x, under the "Multiple displays" section, use the drop-down menu and select the Disconnect this display option.)
-
If a display named "Qemu Monitor", typically Display 1:
You can also "Disconnect this display" if that option is present.