Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

7840HS - Can't passthrough - Inappropriate ioctl for device/failed to reset PCI device #89

Open
ragokan opened this issue Dec 19, 2024 · 3 comments

Comments

@ragokan
Copy link

ragokan commented Dec 19, 2024

Hello, sadly I can't passthrough, so let me share my errors and configurations.

root@prox:~# qm start 110
error writing '1' to '/sys/bus/pci/devices/0000:c6:00.0/reset': Inappropriate ioctl for device
failed to reset PCI device '0000:c6:00.0', but trying to continue as not all devices need a reset

If I set "PCI device" to "primary" and set "Display" to "none", it sometimes says "cannot acquire lock" etc. After restarting, it says started but I can see that host ip never becomes available and I can't also do remote desktop or show it on monitor.

My configurations;
/etc/pve/qemu-server/110.conf

args: -cpu 'host,-hypervisor,kvm=off'
balloon: 12288
boot: order=ide0;ide2;net0
cores: 6
cpu: host
hostpci0: 0000:c6:00.0,pcie=1,romfile=vbios_1002_15bf.bin # Rom that I created using vbios
hostpci1: 0000:c6:00.1,pcie=1,romfile=AMDGopDriver.rom # Rom that I downloaded for my CPU 7840HS
ide0: ragexd:110/vm-110-disk-0.qcow2,discard=on,size=480G,ssd=1
ide2: local:iso/windows10.iso,media=cdrom,size=5997046K
machine: pc-q35-9.0
memory: 16384
meta: creation-qemu=9.0.2,ctime=1734556486
name: windy
net0: e1000=BC:24:11:B4:29:FF,bridge=vmbr0,firewall=1
numa: 0
ostype: win10
scsihw: virtio-scsi-single
smbios1: uuid=ee9b1963-ff53-469e-b0ff-395b7a27bec7
sockets: 1
vmgenid: 830026a6-f8f0-4a2a-9603-13f3ae4da558

/etc/modprobe.d/vfio.conf

options vfio-pci ids=1002:15bf,1002:1640
options vfio_iommu_type1 allow_unsafe_interrupts=1
softdep radeon pre: vfio-pci
softdep amdgpu pre: vfio-pci
softdep snd_hda_intel pre: vfio-pci

/etc/default/grub

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet iommu=pt"
GRUB_CMDLINE_LINUX=""

# If your computer has multiple operating systems installed, then you
# probably want to run os-prober. However, if your computer is a host
# for guest OSes installed via LVM or raw disk devices, running
# os-prober can cause damage to those guest OSes as it mounts
# filesystems to look for things.
#GRUB_DISABLE_OS_PROBER=false

# 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_TERMINAL=console

I tried Windows11, weirdly it said this PC does not support W11, so tried Windows 10. I installed drivers and I can see that drivers and device is there, but sadly when starting with monitor, it does not start :(

@smarticz
Copy link

smarticz commented Dec 20, 2024

Try in bios turn on:

  • IOMMU - its hidden or setup to AUTO, then change for ENABLED

  • AIM-T (i think its amd similar iommu)

  • SR-IOV

  • SVM mode (Virtualization CPU - like AMD-V / VT-x)

  • Extended Tag

  • Extended Synch

  • ASPM OFF <= OFF, but its power managment

@ragokan
Copy link
Author

ragokan commented Dec 20, 2024

I will check these in BIOS, thanks. It is too old but I will check :D

@ragokan
Copy link
Author

ragokan commented Dec 22, 2024

One step forward. Now I get it working, sadly after closing it, GPU or Ram something is not released. Config is;
I installed that script for GPU but I will try other stuff, too.

####%C2%A0Windows 11
agent: 1
args: -cpu 'host,-hypervisor,kvm=off'
balloon: 8196
bios: ovmf
boot: order=ide0;net0
cores: 8
cpu: host
efidisk0: ragexd-lvm:333/vm-333-disk-1.qcow2,efitype=4m,pre-enrolled-keys=1,size=528K
hostpci0: 0000:c6:00.0,pcie=1,romfile=vbios_1002_15bf.bin,x-vga=1
hostpci1: 0000:c6:00.1,pcie=1
ide0: ragexd-lvm:333/vm-333-disk-0.qcow2,discard=on,size=480G,ssd=1
machine: pc-q35-9.0
memory: 16384
meta: creation-qemu=9.0.2,ctime=1734617014
name: lucky
net0: e1000=BC:24:11:CE:52:24,bridge=vmbr0,firewall=1
numa: 0
ostype: win11
scsihw: virtio-scsi-single
smbios1: uuid=8e6076fa-c28f-4a37-bd3e-24acdca61815
sockets: 1
tags: gaming;windows
tpmstate0: ragexd-lvm:333/vm-333-disk-2.raw,size=4M,version=v2.0
vga: none
vmgenid: 2f82d26a-f8d7-4da9-951a-2190dfc5b2f6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants