HDMI ports do not have their own PCI addresses because they are not independent devices — they are output connectors built into the graphics card. When you want to route a physical monitor to a Windows virtual machine, you do not pass through a port; you pass through the entire GPU as a single PCI device. The graphics controller's address from lspci is exactly what you need.
Understanding What Passthrough Actually Hands Over
A graphics card is one PCI function. Inside it live the video controller, the HDMI/DisplayPort connectors, and often an audio device for HDMI sound. The hypervisor can only attach a PCI function as a whole — it has no way to carve out one physical connector and give it to a guest. This is why every passthrough guide talks about "the GPU" rather than "the HDMI output": the GPU is the smallest unit the virtualization hardware supports.
Consequences of this all-or-nothing model are worth knowing up front:
- Once the GPU is attached to the VM, the host loses access to it. Anything displayed on that card's outputs belongs to the guest.
- If the card also drives your main desktop, you cannot use it for both the host and the guest at the same time.
- HDMI audio on that card travels with the video; guests usually see a second audio device labeled "High Definition Audio" next to the GPU.
Finding the Correct Device Address
Run lspci and look for entries labeled "VGA compatible controller", "3D controller", or "Display controller". In a typical desktop with a discrete card, you will see something like:
01:00.0 VGA compatible controller: NVIDIA Corporation ...
01:00.1 Audio device: NVIDIA Corporation ...
The 01:00.0 VGA function is the device you pass through. The companion audio function (01:00.1) is optional but recommended if you want sound over HDMI inside the guest.
One common source of confusion: on laptops with hybrid graphics, the discrete GPU may show up as a "3D controller" rather than "VGA controller", and the Intel integrated GPU appears separately as the VGA device. Pick the entry matching the card whose physical HDMI ports you intend to use — check with lspci -k to see which driver is bound, or consult the vendor documentation for your machine to learn which GPU feeds which connector.
Prerequisites Before Adding the Device in virt-manager
- Enable IOMMU. Add
intel_iommu=on(oramd_iommu=onon AMD platforms) to your kernel command line, plusiommu=ptis often helpful. Verify withdmesg | grep -i iommuor by checking that/sys/kernel/iommu_groupsis populated. - Check the IOMMU group. The GPU must sit in its own group, or at least in a group where every member is passed through or unbound. Inspect groups with:
On many laptops the discrete GPU shares a group with other devices, which can block passthrough entirely.for g in /sys/kernel/iommu_groups/*; do echo "Group $g:"; ls "$g/devices"; done - Detach the host driver. Bind the card to
vfio-pciinstead ofnouveau/nvidia/amdgpu. Virt-manager can attempt this automatically when you add the PCI Host Device, but explicit configuration viavfio-pcimodule options or a driverctl override is more reliable.
Adding the GPU in virt-manager
With the VM powered off, open its details, choose Add Hardware, then PCI Host Device, and select the GPU's address (for example 0000:01:00.0). Repeat for the audio function if desired. Then:
- Set the firmware to UEFI (OVMF) — legacy BIOS boot often fails with modern GPUs.
- Remove any emulated
virtioor QXL video device, or keep one temporarily for initial setup. - In the guest, install the NVIDIA or AMD driver; Windows will otherwise show only a basic display adapter.
After the guest boots, its output appears on the physical monitor connected to that card. Your host display continues on the other GPU (typically the integrated one).
A Warning About Hybrid Laptop Graphics
If your machine pairs an Intel integrated GPU with a discrete one and the display outputs are wired to the Intel chip (common on Optimus-style laptops), passing through the discrete card will give the guest a GPU with no monitor attached. In that case, a single-GPU passthrough of the Intel iGPU, or a virtual display plus looking-glass-style streaming, may be a better fit than expecting a physical HDMI connection from the passed-through card. Verify which GPU physically owns the HDMI connector before investing time in the setup.
Preventing Common Failures
- Test with
virt-manager's error output: "IOMMU not found" means the kernel parameter is missing; "device not isolated" points to IOMMU group sharing. - Keep host and guest GPU drivers from fighting: blacklist the host driver for the card being passed through.
- Reserve enough RAM and enable hugepages for smoother performance, though this is optional for basic dual-display use.
Frequently Asked Questions
Can I pass through just one HDMI port of a dual-port card?
No. Passthrough operates at the PCI function level. Both connectors belong to the same function, so the guest sees and controls every output on the card.
Why does lspci show two entries for one graphics card?
Modern GPUs expose a video function and a separate HD Audio function used for sound over HDMI/DisplayPort. Pass the video function; add the audio function too if you want guest audio on that monitor.
Do I need a second GPU to keep using my host desktop?
Yes, in practice. Once the GPU is assigned to the VM, the host cannot use it. A typical setup runs the host on the integrated GPU and passes the discrete card to the guest.
The guest boots but the monitor stays blank — what now?
Confirm you are using UEFI/OVMF firmware, that the correct driver is installed in the guest, and that the monitor is plugged into the passed-through card's port rather than the host GPU's port.
Is the VGA controller address always the right one to use?
Use the address of the device whose physical outputs you want the guest to drive. On desktop systems that is usually the "VGA compatible controller" entry for the discrete card; on hybrid laptops it may be listed as a "3D controller", and the outputs may actually belong to the integrated GPU instead.