Demo - Single GPU Passthrough - Windows VM on Linux
Вставка
- Опубліковано 21 жов 2024
- Finally tried Single GPU Passthrough. Took about 3 hours to setup. Works way better than I was expecting. VFIO is still awesome
I set this up using these instructions. Stay tuned for a tutorial coming soon!
passthroughpo....
github.com/joe...
you can find my other creative endeavors at:
blandmanstudios...
blandmanstudios...
/ blandmanstudios
/ blandmanstudios
Well this was amazing. Thanks for putting in the time to show us how easy it is with one graphics card.
Thanks! 👍😎
@@BlandManStudiosis the config files u setup works regardless of the os installed in the kvm guest?
@@BlandManStudiosfor example if i installed windows besides linux on the same KVM guest, would this setup still work or i have to change some of the files?
This is Awesome! Definetly going to try this when your tutorial comes out.
Hype!
I appreciate that work you are doing. One bit of feedback is that your audio in the videos is SUPER quiet. I have to crank up my volume and cup my hands around my headphones to hear you.
Excellent feedback! Thank you. I wasn't sure how necessary it is for me to amplify/normalize the audio, but I'll make sure to do that in the future
God!... I thought this was impossible with dual GPU or dual boot... this is a game changer!
Amazing work steve cant wait for the tutorial
Thanks!!
One step ahead of you 😉
ua-cam.com/video/eTWf5D092VY/v-deo.html
@@BlandManStudioswith single gpu passthrough, how do i acess uefi menu of the vm?
This is insanely cool, I really want to try it now!
I just recently found your channel and am loving the content and subscribed. I will be switching soon to linux vm gaming once i get my gpu. Do you you have any idea of how vr games perform using vfio?
cant wait for the titurial
Hype! Good to know!
thats awesome, having linux as main and still play xbox game pass games in the VM, definitly gonna try that
Does this log out of the Linux DE or was the GDM login just because the screen locked? So if you had multiple programs running, would those have been closed?
For single GPU passthrough, it actually does close all the programs
What's your CPU? The switches are quite fast (about 15 seconds host to VM and 10 seconds VM to host), but I'd like to compare with my setup to kinda figure out if it'd be faster or slower. Thanks Steve. Can't wait for that tutorial =)
Great thanks! And thanks for timing it for me. I'm glad I didn't edit out the "boring parts"
My CPU is an Intel i7-9700k
You'll notice a 2 second sleep command in the scripts written out here which might be one reason why the first transition is slower
github.com/joeknock90/Single-GPU-Passthrough
is it possible to use the main gpu host like you did but then make it so that the DE on linux uses a different gpu when you switch?
so rtx 4090 gets switched onto windows and then as a fallback the linux DE gets a 1080
Does that reset the linux desktop? like if i open a few programs and boot windows and go back to linux, will everything still be there or is it resetting the desktop?
It does reset the linux desktop
If you want to keep everything open you'll need two GPUs like in some of my more recent videos
cool, definitely going to set this up. I didn't know about this
Awesome! So glad this video could raise awareness. I had heard about it on Reddit, but it worked so much better than I expected
I have a second GPU and set up a whole GPU passthrough. The problem being I game both on linux and on windows so having to allocate and restart the whole computer for some huge pages to work just works since i do the same in the same time with a dualboot pc. Maybe you did some magical tomfuckery to make it work good, idk at this point. I can see that because you have a single GPU you can't use the host system, which for me is the big hook benefit of vm gaming.
Yeah, I've been thinking about this lately. If you can't use the host system at all (like, be in a discord call with friends or something?) then what's the point of using a kvm for gaming at all? Besides containement for security and privacy reasons, of course. I think I might just dual boot to play the few (like 3) games that I can't get to work reliably on wine or proton.
Do you have a Tutorial for a second GPU setup?
hey Bland! Just wondering. Are there any downside of playing video games that has an Anti Cheat on? I watched a video earlier saying that the downside of doing this is it could risk yourself of getting banned from the game or just couldn't work. Have you tried any games that has an Anti Cheat on it? If possible, before I switch up to Linux on my Gaming PC, could you give me some feedbacks if you run a game like Valorant and Dota 2. Thanks A lot! (Edit: Also, what about the CPU? Does it affect the performance during the game?)
Welcome back!
Hey I wanted to ask, because I couldn't really find a clear answer online, can I passthrough my "main" gpu?
Basically my RTX2060 is in the first PCIe 3.0 x16 slot, and in the second slot (PCIe 2.0 x4) I have a GTX960, and I do not want to bottleneck my RTX with that slot so I won't put it there. So now my RTX is kind of "locked" into the system as the main GPU and I can't even isolate it from the host. Is it still possible to passthrough the RTX, or should I just give up on that and passthrough the 960?
I am just guessing here, but I don't think pcie3x8 lanes would bottleneck a 2060
@@houndsol The 960 is in a 2.0 x4 slot, rather than a 3.0 x8 slot (which probably wouldn't bottleneck a 2060, as you say).
Another amazing video. I finally changed my build, so I'm exciting to try some GPU Passthrough. You talked about the GPU, but and about the Mouse/Keyboard, is mandatory use an KVM Switch or you can pass them too just like the GPU and it come back when the system goes off? An about dual monitors, could be possible let the fedora running with the onboard and windows on offboard and a keyshort to pass or not pass the keyboard/mouse?
Thanks!
At 3:54 in this LookingGlass video I show how I use evdev for switching my mouse and keyboard between guest and host
ua-cam.com/video/8v3DRJqRWnY/v-deo.html
You can find more info here too
wiki.archlinux.org/title/PCI_passthrough_via_OVMF#Passing_keyboard/mouse_via_Evdev
I am so gonna do this man thank you
Nice! Hype! Happy to help!
after one year that this video was posted, how is your experience going? Did you have any issues using this method?
I configured my PC to use single GPU passthrough just for this video because a lot of people don't have 2 GPUs and wanted to see how to do this
But for my daily driver setup, I use dual GPU passthrough with Looking Glass (similar to my laptop video). It works great! It's allowed me to use Linux full time and if I ever want to play a windows video game I usually have a good chance of it working without too much debugging (cuz I'll play it in the Windows VM)
The scripts either teardown or startup don't work for me. I have them in their place manually because the install hooks didn't work for me can you help with my issue? If you want I'll post my log
Does the window manager restores after logging in back after windows? Meaning all running apps are back, including UE4 editor?
No, it closes all of them :/
@@BlandManStudiosis this true even if i am usi g waylang gdm and gnome?
Wow!! Nice job! I really would like to know how to setup this :)
Thanks! Good to know, working on that video soon!
I have HP Envy 15 q006tx laptop with NVIDIA 850M gpu and it has Optimus technology, how can I do this on Fedora??
I've heard it works pretty well if you have a "muxed" laptop, but it's pretty difficult to use on "muxless"
Unfortunately laptop manufacturers don't publish if their display is muxed or not
I learned a lot from this tutorial who discusses the differences and walks through the process
lantian.pub/en/article/modify-computer/laptop-muxed-nvidia-passthrough.lantian/
@@BlandManStudios Unfortunately, I've muxless laptop
what disk image you were using in this video?
Amazing, I hope I can do this too
Curious, I typically run ten of the same Steam games on ten different accounts on ten different VM's on my windows PC. Since Linux is so much more powerful, is there a way of virtualizing ten different Steam accounts on Linux, so I am actually idling all of them simultaneously, and able to switch between them instantly like I already am doing in Windows?
Only difference is, in Windows, I cannot play the game competitively because VMWARE has mouse locking issues where my mouse flies outside of the game if I move the mouse too fast which is very irritating. Version 7 did not have this issue, but 15 has the ability of utilizing 16 cores for it's VM's.
Started using Ubuntu Linux V23. Took me two days to build Steam Desktop Authenticator on Linux and I am unable to figure out how to make a .desktop file for the desktop. I can run the executable manually but that's it. I love the fact that Linux allows users to customize things and hate the fact that a simple configuration error can brick your operating system. If it takes me forever to learn, that is what it is gonna take as I very much dislike Microsoft and do not wish to use their operating systems any more. I could always have a VM of Windows 7 and XP on the side if I ever need it for legacy hardware or running old games.
Pointless running a VM which needs to be shut down to be switching between your host system or other VM's. I have multiple hard drives I can utilize, but GPU's take up too much room in my desktop. I also have many monitors, but I prefer using one monitor to quickly switch between games running.
Is this possible?
Do not answer if it is no. I only want idea's or solutions. And yes, I am still running two computers Side by Side one with Linux and other with Microsoft. Once I figure it out, I can retire my second PC.
I do think it would be possible in Linux to have many VMs. If you saw the video from Linux Tech Tips where he did "2 gamers 1 PC" and I think they might don't another one with more VMs. That's using this same tech!
But... If you're playing a game that requires a GPU, you'd need multiple GPUs for this to work with "gaming performance" in each VM
But it sounds like that might not be a dealbreaker cuz you've got 10 running right now, so it's probably a low GPU game
What I would do, is similar to what you're doing now, just with Linux as the base/host. Install Linux then install 10 VMs using KVM/libvirt/qemu so you can run the game ten times. If you use spice or looking glass for the display, I would expect you to have issues switching fast between them
Then keep all the complicated configuration in your VMs
And keep your host Linux install really simple so you dont often run into the scenario where a config change bricks the whole PC
It would be a complicated setup and a lot of work, but I don't see why it would be impossible
Also, I have this video on how I decommissioned my old windows PC if that's helpful: ua-cam.com/video/XjDBcFx7b-4/v-deo.html
For the linux host, which nvidia drivers u use?@@BlandManStudios
what are the odds I am watching the office and I see their being a homemade game setup of "THE office"
The odds are 100% if you watch "the office" 24/7, which is a totally reasonable thing to do
Would love to see a setup of this
Good to know! Hopefully recording another more technical demo soon!
how to do GPU Passthrough linux vm on linux
can you give a link i cant find how to search
Im planing to buy victus 5600h with rx 5500m just for mac vm... Will this work?
BlandManStudios, I can't find any video guide for how to VIFIO Linux VM ON windows as host OS. I'm a windows user but I would love to have 3d accelerated linux
you look better already
GPU passthrough is awesome and it's what made me switch from Windows to Linux.
My setup uses an RX 550 for Linux and a GTX 1060 6GB for Virtual Machines, it works wonderfully, you can have desktop programs from both Windows and Linux running simultaneously this way.
My only complaint with a setup like this, is that swapping the GPUs around to do the GPU intensive work on baremetal Linux instead can take up to 30 minutes to get Xorg, video drivers and etc working; but this isn't really a problem, because you could just create a Linux VM and pass the good GPU there.
AAAAAAAA BALD, ye i'm looking for a tutorial, instant subscribe
I'm lolling at "BALD" thanks for the sub!
can you do the same test with any VM
I wanna see if your pc is too good
or this trick is working !
Can you do a demo of running two separate windows instances running two separate instances of a game in coop on one CPU and one GPU only?
Dual boot will serve better in this case as there will be no virtualisation layer and all resources will be dedicated to one OS at a time.
It can be risky in regards to Windows/Linux
Windows can mess with things like BIOS, plus running on bare metal negates its own “containment” in regards to privacy issues, etc.
Whenever I tried dual boot, windows always f**** up my linux installation after few months. So that is something which I cannot bear.
also wanna ask
can I install Prime OS
or any other os and play on it ?
Yes
are nvidia gpus reliable enough for this kind of setup? usually linux works well out of box with amd right? is ur host running in wayland?
The gpu is passed through so it's up to the guest vm (i.e. windows) to handle it. In terms of the host, all I know is that nvidia proprietary drivers for an nvidia card should/will just work >99% of the time, there's no reliability issues there in terms of degradation or anything like that, I'm just saying >99% because maybe it doesn't work on some computers/cards (probably pretty old cards), reliability issues only comes into play afaik for other non-gpu hardware drivers, especially on laptops (backlight, wifi, etc sometimes doesn't work like it should)
@@SourceChancan u boot into uefi menu on the vm with single gpu passthrough?
@@jirehla-ab1671 Yes
@@SourceChan ur also using single gpu on yur mobo?
@@jirehla-ab1671 I did, am no longer, because I stopped playing games on Windows, you can't really play mmo games anyway because many of these games block VMs.
Interesting and all, but if I lose access to my Linux Desktop while running Windows, might as well just boot into Windows. I do know about having 2 graphics cards, just wish my motherboard supported it.
I had a difficult time with it on arch on i unbind the gpu from the vm and start the vm it will break pipewire and firefox for some reason
I really was considering going back to linux. The main reason to why I didn‘t go with linux yet (or why I went back to Windows) was Valorant, mainly because its Kernel level Anticheat which won‘t work on Linux… but I think I gotta give it a shot with this! Hopefully it‘ll work, somehow!
Anyways, ty for the video!!!
@@alperen_n71 thanks for the comment and goodluck with the setup! Quick warning tho, I've heard the Valorant anti-cheat tries to block players that are using a VM. So if Valorant is a deal breaker for you, do some research on the /r/vfio subreddit to see if it is possible to run Valorant in a VM
just out of curiosity, how does this compare to native windows gaming?
Short answer is that performance is basically just as good
I made a few videos giving the long answer: ua-cam.com/play/PLG7vUqRxMOG6svx97KUW_Zy-Wyeu_yIqS.html
ohh nice! tyyy
@@BlandManStudios
About the UE game, my guess is that it's a recreation of The Stanley Parable.
That WiFi name xD
🤦♂️you've got a good eye😂
@@BlandManStudiosdoes every device that will be passthrough needs to be included in the iommu group?
Wow Nice Now we need somebody to figure out how to run Nvidia GPU on laptop when you got Intel/Nvidia :)
Thanks! So true. I really wanna try this tutorial, but first I need a compatible laptop
lantian.pub/en/article/modify-computer/laptop-muxed-nvidia-passthrough.lantian/
I have made it work on laptop, passthrough Nvidia GPU to win10 vm. But when win10 vm using the GPU, it can not adjust brightness of the laptop's screen.
I wish people would stop posting these guides not a single one of them work with a single GPU, they all require 2 DGPUs.
No?
@@commissarofpublicsafety No what? Garbage for clicks is still garbage.
Where did ur hair go
Some people would say the internet is a scary place that doesn't care about you... But you noticed my baldness and I've never helt more seen