GPU Passthrough Custom OS Template
When preparing your custom template for GPU support, please 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...)
While the Machine Learning use case requires less work (since the display doesn't need to use the GPU), we'll cover the end-to-end process to support both scenarios.
Supported GPU
If you're running DaDesktop on-premise, or requesting the purchase of specific cards for your private server, here are a few things to consider:
We've been testing DaDesktop primarily against AMD Radeon RX 6000 series cards (notably the RX 6400) and Nvidia RTX cards. Generally, models from before 2018 won't be supported.
Integrated GPUs for Ryzen 7/9 and Intel iGPUs should also work fine, though we don't run automated tests against them.
DD Node side
The folder dadesktop_npnode_deploy/modules/build-os-template contains scripts to modify the Linux guest so it supports the GPU as its primary display and can switch between GPU-accelerated and CPU-rendered screens.
Guest Settings
Please verify that 'support_qemu' in /var/lib/kvm/templatename/sysinfo.json is set to false. This allows you to connect to the VNC inside the guest, since 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 monitor plugged in.
-
Copy the IddSampleDriver contents to the C:\IddSampleDriver folder
-
Install the certificate
-
Install the driver
-
Go to 'Display Settings' to see multiple displays. Check 'Advanced display settings'. Typically, Display 2 or 3, called "Linux FHD", is the virtual display we've created. Make a note of 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 the 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 and enable the device. (You can disable it later if you aren't using the virtual display.)
-
If there's a display called 'AMD vDisplay", usually Display 2:
it may be slow, and you can select "Disconnect this display" if the option is available.
(Choose Display x, under the 'Multiple displays' section, use the drop-down menu to select the Disconnect this display option.)
-
If a display named 'Qemu Monitor", appears, usually Display 1:
You can also select "Disconnect this display" if the option is available.
