PROBLEM: You enjoy a nice spot of vidya every now and then, but Linux and vidya is like Apple and being straight.
SOLUTION: PCI Passthrough! Modern linux kernels have builtin drivers and virtualization tools that allow you to give a Windows VM raw access to your hardware, giving you near-native performance while isolating the Windows botnet to a locked-down VM that you only use for vidya.
>Tl;dr what you need * A reasonably new motherboard and CPU. The motherboard and CPU both must be aware of Intel VT-D or AMD-Vi depending on who you'd rather give your shekels to. LOOK UP YOUR HARDWARE FIRST. Don't guess.
* A modern Linux. Arch works, Fedora works, Ubuntu works. Others may work, but the more you try to be a neckbeard with your OS selection, the more trouble you're going to have setting this up.
You need a CPU, mobo, and GPU that all support an IOMMU, which most don't. Useless.
Wyatt Lewis
do I need 2 video cards (one for host/one for virtualized OS), or can 1 be shared?
Sebastian Thomas
Most old ones don't, many new ones do. If I understand it right, if the motherboard has an option to toggle VT-D or AMD-Vi, then it has IOMMU support.
Kevin Campbell
You absolutely need different cards, but you can get away with running Linux on the integrated one in your CPU, and then passing your gaming card through to the VM.
You don't really need two displays either unless you want to use both at the same time - if you have, say, a Displayport out on your video card and an HDMI out on your motherboard, and your monitor supports both of these, you can just do that and switch inputs on the monitor.
Parker Gray
Good idea, OP, I should have started this myself.
You don’t need two “cards” per se, if you have integrated graphics like all recent Intel cpu’s do, that counts.
Christopher Long
I’ve done this myself. Waaaaaay fucking better than Wine and putting a leash on Windows feels good.
Liam Gray
I was kinda surprised how easy it was. Apt install some things, write some junk into my sysctl and grub.conf, tweak some settings in the vm config file.
The absolute hardest part was translating some of the Arch-specific instructions to Ubuntu. (tl;dr: ubuntu doesn't use mkinitcpio, it uses update-initrd)
Couldn't have taken more than 2-3 hours from start to finish.
Easton Ward
Just dual boot lol
Jason Lewis
Dual booting is for plebs who don't wanna do it right. What happens with *everyone* is that they realize that rebooting destroys their working state and takes time, so they end up staying in one OS or another.
This way, you literally just look at another screen or press the input switch on your monitor.
As a bonus, Windows is virtualized away from most of your hardware so you're not getting cucked by the botnet.
Evan Wilson
I did some benchmarks and found that I lost on average only half a frame compared to Windows 10 bare metal. I’ve pretty much got the perfect configuration down.
That’s one option but it’s more comfy this way.
Isaiah Brown
The machine I'm running on is an assembled Ryzen 1600 w/ a gtx 1060, so no integrated gpu :c
Aaron Hernandez
Not true, every CPU/GPU within the last few generations supports it Only mildy hard part is finding a mobo
You lose performance on CPU intensive games, your latency is increased and most hardware available doesn't support it. You are much better getting a cheap HDD and installing Windows on it.
Connor Baker
nice, thanks user.
Grayson Morgan
Every single word of that sentence is wrong. Performance overhead can be measured in the single frames, as can latency overhead, and most hardware actually does support it.
Welcome to 2018, gramps.
Aaron Rodriguez
How hard it would be for a Windows user with very basic Ubuntu knowledge? Windows 10 is a fucking piece of shit and I can't tolerate it anymore.
Josiah Gray
If you do it right, the performance decrease is literally imperceptible. Kvm lets the guest run code right on the CPU. The miniscule performance decrease comes from having another OS use up CPU cycles but even that can be mitigated by just not launching a WM or DE while the VM runs. You can even reserve RAM for the guest through hugepages as well as CPU cores which greatly reduces any latency.
Nolan Cox
Follow online guides and ask us questions and you should have it up and running the way you like before the end of the week. It honestly helps if you’re knowledgeable with kvm though. The whole reason I did it was because I’m experienced with it. Worth it though.
Ryan Foster
Not very - following that guide in the OP will get you most of the way there.
Kevin Johnson
Do you have more guide?
Jose James
That covers everything pretty much, what do you need help with?
Hudson Lopez
Cant wrap my head at the files and programs involved.
Jose Kelly
Retard. No, it won't use your CPU to it's maximum since you have to dedicate some cycles to your distro, meaning some heavy CPU games like Witcher 3 will probably suffer a bit, but that's ok, what's not ok is the latency, playing competitive shit like fighting and FPS games with more 16-32ms added will feel like shit. And no, incompatible hardware outnumbers compatible by a vast margin. For example, not all mobos support IOMMU. I agree it's ok for some casual gaming, but I would never replace a proper dual boot setup by that.
Kayden Roberts
is there a way to add an existing Windows partition to virt-manager? Not on linux right now but I tried some time ago, and I couldn't do it. It seemed like I could only add a VM by using a windows installer iso and running the setup. I will be trying this again soon, thanks to this thread.
Samuel Lewis
Not in virt-manager, you're going to have to edit the vm config file (virsh edit vmname) for that.
Example: disk type='block' device='disk'>
Luke Perry
This is why you isolate a couple of your cores from the host so that the guest has full access to them and doesn't have to fight with the host for scheduling priority. Same with memory.
Middle diamond LoL player here who's been doing this shit for a while now. You just fucked up your install or configuration and are salty about it.
Isaac Carter
You really just need to follow the guide top to bottom user, it's self explanatory. Install the stuff it tells you to install and edit the files it tells you to edit.
The only retard here is this faggot. If your CPU and motherboard support VT-D (or AMD-Vi), you have IOMMU support because that is the implementation of the technology.
Step 1: Check your CPU for those two things Step 2: Check your motherboard for those two things Step 3: ????? Step 4: kys
Adam King
Nice Try HANK, but we know what you're trying to pull on us. Don't fall for H.A.N.K's shit anons, this will compromise your linux OS and your computer.
Alright so this has been my master escape plan for about two years now.
I want to do a full desktop replacement by using an external GPU on a memePad with an i7 in it that I slap into a dock.
Anyone have experience with this? I figured it makes a lot more sense since memePads have USB-C now.
Jace Morales
How does it do that? It's a virtual machine on native hardware
Ryder Diaz
>on native hardware There's your problem.
Dominic Bell
Please elaborate.
Jordan Ross
Can't, H.A.N.K is listening. Just know that anything that routes to or from Native hardware is already compromised.
Isaac Gonzalez
Ignore this cia nigger
I don't see any reason an eGPU wouldn't work - the most important bit is how the device presents itself to the computer. In the best case, the eGPU is on the PCI bus in its on IOMMU group. In the worst case, it's shared with the CPU.
Bentley Allen
Linux holds the reins
Anthony Gomez
Then why bother posting at all? Either state your evidence or fuck off.
Jaxon Ortiz
da fug is hank?
Eli Hall
AI used for marketing and shilling on sites like Sup Forums, Amazon, Reddit, etc, and also is used or will be used in malls. It tries to retain customers based on a lot of creepy information like how long someone looks at an ad, their emotional response, gender, age, whatever. It's creepy but unrelated to this thread.
Ian Ramirez
...
Christopher Price
Nice, now you have less cores and by consequence less performance. >Middle diamond LoL player here who's been doing this shit for a while now. >implying that amount of latency matters in fucking lol Absolutely lol'd. And please, refrain from playing shit games.
The point is: not all current mobos support it, and those who do are mostly high ends. Do you have hardware from some gens ago? Forget about it, chances of something being incompatible is pretty high.
Brody Mitchell
creepy
Jason Cox
Then it's a good thing the OP mentioned reasonably modern hardware isn't it? Stop being a contrarian faggot.
Samuel Flores
>he fell for the needing 16 cores meme If you need all those resources, hopefully you'd be insightful enough to understand that gaming while needing them isn't the best idea
Eli Kelly
It's here with us. For all i know you're HANK. If that's the case the fuck off, i don't want your vitamin water.
Samuel Morales
I have 8 cores. Dedicating 4 of them to a VM ensures an optimal level of performance given that most apps and games are not compute bound.
Similarly, 16GB of memory is enough to run anything.
>implying latency doesn't matter in lol
I suggest taking 's advice. Or suicide. Whatever works.
Adam Green
Oh man, I’m really gonna feel that one single logical core that I left to the host which is mostly idling
Joseph Brown
>FPS games with more 16-32ms added will feel like shit as an Australian who has had to deal with a minimum 2-300ms ping in any online game for years it always makes me laugh my ass off when americans complain about having a "omg so high 50ms lag!!!" latency fuck off
Andrew Foster
I can speak to this config - I started out with an image file, then once that worked, i created a LVM LV for it and dd'd the image into it. The config is, verbatim, what's given here, just with the device pointed at my lvm volume.
Hunter Perry
How would I pass through a blu ray drive?
Julian Ramirez
Add a new storage volume and point it at your physical drive /dev/ node.
Gabriel Gomez
I approve of this general. Does anyone use Looking Glass / KVMFR here?
David Morris
I do, but i actually find parsec to work better in my case.
I have a single monitor setup with the VM running in the background constantly so i can parsec into the VM from my laptop just the same as i can directly from the desktop.
Caleb Taylor
Can someone explain to me why KVMFR isn't possible on optimus?
Jacob Brooks
I've noticed that Optimus breaks a lot of random tech. I'm guessing the dual GPU amounts to using some kind of standards-violating hackery.
Christopher Wilson
What do I select for type on the window before that one?
Aaron Adams
I just play gaymes on linux.
Sebastian Long
Physical disk device
Adam Morgan
>dedicate some cycles to your distro LOOOOOOOOOOOOOOOOOOOOOOOOOOOOOL DEDICATE MUH IDLE CPU CYCLES TO MUH DISTRO OMGERD
you fucking realize not everyone is on a god damn pentium intel cpu.. right? most cpus today can handle like 20 VMs open and they won't have latency issues. You'll lose like
Juan James
stop feeding the contrarian troll user-kun
Holy fuck, does this mean i don't have to run my vm on its own physical video output anymore?
Hunter Collins
This is what made me not bother. Integrated is quite good, but I use my video card for more than gaming and it will take just as long to switch my video card from my VM to linux as it takes me to boot into linux. I know there are other advantages, but seeing as I can suspend my linux to get most of those, I think dual boot is a bit better for stability. Avoiding the MS botnet is a big plus tho.
Daniel Thompson
Ah that's just it though, the only thing you're "switching" is your display input. It's instantaneous.
And if you're using something like kvmfr, you don't even have to do that anymore. You get normal video from your guest on your host's screen.
Isaiah Russell
This is the future of Linux One of these days Fedora or some other distro will have this setup as a 1-click install, similar to how MS has the Linux Subsystem
Sebastian Davis
just tell me if all the shit with Threadripper has been ironed out yet. I heard that the AMD NPT bug has finally been identified and fixed, but last I heard TR had more issues remaining than vanilla Ryzen.
Connor Murphy
>you don't even have to do that anymore wuut how does this make sense technology is CRAZY
Oliver Baker
>tfw have 3770K >the non-K version has VT-d >every K series has had them since Haswell refresh
I'm never buying Intel again even since I found that out about 2 years ago. Especially after all this other shit that's happened.
Julian Evans
GPUs don't need to support IOMMU, just the PCIe root complex and the motherboard BIOS.
The hard thing to find in peripherals is SR-IOV support, which is the generally all-around superior alternative to pass-through.
> consumer Vega SR-IOV never ever
Ryan Gonzalez
It copies the framebuffer from the guest gpu before the guest gpu sends it to the screen and sends it to the host gpu, I think.
David Jackson
Hurry, in about 5 months all of these will be $200+
Zachary Phillips
Might as well get an RX 550, it should have better future resell value.
Brody Wilson
Pretty much - and since it's literally copying memory around, the latency is almost nonexistent.
My gaming is done on a dedicated gaming PC. It's nothing more than a glorified xbox. I remember trying to follow the PCI passthrough guide and Windows wouldn't install or something. Very few people do it so there's very little info out there for troubleshooting help, let alone finding someone with a setup even remotely similar to yours.
Your Linux box doesn't even have to be high end. Mine runs on an FX-8350. When I upgrade my gaming PC, my Linux box will inherit the i5.
Asher Edwards
When's the last time you tried? A lot of progress has been made in the last few months. I was able to get up and running on just the Arch guide linked in the OP (plus a little more to map the archisms to ubuntuisms).
Once you get your VM configured, itjustwerks.
kvmfr is *very* new and *very* buggy. I know on my system, it does work as advertised, but it drives the CPU usage to 100%. Your game ends up slowing down due to cpu starvation rather than video latency.
Could be because I'm running it on some fuckhuge x34 display though
Hunter Morales
You are still being cucked. I only buy games that are Linux native now, there are more than enough. If a game isn't native, I just ignore it I don't even wine.
Jackson Stewart
You are a man among men.
Charles Scott
More than enough if you only want to play indie shovelware and freetard trash, that is.
David Miller
Stop lying dickbrain. The only kinds of game you don't get are games like cawadoody and other games you give to kids for their Xbox.
Austin Anderson
So yeah, only indie shovelware and freetard trash. If all you want are waifu simulators, yeah, linux alone will probably be enough.
Ryan Gomez
You're only lying to yourself.
Juan Phillips
>dedicate weekend to getting esxi working >can't do HID passthrough i suppose i deserve this.
Sebastian Morgan
>esxi
Yeah... that's an exercise in self flagellation if there ever was one.
Nolan Green
I wish Endless Legend was on Linux
Jason Butler
Has anyone run into the Code 43 error with Windows and Nvidia GPUs? I can assign my GPU to the VM in virt-manager, but Windows won't let the driver load...
Aaron Davis
...
David Cooper
Take your pixel indie shovelware and shove it up your ass hipster
Brayden Sullivan
>a weekend What? I don't remember ESXi requiring anywhere near that kind of effort.
Bentley Davis
>You need a CPU, mobo, and GPU that all support an IOMMU, which most don't. Most (if not all) mobos support passthrough with the main x16 slot.
Camden Evans
kvm=off or --features kvm_hidden=on
Evan Davis
Yes, you have to spoof the hardware. It’s in the OP’s Arch Linux link.
Adam Scott
>shit with Threadripper has been ironed out yet
bumping for this question
Jackson Perez
You still (probably) need a physical output for the card so that Windows knows what display resolution to use. That could be just be a little EDID adapter thing rather than an actual monitor though, and I have also heard that you can use some regedit magic to change the default resolution instead, without using any connection.
If you do that, then you need some other way to see the display. The two ways of doing that are KVMFR (low latency, lossless, local-only), or some normal streaming thing like Steam's streaming (high latency, lossy, networked).
Jayden Parker
I got KVMFR running last night, but applies. Guest CPU goes to 100% on all 4 cores, and while the video isn't laggy, the stuff I try to run is slow because it can't get any CPU to work with.
Joseph Taylor
Most CPUs that you would bother putting in a self-built desktop support IOMMU, and therefore the motherboard most likely does too. Every GPU that supports EFI supports IOMMU.
Nathaniel Reed
GPU passthrough in general usually isn't possible on optimus due to the way it's setup on most laptops. IIRC optimus usually does something like kvmfr on the hardware level were the intel igpu is the one connected directly to the laptop monitor and outputs and the stronger gpu just passes a framebuffer when you use it, that's also why the drivers are usually so finicky.
Tyler Flores
this works with Xen?
Jack Reyes
I did this back before official distro support, and I tell ya hwat, boy was it worth it. Eventually had to get rid of it because it was bugged to shit, and could crash the host on occasion, but was easily worth the weekend it took to set up. Now that it's become somewhat standard I might need to give it another crack.
Henry Campbell
Don't do it. Unless your thinkpad has an external PCI slot (which afaik none do yet), the bandwidth will be disgustingly bad. They say that the docks can support it, but in reality they are non-interrupt, meaning *anything* that accesses the dock (power, usb, even a routine sanity check) will tank your fps for seconds to minutes.
There is a trend of laptops with ePCI though, so take a look around.
Easton Jackson
Don't see why not, though the instructions seem a bit more complicated.
Seems rock solid so far - I only managed to crash my host when dicking around with installing the nvidia drivers for the first time, and that was probably because I was an idiot and didn't have my configuration right yet.