Intel GPU透传问题:i915驱动加载失败求助
Hey there, let's tackle your Intel GPU passthrough issue step by step. First off, to answer your core question: Intel integrated GPU passthrough is absolutely feasible now—the 2015 limitations you referenced are mostly a thing of the past, as long as your hardware supports VT-d/IOMMU and you configure things correctly.
Let's Diagnose the "Bridge Device Not Found" Error
That [drm:i915_driver_load [i915]] *ERROR* bridge device not found message is the key here. Intel integrated GPUs don't exist in isolation—they're tied to a PCI Express Root Port (bridge device) on your motherboard. If you only pass through the GPU itself (00:02.0) without its parent bridge, the guest OS's i915 driver can't initialize the GPU properly.
Fix Steps to Try
1. Verify Host IOMMU Configuration & PCI Grouping
First, make sure your host's IOMMU is properly set up (even if kvm-ok says KVM works):
- Check if
intel_iommu=onis in your kernel command line:
If not, add it tocat /proc/cmdline/etc/default/grub(modifyGRUB_CMDLINE_LINUX_DEFAULT), runsudo update-grub, and reboot. - Find the IOMMU group your GPU belongs to—this will show all devices tied to the same group (which may include the bridge you need to pass through):
For example, if your GPU is in group 2, list all devices in that group:find /sys/kernel/iommu_groups/ -type l | grep -i 00:02.0
Note down the bridge device (usually something likels -l /sys/kernel/iommu_groups/2/devices/00:00.0or00:01.0).
2. Switch from pci_stub to vfio-pci
pci_stub is a basic placeholder driver—vfio-pci is designed specifically for PCI passthrough and handles device isolation better:
- Unload the i915 driver and bind your GPU (and its bridge) to
vfio-pci:
First, get your GPU's vendor/device ID withlspci -nn | grep VGA(looks like8086:1912):# Unload i915 (may need to stop X server first by switching to a TTY) sudo modprobe -r i915 # Bind GPU to vfio-pci echo "8086 1912" | sudo tee /sys/bus/pci/drivers/vfio-pci/new_id echo "00:02.0" | sudo tee /sys/bus/pci/devices/0000:00:02.0/driver/unbind echo "0000:00:02.0" | sudo tee /sys/bus/pci/drivers/vfio-pci/bind # Repeat the last three steps for the bridge device you found earlier - Make sure vfio modules load on boot: create
/etc/modules-load.d/vfio.confwith:vfio vfio-pci vfio_iommu_type1
3. Update VirtualBox VM Configuration
You need to pass through both the GPU and its parent bridge to the VM:
- First, detach any existing PCI attachments if needed:
VBoxManage modifyvm "my-vm" --pciattach 00:02.0@none - Attach the bridge device first, then the GPU (use unused PCI addresses in the guest, like
01:04.0for the bridge and01:05.0for the GPU):VBoxManage modifyvm "my-vm" --pciattach BRIDGE_DEVICE@01:04.0 VBoxManage modifyvm "my-vm" --pciattach 00:02.0@01:05.0 - Also ensure the VM has IOMMU and hardware virtualization enabled:
VBoxManage modifyvm "my-vm" --ioapic on VBoxManage modifyvm "my-vm" --hwvirtex on VBoxManage modifyvm "my-vm" --nestedpaging on
4. Guest OS (openSUSE Leap 42.3) Tweaks
openSUSE Leap 42.3 is quite old (2017 release, kernel 4.4.x), which might have limited support for newer Intel GPUs:
- Try upgrading to a newer openSUSE release (like Leap 15.5) if possible—this will give you a much newer kernel with better i915 support.
- If you must stick with 42.3, force the i915 driver to load by adding
i915.force_probe=YOUR_GPU_DEVICE_IDto the guest's kernel command line (replaceYOUR_GPU_DEVICE_IDwith the 4-digit ID fromlspci -nn, e.g.,1912).
Final Notes
Double-check that your motherboard's BIOS/UEFI has VT-d (or Intel IOMMU) enabled—this is a critical prerequisite that's easy to miss. Also, make sure no other host processes are using the GPU (like your desktop environment) before binding it to vfio-pci; you may need to switch to a TTY session to unload i915 successfully.
内容的提问来源于stack exchange,提问作者Jan

