GPU Passthrough Custom OS Template
When you're setting up your custom template to work with GPU, follow the steps outlined here.
Just so you know, there are two main scenarios for GPU passthrough:
- Machine Learning (no display needed, e.g. OpenCL, etc.)
- Image processing (e.g. OBS Studio, Blender, Video Editing, Multiverse presentations, etc.)
Even though the Machine Learning path requires fewer steps (since the display doesn't rely on the GPU), we'll go through the complete process to cover both use cases.
Supported GPU
If you're running DaDesktop on your own hardware, or asking to buy specific cards for a private server, here are a few things to keep in mind.
Our testing mostly focuses on AMD Radeon RX 6000 series cards (particularly the RX 6400) and Nvidia RTX cards. Generally, models from before 2018 aren't supported.
As for integrated GPUs found in Ryzen 7/9 or Intel iGPUs, they should work fine, but we don't run automated tests on those.
DD Node side
The scripts under dadesktop_npnode_deploy/modules/build-os-template handle modifying the Linux guest so it can use the GPU as the primary display and switch between GPU-accelerated setups and CPU-rendered screens.
Guest Settings
Make sure that the "support_qemu" field in /var/lib/kvm/templatename/sysinfo.json is set to false. This allows you to 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 rely on IddSampleDriver to create a display adapter and a virtual monitor within the Windows 10 template. If your GPU doesn't have a monitor plugged in, just go ahead and install it.
-
Extract IddSampleDriver to c:\IddSampleDriver folder
-
Install the certificate
-
Install the driver
-
Head over to "Display Settings," where you'll find multiple displays. Open "Advanced display settings." Typically, Display 2 or 3, named "Linux FHD", is the virtual display we've set up. Keep track of that display number (call it N), then go back to the "Select and rearrange displays" area, choose display N, and under "Multiple displays," pick "Show only on N" if it's available, and make it the main display. Change its resolution as well.
-
If you don't see any display named "Linux FHD":
Navigate to "Device Manager" -> "Display Adapters" -> "IddSampleDriver Device": right-click and choose to enable the device. (You can disable it later if you're not using the virtual display.)
-
If you spot a display called "AMD vDisplay", usually Display 2:
it might perform slowly, and you can "Disconnect this display" if the option is there.
(Choose Display x, then under the "Multiple displays" section, use the drop-down to select the Disconnect this display option.)
-
You may also see a display named "Qemu Monitor", typically Display 1:
You can likewise "Disconnect this display" if the option is available.