GPU Passthrough Custom OS Template
When preparing your custom template for GPU support, please follow the instructions below.
Bear in mind there are two principal 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.)
Whilst the Machine Learning use case is less demanding (as the display doesn't need to utilise the GPU), we shall walk through the complete process to cater for both scenarios.
Supported GPU
If you run DaDesktop on-premise, or request the purchase of specific cards for your private server, here are some points to consider.
We mainly test the DaDesktop system against AMD Radeon RX 6000 series (particularly the RX 6400) and Nvidia RTX cards. Typically, models manufactured before 2018 are not supported.
Integrated GPUs for Ryzen 7/9 and iGPU from Intel should also work fine, but we do not run automated tests against them.
DD Node side
dadesktop_npnode_deploy/modules/build-os-template contains scripts to modify the Linux guest to support GPU as the primary display and switch between GPU-supported machines and a CPU-rendered screen.
Guest Settings
Please confirm that the "support_qemu" setting 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 settings when no physical monitor is attached (most cases)
We use IddSampleDriver to create a display adapter and visual monitor in the Windows 10 template. Simply 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 Settings"; you can find 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 is available, and make it the main display. Change its resolution.
-
If you can't find a display named "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 named "AMD vDisplay", usually Display 2:
it will be slow and you can "Disconnect this display" if this option is available.
(Choose Display x, under the "Multiple displays" section, use the drop-down menu and select the Disconnect this display option.)
-
There is a display named "Qemu Monitor", usually Display 1:
You can also "Disconnect this display" if this option is available.