• running antergos in qemu with nvidia gpu passthrough

    i have a working windows10 setup with nvidia gpu-passthrough running for gaming, i use steam inhomestreaming from win10 vm to steam running on the linux host and vfio-networking, which is working great. however i would like to use/pay for linux games and use the linux ports of games i already own on steam instead the windows ones, as i would like to support the platform whenever possible, so i tried to setup a antergos/arch with gpu passthrough. i had this running some months ago, however i can’t get this working again since december approx. installation of antergos itself is working fine, the problem appears after installing the native nvidia-driver, booting into X11 afterwards results in a grey screen telling “something went wrong”, while i do see the card initialized on the display connected to it. i tried to boot into the shell/single-user.target, replacing lightdm with gdm and disabling wayland wherever possible, but this also doesn’t change things. does anyone here have something similar working? if anyone is wondering, my second gpu is way faster and newer than my primary one, that is used in my host linux, i simply would like to be able to use it for linuxgaming too

    i’d like to add, the card is use for gaming has a pascal architecture, so nouveau isn’t an option here

  • for anyone interested i got this working now. key was to use q35 instead of i440, and i guess also setting kvm=off to make the vm appear as not being a vm to the gpu. also i use systemd-boot instead of grub

    here is my current qemu config (for running a already existing vm)

    # PCI address of the passtrough devices
    qemu-system-x86_64 \
    -enable-kvm \
    -m 16384 \
    -cpu host,kvm=off \
    -smp 8,sockets=1,cores=4,threads=2 \
    -machine pc-q35-2.7,accel=kvm \
    -soundhw hda \
    -bios /usr/share/edk2/ovmf/OVMF_CODE.fd \
    -device vfio-pci,host=$DEVICE1,addr=0x8.0x0,multifunction=on,x-vga=on \
    -device vfio-pci,host=$DEVICE2,addr=0x8.0x1 \
    -vga none \
    -device qxl \
    -device virtio-net-pci,netdev=user.0,mac=52:54:00:a0:66:43 \
    -netdev user,id=user.0 \
    -drive file=$IMAGE,if=none,id=drive-virtio-disk0,format=qcow2,cache=unsafe \
    -device virtio-blk-pci,scsi=off,addr=0x7,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=2 \
    -rtc base=localtime,driftfix=slew \
nvidia166 virtualization8 qemu5 gpu-passthrough1 Posts 2Views 1561
Log in to reply
Bloom Email Optin Plugin

Looks like your connection to Antergos Community Forum was lost, please wait while we try to reconnect.