Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to create a gaming VM with passthrough based on a Gentoo
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
SarahS93
l33t
l33t


Joined: 21 Nov 2013
Posts: 693

PostPosted: Fri May 01, 2015 6:06 am    Post subject: How to create a gaming VM with passthrough based on a Gentoo Reply with quote

Im very interested to create a gaming VM with GPU passthrough based on a Gentoo Hostsystem.

Do i need Xen? VirtualBox? or is Qemu good for GPU passthrough?
I use Qemu for some VM on my existing Gentoo-System, it works fine.

What Hardware do i need for a gaming VM?
At the moment i run on a Intel Core i7-2600, they can vt-d.
My Mainboard is based on a P67 Chipset, i read that the P67 does not have vt-d support.
With the release of the 6th Intel CPU generation and the 100-Series Chipsets i plan to buy some new hardware.

I am not sure if an AMD or NVidia GPU the better way for compatibility and passthrough.
I like NVidia but AMD have a 3W (ZeroCore-Power) Option i read.
NVidia does only have 12W by doing nothing.
My System runs 24h/7day so i need so save power where i can.
Can i use the 3W ZeroCore-Power option with AMD on Linux or is this a Windows-only feature?

Do you run a gaming VM?
Back to top
View user's profile Send private message
tholin
Apprentice
Apprentice


Joined: 04 Oct 2008
Posts: 203

PostPosted: Fri May 01, 2015 2:53 pm    Post subject: Re: How to create a gaming VM with passthrough based on a Ge Reply with quote

SarahS93 wrote:
Do you run a gaming VM?

Yes, and if you ask me it's not worth the effort.

The hardware you need is a cpu with iommu support, a mobo with a chipset with iommu support with a bios with iommu support. The bios is sometimes buggy and iommu doesn't work even though the mobo should support it. You also need to use pci devices compatible with iommu. Most devices are compatible but some have hardware bugs causing problems only with iommu.

To avoid problems you also want a cpu and mobo with support for Access Control Services (ACS). I don't know of any intel consumer cpus with support for that. You need to get a xeon and avoid the cheaper xeons like E3-1200 because they also don't have support. I've heard all amd cpus have support for ACS but I can't confirm that.

More info about the ACS related problem here http://vfio.blogspot.com/2014/08/iommu-groups-inside-and-out.html
Finding out if some hardware got the right support before buying it is close to impossible. You'll have to guess and hope for the best.

I use qemu and it works fine for me.

Different graphic cards got different problems. It seems like newer versions of nvidias windows drivers check if it's running in a virtual machines and refuse to load. That problem can be worked around for now. Some amd cards have reset problems. The VM start once but can't be rebooted. Bonaire and Hawaii models are affected by that.

Check the other posts in that blog link for other relevant info.
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 6111
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Fri May 01, 2015 3:11 pm    Post subject: Reply with quote

Posting this here - in case it's useful:

http://wiki.xenproject.org/wiki/VTd_HowTo
_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Back to top
View user's profile Send private message
shazeal
Apprentice
Apprentice


Joined: 03 May 2006
Posts: 206
Location: New Zealand

PostPosted: Fri May 01, 2015 6:07 pm    Post subject: Reply with quote

I used this thread to setup my VMs

https://bbs.archlinux.org/viewtopic.php?id=162768&p=1

I managed to get OSX and Windows 7 running almost flawlessly. The windows side was rather painless since there is a lot of support for that.

The best thing to come out of it for me was discovering Qsynergy, its an amazing application :)
_________________
CFLAGS="-OmgWTFR1CE --fun-lol-loops --march=asmx86go"
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3134

PostPosted: Fri May 01, 2015 8:48 pm    Post subject: Reply with quote

I saw some video on YT showing one of those, based on qemu+kvm with PCIe passthrough (And mouse shared with synergy).
A guy who showed it claimed to have reached over 99% of native performance, with downside being it required 2 graphic cards (one for linux and 1 for passthrough) as it was hard or impossible to re-initialize it when booting and shutting down the VM.
Well, I wasn't able to distinguish between PRNG running on KVM and directly on host.

One remark on synergy from me, it's a handy thing for desktops, but I was unable to control camera with remote mouse in WoW. It was like if synergy passed absolute coords and wow dragged pointer to the middle of screen, and then synergy would move it again, and wow would drag it to the middle, and synergy.....
It would just turn rapidly, making whole thing completly unplayable.

edit: Thanks for that tip tholin, I'll keep it around for when I need synergy again ;)


Last edited by szatox on Sat May 02, 2015 6:18 pm; edited 1 time in total
Back to top
View user's profile Send private message
tholin
Apprentice
Apprentice


Joined: 04 Oct 2008
Posts: 203

PostPosted: Sat May 02, 2015 10:18 am    Post subject: Reply with quote

szatox wrote:
One remark on synergy from me, it's a handy thing for desktops, but I was unable to control camera with remote mouse in WoW. It was like if synergy passed absolute coords and wow dragged pointer to the middle of screen, and then synergy would move it again, and wow would drag it to the middle, and synergy.....
It would just turn rapidly, making whole thing completly unplayable.

Add this to your synergy.conf
Code:

section: options
  relativeMouseMoves = true
end

When the mouse cursor is on the windows desktop press scrlk on your keyboard to lock the cursor to that desktop. Then relative mouse movements work.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum