GPU Passthrough Custom OS Template

When building your custom template to work with GPU, follow these steps.

GPU passthrough generally falls into two main scenarios:

While the Machine Learning scenario involves fewer steps (since the display doesn't rely on the GPU), we'll walk through the complete procedure to handle both use cases.

Supported GPU

If you're running DaDesktop on-premises or asking for specific cards for your private server, keep these points in mind.

Our testing for the DaDesktop system is mainly done on AMD Radeon RX 6000 series cards (especially the RX 6400) and Nvidia RTX cards. Typically, models released before 2018 aren't supported.

Additionally, integrated GPUs from Ryzen 7/9 and Intel iGPUs should work without issues, though we don't run automated tests on them.

DD Node side

The path dadesktop_npnode_deploy/modules/build-os-template includes scripts that modify a Linux guest so it can use the GPU as the primary display and toggle between GPU-accelerated machines and CPU-rendered screens.

Guest Settings

Make sure that "support_qemu" inside /var/lib/kvm/templatename/sysinfo.json is set to false, allowing you to connect via VNC within the guest, because qemu vnc cannot render 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 rely on IddSampleDriver to create a display adapter and virtual monitor inside the Windows 10 template. Just install it if your GPU doesn't have a physical monitor connected.

Head to "Device Manager" -> "Display Adapters" -> "IddSampleDriver Device": right-click and enable the device. (You can disable it when the virtual display isn't needed.)

it will be slow, and you can "Disconnect this display" if the option is available.

(Choose Display x, under "Multiple displays", use the drop-down and pick the Disconnect this display option.)

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