[SOLVED] i5-4440 / HD 4600 passthrough, code 43

Zoxfee

New Member
Jul 27, 2020
8
0
1
21
I've looked through a number of posts here on passthrough. Most mention nvidia but a few go through the integrated graphics.
Some of the settings I have used caused crashes and non-boots, others have brought up the the brink of success halted by the "code 43" error.
I have followed the wiki (blacklisting modules, modifying grub, proper vfio config)

Legacy boot (BIOS) for host, SeaBIOS for the guest

proxmox-ve: 6.2-1 (running kernel: 5.4.44-2-pve)
pve-manager: 6.2-10 (running version: 6.2-10/a20769ed)
pve-kernel-5.4: 6.2-4
pve-kernel-helper: 6.2-4
pve-kernel-5.4.44-2-pve: 5.4.44-2
pve-kernel-5.4.34-1-pve: 5.4.34-2
ceph-fuse: 12.2.11+dfsg1-2.1+b1
corosync: 3.0.4-pve1
criu: 3.11-3
glusterfs-client: 5.5-3
ifupdown: 0.8.35+pve1
ksm-control-daemon: 1.3-1
libjs-extjs: 6.0.1-10
libknet1: 1.16-pve1
libproxmox-acme-perl: 1.0.4
libpve-access-control: 6.1-2
libpve-apiclient-perl: 3.0-3
libpve-common-perl: 6.1-5
libpve-guest-common-perl: 3.1-1
libpve-http-server-perl: 3.0-6
libpve-storage-perl: 6.2-5
libqb0: 1.0.5-1
libspice-server1: 0.14.2-4~pve6+1
lvm2: 2.03.02-pve4
lxc-pve: 4.0.2-1
lxcfs: 4.0.3-pve3
novnc-pve: 1.1.0-1
proxmox-mini-journalreader: 1.1-1
proxmox-widget-toolkit: 2.2-9
pve-cluster: 6.1-8
pve-container: 3.1-12
pve-docs: 6.2-5
pve-edk2-firmware: 2.20200531-1
pve-firewall: 4.1-2
pve-firmware: 3.1-1
pve-ha-manager: 3.0-9
pve-i18n: 2.1-3
pve-qemu-kvm: 5.0.0-11
pve-xtermjs: 4.3.0-1
qemu-server: 6.2-11
smartmontools: 7.1-pve2
spiceterm: 3.1-1
vncterm: 1.6-1
zfsutils-linux: 0.8.4-pve1

agent: 1
balloon: 2048
bootdisk: scsi0
cores: 2
ide2: local:iso/wind10act.iso,media=cdrom
ide3: local:iso/virtio-win.iso,media=cdrom,size=402812K
memory: 6144
name: Win10
net0: virtio=F6:41:3B:CC:53:DB,bridge=vmbr0,firewall=1
numa: 0
ostype: win10
scsi0: local-lvm:vm-100-disk-0,cache=writeback,discard=on,size=40G
scsihw: virtio-scsi-pci
smbios1: uuid=25701a31-bf12-42eb-b34f-40149a2b3237
sockets: 1
vmgenid: 074be4f3-1240-46a2-962e-9aec53117cf9
hostpci0: 00:02.0

I do not have "args" in the <vmid>.conf because I constantly had errors or noVNC would no longer work with them.
Adding the PCI device does have the device show up in the Device Manager of the guest, even recognize the device as "Intel HD 4600 graphics"
Manual installing the drivers from the Intel site does not help

List of tweaks that did not help:
  • Changing machine to "q35" causes a non-boot situation (fail to start QEMU ...)
  • Changing cpu type from default (kvm64) to host yields no changes, boots fine but still code 43
  • adding "x-vga=on" yields
    kvm: -device vfio-pci,host=0000:00:02.0,id=hostpci0,bus=pci.0,addr=0x10,x-vga=on: vfio 0000:00:02.0: failed getting region info for VGA region index 8: Invalid argumentdevice does not support requested feature x-vga
    TASK ERROR: start failed: QEMU exited with code 1
  • I've installed a dummy HDMI and has made no difference regardless of repeating any of the settings above

I am afraid I am missing something simple, or worse, I will not be able to passthrough the GPU.

Anyone with the same cpu had better luck?
 
Just want to add I have this exact same problem. VM boots, passthrough seems to work, Intel UHD 630 appears in device manager, code 43. No matter what I do.

The worst part is I had it working only a week ago. Had to take my machine apart for maintenance, but when I put it back together, code 43 started.
 
crazyyy same ... i see my intel Iris 655 but CODE 43 ... no matter what I try, I've been stuck with this problem for 2 weeks.
 
Just want to add I have this exact same problem. VM boots, passthrough seems to work, Intel UHD 630 appears in device manager, code 43. No matter what I do.

The worst part is I had it working only a week ago. Had to take my machine apart for maintenance, but when I put it back together, code 43 started.

Could you share your vm .conf file? I am curious of your setup if it at one point was working.
When you reassembled the machine was there a replaced part? Or any possible slot changes? (RAM cards flipped, any PCI cards in different positions)
 
Okay I got it working, but not sure if I'm going to be much help since I went the UEFI/OVMF route rather than bios/legacy route. What finally got it working for me was booting the host with no monitors attached for some reason. Not sure if it's specific to my hardware. My host itself does not have a display device.

My motherboard is set to allow multi monitor (enable cpu and pcie graphics simultaneously) and CSM set to UEFI only. This seems to fix the vfio ROM error I was getting. Obviously intel virtualization turned on.

My grub line
Code:
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on iommu=pt pcie_acs_override=downstream,multifunction nofb nomodeset video=efifb:off,vesafb:off,simplefb:off"

I also added to kvm.conf
Code:
options kvm ignore_msrs=1
options kvm report_ignored_msrs=0

And I've blacklisted
Code:
blacklist i915
blacklist snd_hda_intel
blacklist snd_hda_codec_hdmi

Relevant from my vm.conf
Code:
agent: 1,fstrim_cloned_disks=1
balloon: 0
bios: ovmf
boot: c
bootdisk: scsi0
cores: 10
cpu: host,hidden=1
efidisk0: local-lvm:vm-1104-disk-1,size=4M
hostpci0: 04:00,pcie=1,x-vga=1
hostpci1: 00:02,pcie=1
hostpci2: 0a:00,pcie=1
machine: q35
memory: 16384
numa: 1
ostype: win10
scsi0: local-lvm:vm-1104-disk-0,size=100G
scsihw: virtio-scsi-pci
smbios1: uuid=2f468c1e-6b98-4f7e-8e2a-f588d2dc9fe7
sockets: 1
vga: none

The igpu is 00:02, the other devices are my pcie gpu and a usb controller. I'm only using the igpu for hardware acceleration, not display. As weird as that sounds.

Also I should mention that in testing configuration changes, shutting down the host entirely and then cold booting it makes a difference especially if you have to stop your VM due to a bsod. Proper initialization of the igpu is make or break in passthrough success.

I'll try to answer questions if you have any.
 
Swapping out the host drive with a new SSD, changed settings to UEFI and then installed host to new drive
Created a Win10 VM with ovmf from the "best practices" wiki page and immediately ran into uefi boot issues

Attempting the "Boot Manager Maintenance" method did not work, ISO came from Microsoft site

Will attempt again with SeaBIOS for the guest later and use some of the config notes from Sourcheecks

EDIT: Seabios, q35, cpu as host,hidden=1, same grub/kvm edit. Still with the same code 43 problem
Installing intel drivers in guest did not change anything
vga: none seems to create a halt somewhere (VM starts but guest agent & networking do not start so no RDP)
So removed but now with x-vga=1 (primary gpu) still have code 43 through RDP

Added dummy HDMI after this, no difference
 
Last edited:
After 2 weeks I gave up. I tried everything. Literally everything. At this point I say proxmox is just not capable to passtrough the HD4600 Intel iGPU. Period. Everyone who says otherwise is delusional or lying. End of story.
 
I get this error:

Code:
root@pve:~# echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind
-bash: echo: write error: No such device
 
It didn't work. Code 43 as always.
The linked 3 line of code didn't do anything anyway. The first line puts a 0 in the bind file, but it had 0 in it in the first place, I have checked. The second line tries to put a 0 in the /vtcon1/bind file, but there is no such file or directory in my case (no vtcon1 dir) and I get error on the third line as I wrote in my previous post. So I didn't expected different results, but thanks for the help anyway.
 
I have managed to get it work. After mindless blacklisting, modifying and endless trial and error, I wanted to know what made it to work. I have narrowed it down and even did a fresh proxmox install to verify it. I really hope it was worth it and maybe helps someone out there.

Fresh proxmox install (proxmox-ve_6.2-1). I have only changed the grub file and used legacy passtrough (args).

grub:
Code:
GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on video=efifb:off vfio-pci.ids=8086:0412"

vm.conf:
Code:
args: -device vfio-pci,host=00:02.0,x-igd-opregion=on
bios: seabios
bootdisk: scsi0
cores: 2
cpu: host
machine: q35
memory: 4096
name: vm-1
net0: e1000=12:D9:DA:74:1D:DE,bridge=vmbr0,firewall=1
numa: 0
ostype: win10
scsi0: vm1:vm-100-disk-0,cache=writeback,size=32G
scsihw: virtio-scsi-pci
smbios1: uuid=02549723-2def-46ae-8f0b-9e78d371535d
sockets: 1
vmgenid: 2cf39e7a-7ae8-4056-9fad-f1e628a05c88

What was important is to add "x-igd-opregion=on" to the args. That was the magic what fixed the code 43 error. I needed to use SeaBIOS for this to work (OVMF = Code 43). A second virtual gpu also necessary, "vga: none" makes the vm unbootable.

I have also encountered this issue:
https://forum.proxmox.com/threads/igd-passthrough-setup-broke-with-proxmox-6-2.69670/#post-312745

I've got "vfio 0000:00:02.0: failed to open /dev/vfio/2: No such file or directory" error on every vm start after I reboot the host.
That's why I had to add "vfio-pci.ids=<DEVICE ID>" to the grub file. That's fixed the vm start issue, but made the vm to freeze during boot. Adding "video=efifb׃off" to the grub however fixed that also.

Also this topic could be relevant to this issue, but I'm not sure:
https://forum.proxmox.com/threads/qemu-5-and-legacy-igd-passthrough.71036/
 
I have managed to get it work. [...]

Exact same setup, it's not showing a code 43.. Thank you!
Just a note: Proxmox host is UEFI. Have not tried this with Proxmox on BIOS/Legacy

Best to not use a dummy-HDMI as it is now seen as a second screen
noVNC resolution seems unstable, will be testing RDP & TeamViewer later


EDIT: RDP from windows works well, resolution stable
Also seems like noVNC resolution is stable again, though much slower than RDP (as expected?)
TeamViewer from windows is good too

Taskmanager shows "GPU Usage" and updates/reacts as expected when running graphic-intensive apps
 
Last edited:
Thank you @DevilhandX, I found this topic while investigating this problem and your solution has worked for me as well.
Just wanted to add: if you also include x-vga=on in the arguments for the passthrough device, you can set the VM's GPU type to "none" and the VM will boot fine.
 
Still having problems with this,
got a code 43 + no video output. Also lspci -nk shows vfio-pci driver is not being used. Only after starting the vm does this driver get used. Suggestions how i can force Vfio-pci being used.

With the above settings + dmesg | grep 0000:00:02.0
Code:
.259513] pci 0000:00:02.0: [8086:0412] type 00 class 0x030000
[    0.259521] pci 0000:00:02.0: reg 0x10: [mem 0xf7800000-0xf7bfffff 64bit]
[    0.259526] pci 0000:00:02.0: reg 0x18: [mem 0xe0000000-0xefffffff 64bit pref]
[    0.259529] pci 0000:00:02.0: reg 0x20: [io  0xf000-0xf03f]
[    0.259539] pci 0000:00:02.0: BAR 2: assigned to efifb
[    0.265865] pci 0000:00:02.0: vgaarb: setting as boot VGA device
[    0.265865] pci 0000:00:02.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none
[    0.265865] pci 0000:00:02.0: vgaarb: bridge control possible
[    0.286778] pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff]

You can see that efifb still beging assigned + not seing vfio-pci being initialised.
any help appreciated
 
Last edited:

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!