Custom OS Template for GPU Passthrough
To prepare your custom template for GPU support, follow the steps outlined below.
There are two primary scenarios for GPU passthrough to keep in mind:
- Machine Learning (no display necessary, e.g., OpenCL, etc.)
- Image processing (like OBS Studio, Blender, video editing, Multiverse presentations, etc.)
While the machine learning use case requires less work (the display need not tap into the GPU), we will go through the entire workflow to cover both scenarios.
Compatible GPUs
If you run DaDesktop on-premises or source specific cards for your private server, here are some points to consider:
Our testing primarily focuses on the AMD Radeon RX 6000 series (especially the RX 6400) and Nvidia RTX cards. Generally, models released before 2018 are not supported.
Integrated graphics on Ryzen 7/9 processors and Intel iGPUs should work fine, but we don't run automated tests against them.
DD Node Side
dadesktop_npnode_deploy/modules/build-os-template includes scripts that modify the Linux guest to use the GPU as the primary display, allowing you to switch between GPU-accelerated machines and CPU-rendered screens.
Guest Settings
Make sure that the "support_qemu" key in /var/lib/kvm/templatename/sysinfo.json is set to false; this way you can connect to the guest's VNC,since QEMU's VNC cannot display the passthrough GPU screen.
Testing
Method 1: vblank_mode=0 glxgears
Second Method:
/apps/dd-guest/check-gpu
Windows Guest Settings When No Physical Monitor Is Attached (Most Cases)
We use 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 c:\IddSampleDriver folder
-
Install certificate
-
Install the driver
-
Go to "Display Setting" , you'll see multiple displays. Check "Advanced display settings". Typically, Display 2 or 3 named "Linux FHD" is the virtual display we've created. Note that display number as N , then head back to the "Select and rearrange displays” section, choose display N, and under “Multiple displays” select "Show only on N" if that option exists, and set it as the main display. Change its resolution .
-
If you don't see a display named "Linux FHD":
Open "Device Manager" -> "Display Adapters" -> "IddSampleDriver Device": right-click and enable the device. (You can disable it when you're not using the virtual display.)
-
If you find a display named "AMD vDisplay", usually Display 2:
it may be slow and you can "Disconnect this display" if that option is present.
(Choose Display x, then in the “Multiple displays” section, pull down the menu and pick Disconnect this display.)
-
If there's a display called "Qemu Monitor", typically Display 1:
You can also "Disconnect this display" when that option is available.
