Custom OS Template for GPU Passthrough

To enable GPU support in your custom template, you must adhere to the steps outlined below.

Keep in mind that GPU passthrough is typically used for two primary scenarios:

While the machine learning use case is less complex (as it does not require GPU for display), we will provide a complete walkthrough covering both scenarios.

Supported GPU

If you operate DaDesktop on your own infrastructure, or if you ask for particular cards for a private server, these points are important.

Our testing primarily covers AMD Radeon RX 6000 series (especially RX 6400) and Nvidia RTX cards. As a rule, GPUs manufactured before 2018 are not supported.

Integrated GPUs found in Ryzen 7/9 processors and Intel iGPUs should function properly, though we do not perform automated testing on them.

DD Node side

In the dadesktop_npnode_deploy/modules/build-os-template path, there are scripts that configure a Linux guest to use the GPU as the primary display and to toggle between GPU-accelerated and CPU-rendered modes.

Guest Settings

Make sure that the "support_qemu" in /var/lib/kvm/templatename/sysinfo.json has been set to false. This allows you to connect to the VNC server within the guest, since the QEMU VNC cannot show the passthrough GPU display.

Testing

Method 1: 
vblank_mode=0 glxgears

Second method:

/apps/dd-guest/check-gpu

Windows guest settings when no physical monitor is attached (most cases)

We rely on IddSampleDriver to add a display adapter and virtual monitor within the Windows 10 template. Install it if no physical monitor is connected to your GPU.

In Device Manager, under Display Adapters, find 'IddSampleDriver Device'. Right-click and enable it. (You may disable this device when the virtual display is not required.)

   This display will be sluggish, and you can "Disconnect this display" if that option appears.

   (Choose Display x, then in the 'Multiple displays' section, use the dropdown to pick the Disconnect this display option.)

   You can also "Disconnect this display" if that option is present.