iGPU on Ubuntu VM does not load

drexloor

Member
Apr 10, 2022
14
0
6
Hello together,

today I have a question for which I have not found an answer in this forum or anywhere else.

I want to use my iGPU from Intel CPU with passtrough in my ubuntu VM. It seems to be successfully passed trough to the VM, but the VM will not load the driver.

The VM is a fresh ubuntu with
Code:
22.04.3 LTS
and kernel
Code:
6.2.0-37-generic

lspci -k shows

Code:
...

00:01.0 VGA compatible controller: Device 1234:1111 (rev 02)
Subsystem: Red Hat, Inc. Device 1100
Kernel driver in use: bochs-drmKernel modules: bochs
...

01:00.0 VGA compatible controller: Intel Corporation HD Graphics 630 (rev ff)
Kernel modules: i915
...

which leads me to the assumption that the passtrough is succesfull but the driver is not loaded.

/etc/default/grub

Code:
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'

#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

Configuration of the VM

Code:
acpi: 0
agent: 1
args: -cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,hv_vendor_id=NV43FIX,kvm=off'
balloon: 0
bios: ovmf
boot: order=scsi0;net0
cores: 4
cpu: host,hidden=1,flags=+pcid
efidisk0: local-lvm:vm-102-disk-0,efitype=4m,pre-enrolled-keys=1,size=4M
hostpci0: 0000:00:02,pcie=1
machine: q35
memory: 2048
meta: creation-qemu=8.1.2,ctime=1700830126
name: ubuntu
net0: virtio=BC:24:11:82:51:F9,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsi0: local-lvm:vm-102-disk-1,iothread=1,size=32G
scsihw: virtio-scsi-single
smbios1: uuid=5d3eea7b-a938-4ce3-8085-a7e5f8a7926a
sockets: 1
vmgenid: 19386cfa-399d-4755-9372-1ee73d0333fb

/etc/default/grub on proxmox host
Code:
  GNU nano 7.2                                                       /etc/default/grub                                                              
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
#GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on"
#GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt pcie_acs_override=downstream,multifunction initcall_blacklist=sysfb_init video=simplefb:of>
#GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt pcie_acs_override=downstream,multifunction initcall_blacklist=sysfb_init video=simplefb:of>
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on i915.enable_gvt=1 iommu=pt video=efifb:off video=vesafb:off"

GRUB_CMDLINE_LINUX="consoleblank=10 loglevel=3"
#GRUB_CMDLINE_LINUX=""


# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

/etc/modules on proxmox host
Code:
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd
kvmgt

/etc/modprobe.d/blacklist.conf
Code:
blacklist i915
blacklist nvidiafb
blacklist nouveau
blacklist nvidia
#blacklist snd_hda_codec_hdmi
#blacklist snd_hda_intel
blacklist radeon
blacklist amdgpu

/etc/modprobe.d/intel-uhd-passthru.conf
Code:
install i915 /bin/false

Proxmox is running 8.1.3 with kernel 6.5.11-4-pve powered by a Intel(R) Core(TM) i5-7500T CPU

What should I do to get the iGPU running?
If you need any other information, tell me.
 
Last edited:
what happens if you 'modprobe i915' in the guest? can you post the output of 'dmesg' from the guest?
 
it would seem it's not passed through correctly,
can you also post the host dmesg?

also, could you try adding the 'legacy-igd=1' to the 'hostpci line so that it looks like:

hostpci0: 0000:00:02,pcie=1,legaciy-igd=1
?
 
ok, could you then maybe try to move to i440fx + disable pcie for the device? (basically i want to check if enabling the legaciy-igd setting does make it work)
 
To get the machine starting I have to set VGA to none. There is a error if not.
After that the machine seems to boot, but jumps to 50% CPU usage, normally it runs around 10-20%. And my remote connection is not working. So I cannot see what it is doing.
And also I am now unable to stop the machine.
Code:
()
trying to acquire lock...
TASK ERROR: can't lock file '/var/lock/qemu-server/lock-102.conf' - got timeout
 
With i440fx, ACPI=1 and legacy-igd=0 the machine is booting and remote connection is working. lspci-k gives me a kernel drive in use. But ubuntu says that it is still using the virtual gpu

lspci -k
Code:
00:02.0 VGA compatible controller: Device 1234:1111 (rev 02)
    Subsystem: Red Hat, Inc. Device 1100
    Kernel driver in use: bochs-drm
    Kernel modules: bochs
00:10.0 VGA compatible controller: Intel Corporation HD Graphics 630 (rev 04)
    Subsystem: Dell HD Graphics 630
    Kernel driver in use: i915
    Kernel modules: i915

dmesg | grep i915
Code:
[    4.259816] i915 0000:00:10.0: Invalid PCI ROM header signature: expecting 0xaa55, got 0x4556
[    4.259822] i915 0000:00:10.0: [drm] Failed to find VBIOS tables (VBT)
[    4.260153] i915 0000:00:10.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=none:owns=io+mem
[    4.299521] i915 0000:00:10.0: [drm] Finished loading DMC firmware i915/kbl_dmc_ver1_04.bin (v1.4)
[    4.885393] i915 0000:00:10.0: [drm] [ENCODER:94:DDI A/PHY A] failed to retrieve link info, disabling eDP
[    4.894105] [drm] Initialized i915 1.6.0 20201103 for 0000:00:10.0 on minor 1
[    5.025414] i915 0000:00:10.0: [drm] Cannot find any crtc or sizes
[    5.163016] i915 0000:00:10.0: [drm] Cannot find any crtc or sizes
[    5.289892] i915 0000:00:10.0: [drm] Cannot find any crtc or sizes
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!