GPU Passthrough Custom OS Template
To get your custom template ready for GPU support, please follow the steps below.
As a heads up, GPU passthrough generally falls into two main scenarios:
- Machine Learning (no display required, for instance OpenCL, etc.)
- Image processing (like OBS Studio, Blender, Video Editing, Multiverse presentations, and so on)
The Machine Learning scenario is a bit simpler since the display doesn't need to leverage the GPU, but we'll walk through the complete setup to cover both situations.
Supported GPU
If you're running DaDesktop on your own hardware or requesting specific cards for your private server, here are some things to keep in mind.
Our primary testing for DaDesktop focuses on AMD Radeon RX 6000 series cards (especially the RX 6400) and Nvidia RTX cards. Typically, models released before 2018 won't be supported.
Integrated GPUs found in Ryzen 7/9 processors and Intel's iGPU should also work properly, though we don't run automated tests on them.
DD Node side
Inside dadesktop_npnode_deploy/modules/build-os-template, you'll find scripts that adjust the Linux guest to use the GPU as the primary display and toggle between GPU-accelerated machines and a CPU-rendered screen.
Guest Settings
Make sure that "support_qemu" inside /var/lib/kvm/templatename/sysinfo.json is set to false, so you can connect via VNC within the guest–because qemu vnc can't 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 set up a display adapter and virtual monitor within the Windows 10 template. Just install it if your GPU doesn't have a physical monitor connected.
-
Extract IddSampleDriver into the c:\IddSampleDriver folder
-
Install the certificate
-
Install the driver
-
Head to "Display Settings"—you should see several displays. Open "Advanced display settings." Usually Display 2 or 3 labelled "Linux FHD" is the virtual display we've created. Note down the 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 that option is available, and set it as the main display. Adjust its resolution as well.
-
If you can't spot 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 is a display named "AMD vDisplay", generally Display 2:
it may perform slowly, and you can "Disconnect this display" if the option is present.
(Choose Display x, under the "Multiple displays" section, use the drop-down menu and pick the Disconnect this display option.)
-
There is a display named "Qemu Monitor", typically Display 1:
You can also "Disconnect this display" if that option is available.