GPU Passthrough Custom OS Template
To prepare your custom template for GPU support, follow the steps below.
Keep in mind there are two main scenarios for GPU passthrough:
- Machine Learning (no display required, e.g., OpenCL, etc.)
- Image processing (e.g., OBS Studio, Blender, video editing, Multiverse presentations, etc.)
The Machine Learning use case is simpler since the display doesn't rely on the GPU, but we'll walk through the complete setup to cover both situations.
Supported GPUs
If you run DaDesktop on your own hardware, or request specific cards for your private server, keep these points in mind.
We mainly test DaDesktop with AMD Radeon RX 6000 series cards (especially the RX 6400) and Nvidia RTX cards. Typically, models released before 2018 are not supported.
Integrated GPUs found in Ryzen 7/9 processors and Intel iGPUs should also work, though we don't perform automated testing on them.
DD Node Side
The dadesktop_npnode_deploy/modules/build-os-template directory includes scripts to adjust a Linux guest to use the GPU as the primary display and to switch between GPU-accelerated machines and CPU-rendered screens.
Guest Settings
Make sure that "support_qemu" in /var/lib/kvm/templatename/sysinfo.json is set to false, so you can connect via VNC inside the guest—because qemu vnc cannot show 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 use IddSampleDriver to set up a display adapter and virtual monitor in the Windows 10 template. Just install it if your GPU doesn't have a monitor connected.
-
Extract IddSampleDriver to the c:\IddSampleDriver folder.
-
Install the certificate.
-
Install the driver.
-
Navigate to "Display Settings" and you'll see multiple displays. Open "Advanced display settings". Usually Display 2 or 3, labeled "Linux FHD", is the virtual display we've created. 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 set it as 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 it if you're not using the virtual display.)
-
If a display named "AMD vDisplay", appears, usually it's Display 2:
it will be slow, and you can "Disconnect this display" if the option is available.
(Choose Display x, and under the "Multiple displays" section, use the drop-down menu to select the Disconnect this display option.)
-
There is a display named "Qemu Monitor", typically Display 1:
You can also "Disconnect this display" if the option is present.