GPU Passthrough Custom OS Template
When preparing your custom template to support GPU, you should follow the instructions below.
Please note there are two major use-cases for GPU passthrough:
- Machine Learning (no screen needed, e.g. OpenCL, etc.)
- Image processing (e.g. OBS Studio, Blender, Video Editing, Multiverse presentations, etc.)
Though the Machine Learning use case requires less work (i.e., the display does not have to use the GPU), we will cover the end-to-end process to support both of these use cases.
Supported GPU
If you run DaDesktop on-premises in India, or request purchase of specific cards for your private server, here are some considerations.
We primarily test the DaDesktop system with AMD Radeon RX 6000 series (particularly the RX 6400) and Nvidia RTX cards. Typically, models released before 2018 are not supported.
Additionally, integrated GPUs on Ryzen 7/9 and Intel's iGPU should work fine, though we do not conduct automated tests on them.
DD Node side
The dadesktop_npnode_deploy/modules/build-os-template directory contains scripts to modify the Linux guest to support the GPU as the primary display and to toggle between GPU-accelerated machines and CPU-rendered screens.
Guest Settings
Please confirm that the "support_qemu" field in /var/lib/kvm/templatename/sysinfo.json is 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 virtual monitor in the Windows 10 template. Just install it if your GPU does not have a monitor connected.
-
Extract IddSampleDriver to the C:\IddSampleDriver folder
-
Install the certificate
-
Install the driver
-
Go to 'Display Settings', where you will see multiple displays. Check 'Advanced display settings'. Typically, Display 2 or 3, labelled 'Linux FHD', is the virtual display we have created. Note the display number as N, then return to the 'Select and rearrange displays' section, select 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.
-
If you cannot find a display named 'Linux FHD':
Navigate to 'Device Manager' -> 'Display Adapters' -> 'IddSampleDriver Device', right-click and enable the device. (You can disable the device if you are not using the virtual display.)
-
If a display named 'AMD vDisplay' appears, it is usually Display 2:
it may be slow, and you can choose 'Disconnect this display' if that option is available.
(Choose Display x, and under the 'Multiple displays' section, use the drop-down menu to select the Disconnect this display option.)
-
If a display named 'Qemu Monitor' is present, it is usually Display 1:
You can also choose 'Disconnect this display' if that option is available.
