Return to Level1Techs.com

Linux Gaming System using PCI passthrough with KVM


#21

Only issue is USB for hot plug, unless you use the 2nd PCIe 3.0 x16 slot for a USB addon card. With the GT 710 plugged into the PCIe 1x slot so you should be good, but I don’t have any experience with KVM, so may be some quirks with it.


#22

Thank you for the reply.

So to be clear the reset bug on the Vega cards is a thing of the pass?


#23

I am also thinking as FutureFade pointed out I could use synergy to switch mouse and keyboard. And the monitor has an input selector so I can switch that too. So I don’t think I would need USB hot plug. I need to learn more how synergy works though.


#24

Synergy is a very buggy solution when playing games. You’ll have lots of problems. The only solution I know of that really solves the problem is the Level1 KVM, but it is extremely expensive. (worth it IMO though)

I believe it was fixed as of Linux 4.16. So, if you’re running a recent kernel, you should be fine.

Synergy only works after you’ve logged in on Windows, and it uses the network to communicate


#25

Thank you for the reply!

All is clear. I hope the budget KVM I picked works. It doesn’t have terrible reviews like most of them. Or I’ll get two keyboards and mice, that should be an interested desktop space problem. I have very little space.


#26

Just an update, I bought a Logitech G710+ German keyboard map, cherry brown keys, 97€. I’ve had the keyboard for just over a week and it is a great keyboard. It reminds me of the old IBM keyboard only quieter for those that know what I am referring too. Bonus the keyboard has programmable keys. I would buy this keyboard again!


#27

I have a CPU i5 4570 with 16 GB and GTX 970 MSI, using LinuxMint 19.1 and Kernel 4.19.8.

After configure vfio in /etc/modules and reboot my system, the system apparently loads normal, because I hear the sound of starting, but I only see a black screen.

I wanted to run windows 7 with acceleration 3d in kvm / qemu


#28

You should be able to switch to another TTY, remove your changes in /etc/modules, then update-initramfs, then reboot and be back to normal.

More information on what you are trying to setup is needed such as which GPU you are trying to passthrough(the GTX 970 or the Intel HD iGPU), the output of bash script below, and any changes you made to config files for passthrough.

#!/bin/bash
  shopt -s nullglob
  for d in /sys/kernel/iommu_groups/*/devices/*; do 
  n=${d#*/iommu_groups/*}; n=${n%%/*}
  printf 'IOMMU Group %s ' "$n"
  lspci -nns "${d##*/}"
 done;

Comes from there-
https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#Ensuring_that_the_groups_are_valid


#29

the output of script above

IOMMU Group 0 00:00.0 Host bridge [0600]: Intel Corporation 4th Gen Core Processor DRAM Controller [8086:0c00] (rev 06)
IOMMU Group 1 00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller [8086:0c01] (rev 06)
IOMMU Group 1 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM204 [GeForce GTX 970] [10de:13c2] (rev a1)
IOMMU Group 1 01:00.1 Audio device [0403]: NVIDIA Corporation GM204 High Definition Audio Controller [10de:0fbb] (rev a1)
IOMMU Group 2 00:14.0 USB controller [0c03]: Intel Corporation 9 Series Chipset Family USB xHCI Controller [8086:8cb1]
IOMMU Group 3 00:16.0 Communication controller [0780]: Intel Corporation 9 Series Chipset Family ME Interface #1 [8086:8cba]
IOMMU Group 4 00:19.0 Ethernet controller [0200]: Intel Corporation Ethernet Connection (2) I218-V [8086:15a1]
IOMMU Group 5 00:1a.0 USB controller [0c03]: Intel Corporation 9 Series Chipset Family USB EHCI Controller #2 [8086:8cad]
IOMMU Group 6 00:1b.0 Audio device [0403]: Intel Corporation 9 Series Chipset Family HD Audio Controller [8086:8ca0]
IOMMU Group 7 00:1c.0 PCI bridge [0604]: Intel Corporation 9 Series Chipset Family PCI Express Root Port 1 [8086:8c90] (rev d0)
IOMMU Group 8 00:1d.0 USB controller [0c03]: Intel Corporation 9 Series Chipset Family USB EHCI Controller #1 [8086:8ca6]
IOMMU Group 9 00:1f.0 ISA bridge [0601]: Intel Corporation 9 Series Chipset Family Z97 LPC Controller [8086:8cc4]
IOMMU Group 9 00:1f.2 SATA controller [0106]: Intel Corporation 9 Series Chipset Family SATA Controller [AHCI Mode] [8086:8c82]
IOMMU Group 9 00:1f.3 SMBus [0c05]: Intel Corporation 9 Series Chipset Family SMBus Controller [8086:8ca2]

I was trying to follow the tutorial of the link below


#30

That is good, the GTX 970 does not have another slot in the same IOMMU group.

Assuming that you want to passthrough the 970 to the VM, and use the motherboard Intel iGPU for linux, you first should set the Intel iGPU as the boot GPU with the video cable plugged into the motherboard.

Then you can bind the 970 to vfio. The guide you have been using is for Debian 9, so it is not ideal for newer Debian and Ubuntu based systems. Try the guide linked below, starting at binding the GPU to vfio. Replace amdgpu with nvidia or noveau(depending on which nvidia driver you are using), and the PCI IDs with the IDs of your 970.


#31

Another update, I bought a ViewSonic XG2401, 144hz, FreeSync, 24" gaming monitor. I followed the setup instructions at Tom’s Hardware. I think it is a great monitor for 214€.

I plan to pair it with the Sapphire Nitro + Radeon RX 590. One poster said there is no reset problem. I hope @wendell has a follow up soon to his review of this card and confirms.


#32

I wanted to use 3d in kvm / qemu to be able to run one or another game of windows 7 inside the emulator, but using windows 7 as the same host, and without having to change the monitor


#33

If you want to use passthrough, then you need two GPUs. One to use for the Linux host OS, and one that is passed through into the VM for the guest OS(in your case Windows 7)

The GPU that is passed through is NOT available for the host OS. So once Linux stars booting, it will not output any video until the guest OS in the VM boots. With passthrough, you need a second monitor or a second input on your monitor unless you use looking-glass.(see below)

https://looking-glass.hostfission.com/

https://www.youtube.com/watch?v=U44lihtNVVM&t=1s