GPU Passthrough Custom OS Template
Follow the steps below when setting up your custom template to work with GPU.
Please be aware that GPU passthrough generally serves two main purposes:
- Machine Learning (no display required, such as OpenCL, etc.)
- Image processing (for example, OBS Studio, Blender, video editing, Multiverse presentations, etc.)
Although the Machine Learning scenario demands less effort (since the display doesn't need GPU acceleration), we'll walk you through the complete setup to accommodate both scenarios.
Supported GPU
If you're running DaDesktop on-premises, or ordering specific graphics cards for your private server, keep these points in mind.
We primarily test DaDesktop with AMD Radeon RX 6000 series cards (particularly the RX 6400) and Nvidia RTX models. Typically, GPUs released before 2018 aren't supported.
Integrated GPUs from Ryzen 7/9 and Intel's iGPUs should work without issue, though we don't perform automated testing on them.
DD Node side
dadesktop_npnode_deploy/modules/build-os-template contains scripts that configure a Linux guest to use the GPU as the primary display and toggle between GPU-accelerated machines and CPU-rendered screens.
Guest Settings
Please confirm that the "support_qemu" in /var/lib/kvm/templatename/sysinfo.json has been set to false, so that 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 configuration when there's no physical monitor attached (most common case)
We use IddSampleDriver to create a display adapter and visual monitor in the Windows 10 template. Just install it if your GPU does not have a monitor plugged in.
-
Extract IddSampleDriver to the c:\IddSampleDriver folder
-
Install the certificate
-
Install the driver
-
Go to "Display Setting" and you'll see multiple displays. Check "Advanced display settings". Usually Display 2 or 3 which is named "Linux FHD" is the virtual display we create. Remember the display number as N, then go back to the "Select and rearrange displays" section, select display N. Under the "Multiple displays" section, set "Show only on N" if this option exists, and make it the main display. Change its resolution .
-
If you can't find a display which name is "Linux FHD":
Go to "Device Manager" -> "Display Adapters" -> "IddSampleDriver Device": right click, enable device. ( You can disable the device if you don't use the virtual display.)
-
If there is a Display name is "AMD vDisplay", Usually Display 2:
it will be slow and you can "Disconnect this display" if has this option.
(Choose Display x, Under the “Multiple displays” section, use the drop-down menu and select the Disconnect this display option.)
-
There is a Display name is "Qemu Monitor", Usually Display 1:
You can also "Disconnect this display" if has this option.
