Skip to main content
The Virtual Display Driver supports advanced multi-GPU configurations through LUID (Locally Unique Identifier) based adapter selection. This allows you to precisely control which GPU renders the virtual display.

Overview

In multi-GPU systems, the driver needs to know which GPU should handle the virtual display rendering. The driver provides multiple methods for GPU selection:
  1. Automatic selection - Uses the GPU with the most video memory
  2. Name-based selection - Specify GPU by friendly name
  3. PCI bus selection - Use PCI bus number for deterministic selection
  4. LUID-based selection - Direct LUID specification (most precise)

Basic GPU Configuration

Configure target GPU in vdd_settings.xml:
<gpu>
    <friendlyname>default</friendlyname>
</gpu>
gpu.friendlyname
string
default:"default"
Target GPU adapter specification.Valid values:
  • default - Automatically select GPU with most video memory
  • GPU name - e.g., NVIDIA GeForce RTX 4090
  • name,bus - GPU name with PCI bus number, e.g., NVIDIA GeForce RTX 4090,1

Automatic GPU Selection

When set to default, the driver automatically selects the best GPU:
<gpu>
    <friendlyname>default</friendlyname>
</gpu>
Selection criteria:
  1. Enumerate all available GPUs
  2. Sort by dedicated video memory (descending)
  3. Select GPU with the most memory
Automatic selection works well for most systems. The driver will choose the most powerful GPU.

Name-Based GPU Selection

Specify a GPU by its exact friendly name:
<gpu>
    <friendlyname>NVIDIA GeForce RTX 4090</friendlyname>
</gpu>

Finding GPU Names

To find available GPU names, check the driver logs or use Device Manager:
1

Open Device Manager

Press Win + X and select “Device Manager”
2

Expand Display Adapters

Find the “Display adapters” section
3

Copy GPU name

Right-click the GPU and copy its exact name
4

Update configuration

Paste the name into <friendlyname> in vdd_settings.xml
Common GPU names:
  • NVIDIA GeForce RTX 4090
  • NVIDIA GeForce RTX 4080
  • AMD Radeon RX 7900 XTX
  • Intel(R) UHD Graphics 770
GPU names are case-sensitive and must match exactly, including spaces and special characters.

PCI Bus-Based Selection

For deterministic GPU selection in multi-GPU systems with identical GPUs, use PCI bus numbers:
<gpu>
    <friendlyname>NVIDIA GeForce RTX 4090,1</friendlyname>
</gpu>
Format: GPU_NAME,BUS_NUMBER

Finding PCI Bus Numbers

Use Device Manager or command-line tools:
  1. Open Device Manager
  2. Right-click GPU → Properties
  3. Go to “Details” tab
  4. Select “Location information”
  5. Look for “PCI bus X”

Why Use Bus Numbers?

PCI bus numbers are essential when you have multiple identical GPUs:
<!-- System with 2x RTX 4090 -->
<gpu>
    <!-- Use GPU on PCI bus 1 -->
    <friendlyname>NVIDIA GeForce RTX 4090,1</friendlyname>
</gpu>
Without the bus number, the driver cannot distinguish between identical GPUs and may select the wrong one.
PCI bus numbers are assigned by the system and remain consistent across reboots unless hardware changes.

LUID-Based Selection

The driver uses LUIDs (Locally Unique Identifiers) internally for GPU identification. When you specify a GPU name or bus number, the driver resolves it to an LUID.

LUID Structure

An LUID is a 64-bit identifier consisting of:
  • LowPart - Low 32 bits (DWORD)
  • HighPart - High 32 bits (LONG)

LUID Resolution Process

// Simplified driver logic
if (friendlyname == "default") {
    // Load from adapter.txt or auto-select best GPU
    gpuName = selectBestGPU();
} else {
    gpuName = friendlyname;
}

// Resolve GPU name to LUID
if (contains(gpuName, ',')) {
    // Format: "name,bus"
    busNumber = extractBusNumber(gpuName);
    LUID = ResolveAdapterLuidFromPciBus(busNumber);
} else {
    // Format: "name"
    LUID = FindGPUByName(gpuName);
}

// Apply LUID to adapter
IddCxAdapterSetRenderAdapter(adapter, LUID);

Alternative: adapter.txt File

Instead of using vdd_settings.xml, you can create an adapter.txt file: Location: C:\VirtualDisplayDriver\adapter.txt Content:
NVIDIA GeForce RTX 4090
or with bus number:
NVIDIA GeForce RTX 4090,1
The adapter.txt file is only used when <friendlyname> is set to default in vdd_settings.xml.
Priority:
  1. If friendlyname is not default: use the value from vdd_settings.xml
  2. If friendlyname is default and adapter.txt exists: use the GPU from adapter.txt
  3. Otherwise: auto-select best GPU

Multi-GPU Configuration Examples

Dual GPU System (Different GPUs)

<!-- System: RTX 4090 (main) + RTX 3060 (encoding) -->
<gpu>
    <!-- Use the RTX 4090 for virtual display -->
    <friendlyname>NVIDIA GeForce RTX 4090</friendlyname>
</gpu>

Dual GPU System (Identical GPUs)

<!-- System: 2x RTX 4090 in SLI/NVLink -->
<gpu>
    <!-- Use the second GPU (PCI bus 1) -->
    <friendlyname>NVIDIA GeForce RTX 4090,1</friendlyname>
</gpu>

Laptop with iGPU + dGPU

<!-- Laptop: Intel UHD 770 (iGPU) + RTX 4060 (dGPU) -->
<gpu>
    <!-- Use the discrete GPU -->
    <friendlyname>NVIDIA GeForce RTX 4060 Laptop GPU</friendlyname>
</gpu>

Hybrid AMD + NVIDIA System

<!-- System: AMD Radeon + NVIDIA GeForce -->
<gpu>
    <!-- Use NVIDIA GPU for NVENC encoding support -->
    <friendlyname>NVIDIA GeForce RTX 4070</friendlyname>
</gpu>

GPU Enumeration in Driver Logs

The driver logs all available GPUs on startup:
[INFO] Available GPUs:
[INFO]   0: NVIDIA GeForce RTX 4090 (24576 MB) - LUID: 12345-67890
[INFO]   1: Intel(R) UHD Graphics 770 (128 MB) - LUID: 54321-9876
[INFO] Selected GPU: NVIDIA GeForce RTX 4090
Use these logs to verify GPU selection and find exact GPU names.

Runtime GPU Detection

The driver can detect and report GPU information at runtime:
// From Driver.cpp
vector<GPUInfo> getAvailableGPUs() {
    vector<GPUInfo> gpus;
    ComPtr<IDXGIFactory1> factory;
    CreateDXGIFactory1(IID_PPV_ARGS(&factory));
    
    for (UINT i = 0;; i++) {
        ComPtr<IDXGIAdapter> adapter;
        if (!SUCCEEDED(factory->EnumAdapters(i, &adapter))) {
            break;
        }
        
        DXGI_ADAPTER_DESC desc;
        adapter->GetDesc(&desc);
        
        GPUInfo info{
            desc.Description,
            adapter,
            desc
        };
        gpus.push_back(info);
    }
    
    return gpus;
}

Advanced: Direct LUID Configuration

For advanced scenarios, you can directly query and use LUIDs:
1

Query GPU LUID

Use DXGI to enumerate adapters and retrieve their LUIDs:
DXGI_ADAPTER_DESC desc;
adapter->GetDesc(&desc);
LUID luid = desc.AdapterLuid;
2

Apply LUID to adapter

The driver uses the LUID internally:
IDARG_IN_ADAPTERSETRENDERADAPTER arg{};
arg.PreferredRenderAdapter = luid;
IddCxAdapterSetRenderAdapter(adapter, &arg);
Direct LUID manipulation requires driver code modifications. Most users should use name or bus-based selection.

Command-Line GPU Configuration

You can change the GPU at runtime using the command-line interface:
# Set GPU by name
vddutil --gpu "NVIDIA GeForce RTX 4090"

# Set GPU by name and bus
vddutil --gpu "NVIDIA GeForce RTX 4090,1"
See the PowerShell scripts reference for automated GPU configuration tools.

Troubleshooting

Possible causes:
  • GPU name mismatch
  • friendlyname still set to default
  • Typo in GPU name
Solutions:
  • Check driver logs for available GPUs
  • Verify exact GPU name from Device Manager
  • Use bus number if you have identical GPUs
Possible causes:
  • GPU name doesn’t match exactly
  • GPU disabled or not present
  • Driver hasn’t detected GPU yet
Solutions:
  • Verify GPU is enabled in BIOS
  • Check Device Manager for GPU status
  • Try default to use automatic selection
Cause: Using name-only selection with multiple identical GPUsSolution: Use bus-based selection: GPU_NAME,BUS_NUMBER
Possible causes:
  • Configuration not applied
  • Driver not restarted
  • Syntax error in XML
Solutions:
  • Verify XML syntax is correct
  • Restart driver after configuration change
  • Check driver logs for errors

Best Practices

1

Use default for single-GPU systems

If you only have one GPU, keep <friendlyname>default</friendlyname>.
2

Use names for multi-GPU (different models)

When GPUs are different, use the exact GPU name.
3

Use bus numbers for identical GPUs

For systems with multiple identical GPUs, always include the bus number.
4

Verify in logs

Always check driver logs to confirm the correct GPU was selected.
5

Consider power and thermals

Choose the GPU that can handle the additional virtual display workload.

Performance Considerations

Use discrete GPU

Dedicated GPUs provide better performance than integrated graphics.

Consider encoding workload

If using hardware encoding, select GPU with best encoder (NVENC, VCE).

Balance workloads

In multi-GPU systems, distribute workloads across GPUs.

Monitor GPU usage

Use GPU monitoring tools to verify the selected GPU is being used.

Settings Overview

Complete configuration file reference

PowerShell Scripts

Automate GPU configuration with scripts

Build docs developers (and LLMs) love