Ok nigga, tell me about gpu pass through. Is it really as good as people saying? Do you need 2 monitors for that?

Ok nigga, tell me about gpu pass through. Is it really as good as people saying? Do you need 2 monitors for that?

Other urls found in this thread:

01.org/igvt-g
arseniyshestakov.com/2016/03/31/how-to-pass-gpu-to-vm-and-back-without-x-restart/
hastebin.com/afokasevaw.sql
hastebin.com/uqudirukon.tex
evonide.com/non-root-gpu-passthrough-setup/#GPU_passthrough_with_QEMU
wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#.22Error_43_:_Driver_failed_to_load.22_on_Nvidia_GPUs_passed_to_Windows_VMs
wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#Using_identical_guest_and_host_GPUs
en.wikipedia.org/wiki/List_of_IOMMU-supporting_hardware
evonide.com/non-root-gpu-passthrough-setup/
twitter.com/SFWRedditGifs

You don't need two monitors as long as your monitor has more than one input source. You need two GPUs

I'm running Overwatch at 50+ FPS consistently with just Intel integrated graphics on Arch Linux using GPU passthrough. I've been I can hit 60 with a little bit of tinkering, but I'm too lazy for that. 50+ is pretty sweet F A M.

gpu pass trough.
not cpu

What you actually need:
>a cpu and a motherboard supporting PCI passthrough
>two (ideally different) GPUs
>modern lunix
I've run a setup since 2015, I can answer some questions.

Don't the IOMMU groupings effectively prevent you from passing through intel graphics?

01.org/igvt-g

Based Intel comes down from the heavens to bestow graphics virtualization upon us lowly peasants. Meanwhile AMD locks their technology down to FirePro branded cards.

Huh.
I don't think this was a thing when I set my setup up. Though it's not a conventional PCI passthrough either.

What do you mean with AMD locking the technology though? I run nVidia and know that their GTX windows driver will lock up if it detects it's running in a virtual machine while letting quadros run just fine, but I'm not familiar with AMD's quirks here.
Besides this thing of course.
arseniyshestakov.com/2016/03/31/how-to-pass-gpu-to-vm-and-back-without-x-restart/

That's new, I passed through my 270x just last year. I only stopped because I found a spare case to throw a second tower together for streaming.

Multiple VMs on one GPU will be possible with AMD video cards, but only if they are branded FirePro.

>competative shooter
>50fps
this is about 1/6th of where it should be
completely unplayable

>requires special kernel or patches
>requires 3.X kernel
so that tells me the code is shite

I dont have a problem compiling a kernel with my own patches but shit like acs bypass are ezmodo and just werk, all these patches im not so sure

No they don't.
t.rx480 owner
You don't need 2 GPUs
Don't need 2 monitors, it works fine for me. Any idiot can use virt-manager and be in business in minutes, no complicated cli commands.

Is this shit actually possible with modern GPUs? Everywhere I read says that unless you spend a shitload on a quadro/firepro the drivers don't allow it.

It's finnicky bullshit.

I just boot my Windows partition for gaymen.

for me its the way to go, I play GTA V, The Witcher 3 with GPU Passtrough. I really like it

here is an good guide to GPU Passtrough
hastebin.com/afokasevaw.sql

and my startscript
hastebin.com/uqudirukon.tex

with the -net nic command I am able to RDP into my VM via 127.0.0.1 btw

>Is it really as good as people saying?
It depends on what you've heard, I've done it on an I5 4440 with a gtx 960 and it works fine, the only reason I did it was to play witcher 3 and I didn't noticed any difference on performance with the system on dual-boot, depending on your use case scenario it could change.

>Do you need 2 monitors for that?
No, if you have a monitor with 2 entries you can just switch between entries, if your monitor doesn't have 2 entries you could use a KVM switch

>You don't need 2 GPUs
So you can do this with just a single radeon? I'm really starting to regret my GTX 970.

>no complicated cli commands
virt-manager is missing the kvm=off option which lets you run GTX cards insider virtual machines. I'm really really starting to regret my 970.

Isn't this guide starting to get outdated? I followed it in 2015 and this thread is full of shit I haven't even heard of.

It's fun.

If this is your idea of fun you might get yourself checked for autism but whatever floats your boat I guess

I generally find computers and other technology fun. It's why I'm here.
If you disagree, you might as well leave.

>Isn't this guide starting to get outdated?
I used it maybe 1 month ago, so it still works. But you are right, there will be a new kernel module for gpu passtrough.

I tried it on gigabyte 990fx and audio stuttering was terrible.

In the end I just built a second gaymen pc.

Yeah, single rx480 and muh 6600k plays doom fine in windows 7 on a vm. It's the only game that I play, or care about that doesn't have a linux option. I went with AMD unironically because of the superior linux options, such as this issue.

Sorry bout that, I only use optical out to my receiver. This has saved me many, many headaches and issues.

it's been possible for a while now
nothing new

So if I have a single GPU and no IGP I cannot use GPU passthrough? Why would that even be allowed? Or is it probably the state of loonix in 2017?

Nvidia or AMD? Nvidia will fuck you over. AMD and my iGPU is disabled in bios. I guess I just need one.

Can you outline how your VM is set up for me?

I have a 6600k and a r9 290 and I'd prefer to just use a VM in Linux. I NEED 144hz support, if there isn't 144hz support I'm gonna stick to dual booting.

here how so I set up pass through using a single AMD GPU and multiple inputs on my monitor

I really didn't do anything but follow the prompts in virt-manager. It's just like setting up a vm in virtual box or whatever. I think I had to have the w7 .iso on my disk instead of a cdrom for some reason, I can;t remember, but cdrom is the default or something anyway.

Sweet thanks

If libvirt-d won't start: systemctl enable libvirtd (as root af)

>nvidia drivers detect they're in a VM and lock up

source

>common knowledge

DOOM runs fine in WINE you fucking cuckold

I have no reason whatsoever to use wine. It's more headache than just starting a vm for me. And i get to have native performance on comfy w7, while obscuring my iprivacy, and security, somewhat.

then whats the point? the whole purpose of this is gaming in a windows guest and linux host. nobody is buying a quadro gpu just because nvidia wants to price gouge server owners who use gpus for database operations and number crunching

why not just use windows instead of jumping through all these autistic hoops. On top of that you're completely defeating the point of "muh freedomz" if you're just going to use closed source software anyway
>will linux kids ever learn

Sorry you got cucked by Nvidia, all AMD cards have this ability
I don't care about freedom, and neither does anyone else buying an Nvidia card.

It's only competitive if you play it competitively
besides, 60FPS is great

A VM requires you to pay hundreds of dollars for a Windows license and spend 12 hours installing it.

the bigger question is why would anyone prefer to game in a VM

If you're on a VM, then you're probably on a Windows host machine so just play on that.

If you're on a Linux host, then just set up passthrough there

If you're on an OSX host then literally end your life

LOL no

And where are you getting the install image from, ``genius"?

Using virt-manager is a VM using kvm/qemu. I'm on Linux when I use it for anything I need to do on Windows, including obscuring my identity online.
Already have it, or you can torrent, or download directly from Microsoft.

Is it possible to do this on laptops?

it is fucking amazing. Successfully passed through with the following hardware
>Asus H97M-E motherboard
>GTX 980
>i7 4790 (not k) CPU

Recently figured out how to rebind my dedicated Nvidia GPU back to host OS when not using VM without a system restart (you have to log out and login and switch PRIME profile in Nvidia settings to do so)
Everything I have thrown at the VM works as though I was using bare metal with minimal hassle after the initial hurdle setting it up.
Performance loss is minimal, around 5% on the CPU but can go as low as 1% with more optimization. Games are generally GPU bound so it hasn't been an issue.

check if your cpu has vt-d

Oh, thought you meant Nvidia drivers on linux.

Yeah I dont know what to tell you about that.

>stuttery framerate
>crackling sound
>unreliable input
>will spend hours trying different things to fix these and get nowhere
It's not worth it

Sorry to hear.

>crackling sound
Disable HDMI audio from GPU in VM and try using AC97 + alsa plugin instead of pulse audio, that solved the crackling for me.

>stuttery framerate
haven't had that issue, what hardware are you using?

>unreliable input
QXL without video runs fine enough for me, you can disable QXL and pass through your keyboard and mouse to the VM by device ID.
Most reliable hassle free way of getting USB input devices to work plug and play without configuration is to get a PCIE usb controller and pass the whole thing through. Just make sure you avoid ASmedia and other shitty controllers. The 5 port Inatek works fine for me

>overwatch
>needing high fps/precision
kek

is this your first day online or something?

you can pass Nvidia GPU back to host as well by switching PRIME profile in Nvidia settings then logging out and logging back in.

>I run nVidia and know that their GTX windows driver will lock up if it detects it's running in a virtual machine while letting quadros run just fine
Yes I have witnessed it, it gives error code 43 in windows if you use hyper-V extensions.
There is a simple one line workaround for now
# Basic CPU settings.(hyperv tweak for better GPU performance disable if it fucks up)
OPTS="$OPTS -cpu host,kvm=off,hv_spinlocks=0x1fff,hv_relaxed,hv_time,hv_vendor_id=Nvidia43FIX"
My next upgrade might be an AMD Vega for this reason since there is no telling whether they will fuck with this further in future drivers. And the driver telemetry of course though that is less of an issue unless they include it on the linux driver as well since the windows VM is effectively a sandbox and most of my activity is on the host OS.

lscpu | grep vmx
VT-D should be enough to get started with GPU passthrough right?

I found this guide handy when setting mine up, there might be some easier and better ones out there but this one has been fairly thorough
>evonide.com/non-root-gpu-passthrough-setup/#GPU_passthrough_with_QEMU

>Overwatch
>Competative shooter

Does GPU pass work on laptops?
If laptop has integrated and dedicated graphics card?

They don't usually design laptop motherboards with GPU passthrough in mind so the memory grouping is often fucked up.

You cannot pass the GPU through without a kernel patch if the GPU isn't in its own memory group or all devices in that memory group are passed through.

>using linux because MUH PRIVACY XD
>just run windows in a vm because that somehow makes it better
>just run steam on top of that
>try to act like you are sticking it to the man

Do you realise that you then use Windows for gaming and in VM it is isolated from your actual OS, where are all private stuff?

i bet you actually think that, how quaint

There is no escape from the botnet regardless of OS. That takes far more effort than simply installing Linux.

Windows 7 was fine, windows 8.1 started going tootie fruity and w10 went full retard with its heavy handed bullshit.
There is still benefit to using linux as host OS
, the updates are less obnoxious, VM can sit and update all it wants it won't stop me from working on my computer.

Telemetry entrenched in the OS instead of through your browser/adware/third party software is far more obnoxious, having it sandboxed in a VM is preferable.

there are plenty of ways to manage windows update yourself, and if you cannot make any of it happen then dont try to kid yourself that you can manage linux correctly

Can and have set it up to stop updating for now, but good luck disabling telemetry completely.
Far easier to do so on linux because guess what, it doesn't have any of that skulduggery.

no, you can use one monitor with 2 inputs, yes it's as good as people are saying, you just need a decent cpu and you'll get native performance

>>requires 3.x kernel
whew im already on 4.x

Can I still use one mouse and keyboard for both linux and windows? Can I tab out from my VM and use linux at the same time? Someone said you can do it with just one gpu, anyone have any more info on this? Will both OS's get rendered, or do I have to swap between them?

It stuttered no matter what, I tried HDMI audio and passing through the motherboard sound.

>Can I still use one mouse and keyboard for both linux and windows?
yes
>Can I tab out from my VM and use linux at the same time?
yes
see >Someone said you can do it with just one gpu, anyone have any more info on this? Will both OS's get rendered, or do I have to swap between them?
I don't know about using a single GPU only, trickier to pull off.
Some CPUs have integrated GPUs that you can use on the host OS while you pass through the dedicated GPU.

Awesome. I'll try and set it up with one GPU, I have a ryzen, so no integrated graphics. I imagine I could get something really cheap just for running linux.

>Can I still use one mouse and keyboard for both linux and windows?
Several methods to do so,
first method involves using device emulation like QXL to pass M+KB through to guest OS, shortcut to exit guest OS and go back to host is ctrl+alt.

Another other method is to passthrough the M+KB by USB device ID in the startup script, once the VM is shutdown the host regains access to the devices. You want the previous method, because method 2 can lock you out of the host OS unless you have a second set of M+KB.
Yet another is to use a KVM switch which handles switching between guest and host in hardware.

Reason some might prefer to pass the device through instead of some form of device emulation like QXL is for security reasons and to reduce input delay if you are playing twitch shooters or games requiring high APM and fast reaction time. Works fine for general use otherwise.

Ok, input lag could be an issue. Guess I'll just have to try it out and see. Thanks!

I wouldn't recommend you try to pull off GPU passthrough with a single GPU and a ryzen CPU as a beginner unless you have the patience and don't mind wasting all the time potentially going nowhere.
Even with access to two GPUs it is harder to pull off with a ryzen CPU primarily due to the memory grouping on current AM4 motherboards, you'd need to patch the kernel using ACS to pull it off.
I don't like having to resort to ACS patch since it can be a security risk and you will likely have to reapply it after every kernel update (not sure about that).

Better off just dual booting in your case, if you are worried about privacy then perhaps run linux on a laptop.
If you find no harm in trying and having to reinstall windows bare metal after all that effort then go ahead, no harm in learning something new.

the best benefit of pass through is the security if you're autistic enough

You have to be trolling.

Yeah, I do currently dual boot, kind of a pain cause all I use windows for is muh games. Do you have any more info on the ryzen stuff? I don't mind wasting my time, but it looks like you only have access to one desktop at once when passing through, so I'll buy another GPU.

Anyone know a GPU which will run linux just fine for cheap?

Its a shame that Ryzen fucked it up so hard otherwise I would consider doing it for my next build.

>Ryzen fucked it up so hard
What the hell are you talking about?

Given how AMD is putting some of their GPU virtualization code on the kernel, what are the chances we could get this running on future consumer cards? GPU passthrough sounds nice, but I actually do gayme on Linux from time to time, more-so than on Windows nowadays. Having a shit GPU for Linux turns me off. If you could switch graphics on the fly and have the powerful GPU alternate between the host and VM whether the VM was on would be a godsend.

Not same anonymity but I've played 2,000 hours of CS:GO and reached the top 1%, overwatch actually has a high skill ceiling. Besides mechanical skill there's teamwork and strategy that are quite in-depth.

>0.00001 rupees have been deposited on your SJW account

I did this about two years ago:

Supermicro X10SAE board
Intel Xeon E3-1226 v3
AMD R9 290X

Some suggestions from experience:
- If you want more headroom for more virtualisation, get a processor with more physical cores. My next build will be Xeon E5 or equivalent.
- For the host, use a low-latency / real-time kernel. Ubuntu and Debian have packages for these in the main repos, with Gentoo you can go all out with a custom rt-sources kernel if you know what you're doing.
- Learn the libvirt XML format. There's a few optimisations you just can't do in virt-manager, like pinning virtual CPU cores to physical cores (pic related, look at the stuff)
- Use OVMF UEFI for the guest BIOS

>Basic team communication is a skill

Error 43
wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#.22Error_43_:_Driver_failed_to_load.22_on_Nvidia_GPUs_passed_to_Windows_VMs
Funnily enough, the internet is full of people who don't know how to bypass this. A simple -cpu host,kvm=off gets you past this. At least for me, I haven't updated my GPU drivers in a while.

I downloaded a w10 iso from Microsoft and it didn't even need a key.

Huh.
So much has changed here. Thanks for the pointer, I have some reading to do. Is this a feature of nVidia drivers or nouveau? I'd prefer to run the latter on my host system.
Well, I can always bind the GPU into a linux vm running nVidia drivers to play around with all that fancy cuda stuff.

No.
If you're talking about the hybrid laptops, they don't work because the dedicated card renders to the framebuffer of the integrated device. It shouldn't be difficult to virtualize this setup though.

Why not just run Windows as host os and linux in a vm?

Why different GPUs?

You could use integraded graphics for linux and gpu pass through for the VM

Because vfio-pci isolates the PCI devices by vendor and product IDs, which means that the same models from the same manufacturers have the same IDs and will get isolated together.
There is a way involving bash scripting in initramfs. I haven't tried this for not having two identical GPUs, but it doesn's seem like a very clean solution.

Also, it seems like a lot of this stuff has changed since I set mine up. This data might as well be out of date.
For example, with a radeon card it looks like you don't even need two.

Meant to link this.
wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF#Using_identical_guest_and_host_GPUs

it is not ryzen itself just the individual motherboard manufacturer's IOMMU groupings, wait on one of the motherboards to get a bios update with better grouping such that you don't need to run ACS patch on the kernel to get it working.

It is not a priority for manufacturers, maybe if enough people complain about it they'd bother fixing it. Or go with one of the older intel motherboards that are confirmed to support it without patching the kernel.

Only reason I haven't switched to ryzen yet is that I know of no AM4 motherboards that support GPU passthrough out of the box without fucking the ACS. And IPC is still lagging slightly behind hasswell.

Maybe the next lineup of 8 core CPUs will tide me in so I can pin 4 cores to host and 4 cores to guest VM to minimize context switching if I want to do more intensive tasks on the host which is rarely the case.

here is a table that shows vfio support for various GPUs/CPUs/motherboards. It is a bit out of date I can confirm GTX980 works not sure about 700 series cards if you can get one cheap, nor am I certain about the 1000 series Nvidia GPUs. Not sure about AMD cards but I've heard of a lot of people pulling it off with the 290.
Chances are if they claim they support vt-d or AMD-V virtualization technology then they should work. Get some older card used that costs peanuts if it is just for running the host OS, you can rebind your powerful card back to host if you need the grunt later.
Older cards would likely have better open source driver support in linux anyways.

good luck without your endeavors user
>en.wikipedia.org/wiki/List_of_IOMMU-supporting_hardware

I know reddit is frowned upon here but check that vfio group on reddit they might have useful resources. I don't know of many other forums with useful info besides what I bump into in my search engine.

>Is this a feature of nVidia drivers or nouveau? I'd prefer to run the latter on my host system.
It has nothing to do with the linux drivers, you are passing through to the VM which is running the windows drivers.
The GPU must not be associated with any linux drivers for it to be taken by vfio and passed through.

If you want to do some reading on setting up from scratch I recommend the guide I used, covers all the basics. Even if you don't have the hardware and are curious I would suggest reading it to get an idea of what it involves. Looks daunting but once you set it up the first time it is real easy to do.
>evonide.com/non-root-gpu-passthrough-setup/
I anyone knows of better guides then by all means feel free to post them, some users probably already have in this thread.

>no IGP
>You could use integraded graphics

By the way you can assign all cores to the VM both host and guest will share the entire CPU but if your host hogs the CPU while you are playing a game for whatever reason then process related to your game could be assigned to different cores which could impede performance.

Generally you reserve a single core to your host OS to prevent this from happening. I don't do this and haven't experienced any stuttering issues while playing under general usage but that varies depending on how you use your system.
Also make sure you reserve enough memory for your host, if host OS doesn't have enough RAM it will freeze your entire system. Mine gets by fine on 3GB but again that varies on your typical usage. You don't want the VM to starve on RAM either and dip into the HDD pagefiles so it has to have enough preallocated.

8+GB for guest and around 3~4GB for host seems enough at minimum, I upgraded to 24GB RAM total from 16GB and allocate 8GB to host and 16GB to guest but that is beyond fucking overkill.

I don't know if you could pull it off by killing Xserver then running the VM startup script in tty which unbinds the GPU from linux kernel and starts up the VM with GPU passed through then the script at the end automagically binds the GPU back to linux so you can proceed to resart xserver to regain graphical output.
Sounds like a massive pain since you cannot automate the process and have to physically intervene twice. I much rather have linux and VM running on dual monitor setup to maintain maximum shitposting profficiency.

i personally have windows installed /only/ to use solidworks sometimes, not even games are enough to bother booting into windows for, everything i want to play can be played in linux
if i could passthrough with my single gpu, just by closing X and unloading the gpu driver in linux, then that'd be much better than needing to reboot, as most things can be left running (network shares, torrents, video encodes or other processing operations, etc) as they don't depend on X
not to mention all my storage is in linux formats, windows just isn't convenient to use on metal, when i'm in windows, i need to run a VM with my linux drives attached to get access to my data

Ran on my RX 470 with no noticeable slowdown.
Not tried it on my 1080 yet.

Only annoying part was having to pass in mouse and keyboard too so if you want to use host OS you need a second mouse and keyboard too.

Or you could use vnc to remote into host which is what I ultimately did