GPU Passthrough Custom OS Template
When setting up your custom template to support GPU, just follow the steps below.
Please be aware there are two main scenarios for GPU passthrough:
- Machine Learning (no screen needed, e.g. OpenCL, etc.)
- Image processing (e.g. OBS Studio, Blender, Video Editing, Multiverse presentations, etc.)
While the Machine Learning use case is more straightforward (since the display doesn't need to rely on the GPU), we'll walk through the full process so both scenarios are supported.
Supported GPU
If you're running DaDesktop on premise, or requesting specific cards for your private server, here are a few things to keep in mind.
We mainly test the DaDesktop system against the AMD Radeon RX 6000 series (particularly the RX 6400) and Nvidia RTX cards. Typically, models released before 2018 won't be compatible.
Additionally, integrated GPUs for Ryzen 7/9 and Intel iGPUs should work without issue, though we don't run automated tests against them.
DD Node side
dadesktop_npnode_deploy/modules/build-os-template contains scripts to adapt the Linux guest so it can use GPU as the primary display and switch between GPU-accelerated machines and a CPU-rendered screen.
Guest Settings
Please confirm that "support_qemu" in /var/lib/kvm/templatename/sysinfo.json has been set to false, so you can connect to the VNC inside the guest — because 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 use IddSampleDriver to create a display adapter and virtual monitor within the Windows 10 template. Simply install it if your GPU doesn't have a physical monitor plugged in.
-
Extract IddSampleDriver to the c:\IddSampleDriver folder
-
Install the certificate
-
Install the driver
-
Head to "Display Settings" and you'll spot multiple displays. Check "Advanced display settings". Typically, Display 2 or 3 labelled "Linux FHD" is the virtual display we've set up. Take note of that display number as N, then return to the "Select and rearrange displays" area, pick display N, and under the "Multiple displays" section, set it to "Show only on N" if that option's available, and make it the main display. Adjust its resolution.
-
If you can't find a display named "Linux FHD":
Go to "Device Manager" -> "Display Adapters" -> "IddSampleDriver Device": right-click and enable the device. (You can disable it later if you're not using the virtual display.)
-
If there's a display named "AMD vDisplay", usually Display 2:
it'll be sluggish, so you can "Disconnect this display" if that's an option.
(Choose Display x, and under the "Multiple displays" section, use the drop-down to select Disconnect this display.)
-
There's a display named "Qemu Monitor", usually Display 1:
You can also "Disconnect this display" if that option's available.