Hacker News new | ask | show | jobs
by babby 3946 days ago
This is pretty much the preferred cure from what I've gathered. If you can build a PC with two GPU's (or merely one PCIe and one integrated), you can game, use Photoshop nearly natively.

But as you have said, it's not as straighforward as I'd like. I haven't tried it yet but it's nice seeing others having success.

Are there any up to date guides and best practices for this?

2 comments

http://vfio.blogspot.com/ is a good guide for setting it up.

https://www.reddit.com/r/linux_gaming/comments/2z2y7h/gpu_pa... is another fairly concise guide (a little out of date though).

https://bbs.archlinux.org/viewtopic.php?id=162768 is the main point of discussion for it - too much to read through entirely, but the top posts include a lot of info, and it contains a lot of valuable information on quirks for specific hardware if you search. Some of the stuff is outdated though (eg the kernel includes a lot of the patches now), and it's targetted at Arch, but most instructions should apply to any distro.

Another key point is, you need VT-d/IOMMU support on your motherboard and CPU, which isn't universal (only in the last few generations of intel CPUs, with some excptions that don't support it. And motherboard support can vary between OEMs). Check https://docs.google.com/spreadsheet/ccc?key=0Aryg5nO-kBebdFo... to see if others have had any luck with your hardware, or before making any purchases.

Thanks for the extra reddit link which was definitely more in layman terms.
Much appreciated, I'm definitely saving this!
Interesting!

This could work with two nvidia based cards ? And when the VM isn't On, the host could use the main GPU ?

Someone share more info about this!

Two different nvidia cards should work, but I don't think it's possible to do it with two cards of the same model.

You can't switch a GPU between host and VM without rebooting, you have to assign one GPU to the VM through kernel boot options, which will hide it from the host.

A lot of people also just use a dedicated (Nvidia/AMD) GPU for the windows VM for gaming and heavy duty things, and only use their onboard Intel GPU for the linux host, which is sufficient for normal usage if you're doing all your gaming through the VM anyway.

See my post above for some links with more info.

I believe it should be possible to use two cards of the same model, using pci-stub instead of blacklisting the driver. I've never gotten it to work, but I also think it should be possible to move a card from the guest back to the host (though that might require some more work on the kernel and/or other components).