[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

/g/ I'm curious about GPU pass-through in Linux with a Windows

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 71
Thread images: 7

File: 1492011436715.jpg (3MB, 3500x2300px) Image search: [Google]
1492011436715.jpg
3MB, 3500x2300px
/g/ I'm curious about GPU pass-through in Linux with a Windows VM. What's the performances like? Some say it's as good as 'native' Windows, but is this really true?

Pic related.
>>
>>60560490
performance nearly native.
If you can try, do it
>>
sort of related and i didn't want to create a new thread specifically to ask that

from what i've read, when you do the gpu passthrough, the vm gains exclusive control over the gpu, am i right?

then can this work with a ryzen (which don't have integrated gpus) with a single dedicated video card?
>>
whats the point in this over dual boot? seems like more hassle than its worth
>>
>>60560549
you don't need to fucking reboot each time
>>
>>60560549
When you need to play windows games for some reason while you wait for your kernel to compile :^)
>>
File: 1452955575050.png (2MB, 514x989px) Image search: [Google]
1452955575050.png
2MB, 514x989px
>install GNU/Linux only to use a proprietary OS in a VM, in order to play proprietary games using a (probably) proprietary GPU

Why not just use Windows at that point? Like, what's the point?
>>
>>60560566
reboot with modern computer is very quick
>>
>>60560587
The point of Linux isn't explicitly to fucking be open source, you retard. Linux is fantastic for development and efficiency in pretty much fucking everything work flow related unless you're a Microsoft-trained office worker

I.E. You're using Linux for the wrong reasons, you mong, it's not about bragging rights.
>>
>>60560587
>proprietary GPU
Most hardware is proprietary. Anyway not everyone who use linux in a freetard.
>>
>>60560587
coz I wanna be le haxxor
>>
File: Pass.webm (3MB, 560x315px) Image search: [Google]
Pass.webm
3MB, 560x315px
>>60560490
I use GPU pass all the time, mostly to play Final Fantasy XIV. I use a 5820K with a 770 and a 660.

Yes, it's as good as native. A friend of mine (uses a 6700K, 970 and the internal GPU) who I helped set this up tested out the performance in native Windows and in the VM and it was around five to seven FPS less inside the VM which is negligible.

So yes, I'd say it's so little overhead that it is not noticeable. You can turn it off and on whenever you want and you can share your Ext4 partitions with Windows using SMB. This has been a huge quality of life thing for me. Rebooting was always a fucking pain in the ass, when I needed Photoshop I couldn't use it unless I rebooted. Now everything is properly shared and is easy to get to and I don't have the "fuck I'm on Linux and can't use this without rebooting" thing anymore.

Here's a video of it in action. It's shitty shaky cam, so bear with me. It's hard as fuck to get this two minute video to fit on 4chan to begin with so the quality is horrible. Hopefully you can see something.
>>
>>60561439
holy shit dude. This is perfect. Ive been wanting to ditch windows for good but I play XIV every day.

I hope you arent a potato.
>>
>>60561515
Sorry my dude. I am female potato in-game. I hope that doesn't make my setup invalid.

Good luck! It isn't that hard to set up, though it requires some knowledge. I highly recommend the Arch Wiki section on "PCI Passthrough via OVMF" as most of it is universal for all distros. Reddit's /r/VFIO is also very helpful.

The biggest "gotcha" is getting the sound to not sound like garbled garbage. What I did to get it work perfectly is pinning the CPUs, use ac97 as the driver and enabling "nographics_allow_host_audio = 1" in the libvirt qemu.conf and enabling MSI interrupts.

I also use libvirt instead of pure qemu (many guides use a qemu script instead of libvirt) because it allows you to pin vCPUs to the VM which helps a lot with the sound.

Here's my libvirt config: https://pastebin.com/4Gp7r2Dg

It might come in handy when you try to set the VM up. Especially the sound. I have commented some stuff onto there that might be of interest.

Good luck! If have some knowledge of Linux this shouldn't be too hard to do anymore. It has been streamlined a lot compared to what it was a year ago.
>>
It's ryzen able to do this already? I'll buy it anyway because i don't mind dual booting but I'm just curious
>>
>>60561923
I know it's able to do it because I've seen people do it, but I don't know if it's actually easy or a complete pain in the ass.
>>
>>60560490
It's a botnet, meme and CIA nigger.
>>
>>60561923
Ryzen has no integrated GPU, so no.
>>
>>60561923
You will need to buy two gpu's
>>
>>60561923
It is "possible" by using the ACS patch. However that will not be required soon. They mentioned on a stream that was out yesterday or something that IOMMU groups were finally fixed in Ryzen and that the new AGESA 1006 will fix it.

Quick TL;DR of the problem:
PCI slots have certain "groups" in the IOMMU which allows for passthrough. If both graphics cards are in the same group, they cannot be passed without using ACS. Ryzen's ACS was broken, hence you needed to patch the Linux kernel with an ACS patch to "fake" it. It's a little complicated.

However now that they've finally fucking fixed it and new BIOSes with the fixes will be pushed by motherboard manufacturers, Ryzen will be a great platform for this.

>>60561961
You do not need a internal GPU to this. In my example: >>60561439 I use a 5820K which does not have an internal GPU. That means it needs two dedicated GPUs however. One can be shitty while the other can be good for example.
>>
>>60562022
This is true. You can probably find a cheap working bullshit card on a flea marked for pennies, or you might have an extra one laying around.

This is simply because Ryzen doesn't have an internal GPU, so that means you need two GPUs instead.
>>
>>60562022
Well I'm gonna buy another one anyways so it's good(the current one is shitty and was kind of a gift)
>>60562030
I know that issue, that's why I said already, thanks for the info though
>>
>>60562056
twitch DAT teevee/videos/146654315

Here's where they say the IOMMU groupings are fixed in AGESA 1006. Around 34 minutes into it.

Unfortunately 4chan hates Twitch, so that needed to be formatted horribly.
>>
>>60562112
I'm on mobile and the website is aids, did they say when the bioses would roughly be available?
>>
>>60562189
I'm not sure they said it in the stream as I didn't watch all of it. They did not mention when it would come out during the IOMMU question. However some motherboards have beta BIOSes right now with AGESA 1006.

According to Wendell's Level1Techs forum, some members said that AMD has previously said "end of May". So I guess that means very soon.
>>
>>60562189
The bios updates are already rolling out. At this point it's up to motherboard manufacturers to have their shit together.

First one out was ANUS's crosshair 6
>>
File: GPU_Passthrough_Vive.webm (2MB, 480x270px) Image search: [Google]
GPU_Passthrough_Vive.webm
2MB, 480x270px
>>60560490
Good enough to run VR and 4K without any noticeable performance loss. Don't know about 144Hz though haven't tried it, that is more CPU intensive so you might notice a larger performance penalty there depending on how well you've optimized your VM and host OS.
>>
>>60562241
That friend friend of mine with the 6700K and 970 card has a 144Hz screen and it works perfectly in his VM as long as the passed GPU uses DisplayPort or dual-DVI. No issues with getting 144Hz performance in games whatsoever.
>>
>>60562221
Nice thanks, hopefully msi will get it done too
>>
>>60562260
That is good to hear, I wont be switching to 144Hz until 4K OLED becomes a thing.
>>
>>60562294
why the fuck can I buy a 60" 4k tv for $600 but not a 24" 4k monitor?
>>
tfw need to buy a second gpu to do this that supports 4k60hz since my monitor is 4k, i mostly play games 1080p120hz though so this is a bit of a clusterfuck of a proposition as I'd have to change the video mode of the host OS and for my use case it's probably just easier to boot into windows on the cheap ssd i have dedicated for it


but boy would it be nice to have this somehow happen seamlessly
>>
>>60562307
I saw an asus 24" around here that costs less. Not sure if it was IPS though. The LG27UD68W IPS 27" 4K 60Hz display in >>60562241 related costs around 493.07USD now which is not a bad price for a 4K IPS but be aware that you will have to deal with scaling issues at that panel size even more of an issue at 24". Looks really nice though.
>>
File: 1495329071677.jpg (701KB, 800x800px)
1495329071677.jpg
701KB, 800x800px
>>60561681
Thanks a bunch for the info man. I really appreciate it.

Even if you are a potato.
>>
>>60561439
Well I still have to log out and log back in when I want to pass my dedicated GPU back to the host OS through Nvidia PRIME profile setting.
Switching to wayland once they facilitate GPU hotswapping such that I can do it without loosing my current session.

Read somewhere that you can do it with AMD using DRI PRIME but there are issues with doing it multiple times since it locks up after the first attempt or so I hear.
>>
>>60562420
No problem. Glad to see more people trying it out and maybe switching to this solution.

Maybe this shows that #notall Lalas are meme spewing emote spamming eRP faggots.

>>60562514
Yes, if you want to use the same GPU on both the host and the guest you'll need to kill X and stuff. That seems like a complicated setup, so I decided to go the easy route and have a relatively ok card on the host and the best card on the VM without switching. The most GPU heavy task I do on the host is watch chinese cartoons in mpv with sinc upscaling anyway.
>>
>>60561439
nice
>>
>>60562576
If you have an Nvidia card it is quick and simple using the Nvidia Xserver settings GUI and selecting the dedicated GPU in PRIME profiles section then logging out. The downside is you'd have to use their binary blob for it don't think nouveau has that option. It is going to be a pain if I upgrade to Vega, will have to kill X server then enter a TTY and run a script every time I want to switch GPUs.
>The most GPU heavy task I do on the host is watch chinese cartoons in mpv with sinc upscaling anyway.
I am in a similar boat with MPV except my HD4600 has to run videos on a 4K display which it can't push past 30Hz, good enough for chinese cartoons but sometimes I watch 4K 60hz content and play games on linux which the iGPU can't cope with. I find myself using the VM less and less, I hope vulkan kicks off and Wine improves further to the point that I can get rid of Windows altogether.
>>
>>60560587
ganoo isn't just about freedom you know

it's also objectively superior
>>
This Interests me but the need to use the second GPU's output kinda puts me off as well as the fact that my 2500K Isn't capable of VT-d because it's a K part.
>>
>>60560520
Sure, but you can only talk to the linux distro via remote sessions, and for all intents and purposes the machine will be no different from having a Windows machine and a headless Linux server inside the same package.
>>
>>60562853
Newer K parts support it. I believe after Devil's Canyon, but don't quote me on that.

If AMD gets their shit together with the IOMMU groups in Ryzen, it might be a worthwhile upgrade together with a newer GPU (or buy a shit one and keep the one you have). You don't need a second GPU if your CPU has an integrated GPU though.
>>
>>60562943
For a brand spanking new rig sure, that is already the case for me.
Thing is I'd rather just get a more cost effective 8 core CPU and use my older GPU to drive the host once Vega comes out that way I'd have the perks of both an NVIDIA and AMD GPU.
If mixed GPUs becomes practical with Vulkan on linux then even better, I recall ashes of the singularity supported multiple GPUs without crossfire/SLI that was DX12 though.
>>
>>60563101
The 5820K was quite cheap. It's literally the same CPU as 6800K with the exception of TBM3 which works like ass in Linux anyway unless you use a bleeding edge kernel. How cheap it is compared to Ryzen, I wouldn't know.

Mixed GPUs work great with passthrough. It's actually sort of recommended to have a mixed setup to ensure that drivers don't catch the passthrough card before vfio-pci does. Not required at all, but it certainly doesn't hurt.
>>
Does anyone have experience doing this on an Alienware x51 r2? If I remember correctly I think I meet all the criteria but there was something about the motherboard and I'm not sure if it's compatible.
>>
>>60560609
It's more than just an issue with the speed, it's having to lose open sessions of applications.
>>
Any experience of doing this over LAN with ESXi? I could easily have my ESXi box run Windows with passthrough extremely easily, but how bad would latency be if I'm over a wired connection?
>>
File: 1495171387530.png (228KB, 400x514px) Image search: [Google]
1495171387530.png
228KB, 400x514px
GPU passthrough will only be an attractive solution to the dualbooting problem when single GPU support comes around. Having to have two GPUs, dedicated or not, makes this too complicated.
>>
>>60560490
can this be done with an egpu on a laptop?
>>
Can I use GPU passthrough with my iGPU and let the host OS use the eGPU?
>>
>>60560490
im into that topic and that pic you posted is pretty excellend
>>
>>60560587
I don't even use this because it's too cumbersome to me (and I bet SLI would have some random issues with it anyway), but the appeal clearly isn't to stroke your neckbeard, but to have a Linux environment available without having to constantly reboot every time you want to play a game.
>>
>>60560587
Stallman, most people don't use Linux because MUH FREEDUMBS, but strictly due to convenience of having a unix like environment with good performance available. Amongst many other things.
>>
>>60560490
stop playing video games
>>
>>60565590
but sometimes its good for your brain to relax with a gayme
>>
>>60565590
>stop playing video games
We wuz explorers n scientists n shiieet and den the meds came and stole our achievements!
>>
>>60565244
Would be great if there was a feature in the GPU's hardware itself or driver level that allows it to be handle requests from multiple VMs with the host OS at the top of the hierarchy all the while retaining near native performance.
So that you can finally run the VM in windowed/borderless-windowed mode with little to no performance penalty without resorting to handing over the entire GPU to the VM and worrying about having multiple GPUs to support both guest and host.
You won't have to dabble with Xserver and TTY to pass dedicated GPU back and forth between VM and host either.

It would be a dream, at that point even laptops with a single GPU can handle workloads in a VM with ease.
>>
>>60565590
no fuck off tripfag
>>
>>60560490
Can this be done with an egpu setup? Shit would be perfect - Windows on my monitor playing games, internal gpu handling the laptop screen.
>>
>>60560587
Software support.

What can ya do but bend over and take it.
>>
>>60561439
Does this work with SLI?
>>
>>60566099
Yes it can. All you do is pass the thunderbolt PCI stuff into the VM. It should not be any different from passing any other thunderbolt device.

>>60566930
According to https://www.redhat.com/archives/vfio-users/2015-September/msg00023.html from back in 2015, no one has gotten SLI to work in a VM. If there has been progress on that front, I wouldn't know. I'd google around and see if SLI works in VFIO or not.
>>
>>60567699
Thanks a lot anon, you're doing God's work.
>>
>>60560495
this.
>>
>>60562241
what GPU are you using?
>>
>>60561923
There's a patch, but it was unstable. I lost interest in ryzens a while back, but have read that owners where using a cheap Nvidia for the host, and suggesting an amd gpu for the guest VM. Problems only occured if people tried to run multiple gpus from the same vendor iirc.
>>
>>60562931
that actually sounds neat
so basically i could switch between the vm and my linux distro similar to alt-tabbing full screen applications? or is it not possible to pass the control over gpu around at runtime?
>>
File: 1341246029698.jpg (169KB, 600x600px) Image search: [Google]
1341246029698.jpg
169KB, 600x600px
This is a pointless waste of time. If you need a linux environment, just run a linux VM or the new linux subsystem under Windows and avoid all of the issues required to get this working.
>>
>>60570242
As for the switching, pretty much. Many are simply doing Steam In-Home streaming from the VM to the Linux host for example. Thus running the Windows guest completely headless.

However it is not possible to pass the control over the GPU at runtime. You'd need to shut down the VM and kill X to "re-enable" it in the Linux host. So simply passing it back and forth like alt tabbing is not really a thing.
>>
>>60560490
It's good, but it's still only about a third of the way to where virtualization stuff needs to get.

> BIOS level grouping instead of being able to dynamically shut down GPU on host and have it boot back up into VM
> can't push rendered frames back across PCIe to be composited in host or sibling VM OS windowed mode
> can't just do SR-IOV shit with one card driving host and guest stuff transparently
>>
>>60570954
The manufacturers are doing vGPU support now that allows for passing parts of a GPU like the CPU. However that shit is only available on their "server" grade hardware like NVIDIA Grid and AMD FirePro GPUs and as far as I know isn't finished yet either.

It's too bad they have to be assholes this way, but they want to fuck us consumers in the ass and so it will be.
Thread posts: 71
Thread images: 7


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.