Easiest GPU passthrough guide for Fedora 33
ฝัง
- เผยแพร่เมื่อ 7 ก.พ. 2025
- In this video, we will get GPU passthrough working on Fedora 33. This guide and the accompanying script should be compatible with previous versions of Fedora too.
Download the script from here: github.com/pav...
Arch Linux Wiki Error 43:
wiki.archlinux....
and search for "Video card driver virtualisation detection"
Source of vfio-pci-override-vga.sh is vfio.blogspot.c...
One of the best linux tutorials I have ever seen, thank you!
Thanks Pavol your guides are the best😊, tried the ubuntu linux mint ones worked on my geforce nitro 5 laptop, but not on my desktop gigabyte gaming x amd i have 2 nvidia drivers a cheap one 710 and a 1060 geforce i used this guide on fedora 40 workstation today and it finally worked on it, the vfio was shown on my 1060😊👍still working years later.
This is the best video I have ever found. Thank U
Thanks!
cool stuff friend. i look forward to being able to give this a go myself.
Good luck!
Thavks for the video!
This worked first time for me after spending five full days on other distributions and guides trying to get it to work. Thank you so much. One question... the script chooses the GPU i want to use for fedora. How would I force it to use the other card? One is Intel UHD 630 integrated and the other is AMD Radeon FE. I would like to use AMD for passthrough but it chooses Intel.
did you ever figure this out? keeps assigning the wrong GPU for the vfio driver
It will always chose the secondary GPU. You can try changing the primary/boot GPU in BIOS
I'm running Fedora 41 using two Radeon GPUs: Rx 580 and Rx 6750. I have tried half a dozen tutorials and none of them, including this one, are changing the "amdgpu" kernal drivers to "vfio-pci". I want the 6750 to be the passthrough GPU and the grub config shows the correct entries for both the GPU and the HDMI sound device. Any idea why this isn't working?
after i edit xml and run machine , my PC restart and get a black screen, then i need restart pc again. i missing somethings? im using GTX 1070
Thank you Pavol, thats amazing guide. Got everything working. Did someone tell you that you are the best ? :)
Only one question - I can't find the way how to switch the mouse and keyboard between Guest and host... Is there a way to use the same keyboard and mouse and switch between them when needed?
Instablaster...
@
Pavol Elsig will you create a video for gpu passthrough to macos kvm on Fedora 34?
Does not work, i think the admgpu module is loaded before the vfio
Is there any solution like this for Debian Linux ???
I tried this on my 2070 Super on the latest Fedora and KVM causes the system to hang. (well, not really since I can still SSH from the network into it and see the capslock light toggle when pressing caps. But my screens plugged into the AMD card immediately lose signal.)
I do happen to have the nvidia drivers installed since I would like to be able to shut down the VM and return the card to the host or boot the VM and have the GPU passed through dynamically. Is this possible? It would require unloading and reloading the driver but I don't know how to do this. Trying modprobe -r shows that it is in use by many things and I don't want to have to shut down the entire X11 desktop environment to perform the shenanigans. I'm not using the card as a display adapter, instead using it for cuda, openCL, and maybe graphics rendering (though doubt it is faster in any workload than the 6900XT primary GPU).
Awesome ! Thank you ! Do you think it's a good idea to passthrough a gpu for 3D softwares that need a lot of gpu power or it would lost some power between the Windows VM and Linux ?
The performance difference between a VM and bare metal should be minimal.
@@PavolElsig Ok thanks ! And just launch a classic VM will do the job for the Adobe Suite/ 3D softwares ? because I'm still new to Linux and I don't know if I have enough skills to passthrough a GPU. Especially a really expensive GPU ( RTX 3090 )
thank again
Glad it helped
Please make a gpu passthrough guide for optimus laptop 😢
So this worked after a reboot, but on system launch, Fedora displays "missing Nvidia kernel, falling back to nouveau" - which makes the GPU available for passthrough, I guess. *Question:* Is there a way to still use it while using Fedora normally? Like for GPU accelerated tasks that are not being done in the VM, for example?
Hey man, everything on the tutorial worked fine but after I delete the spice display and the video qxl my monitor won't get a display output from my gpu for some reason. But with it enable it detects both the splice display and my monitor. Any idea as to why thats happening or how to fix it? Thanks!
is this still relevant? thanks for video.
Updated link for Arch Wiki -- wiki.archlinux.org/title/PCI_passthrough_via_OVMF#Video_card_driver_virtualisation_detection
Hello, Is it possible to apply the same steps in this video for installing Mac OS with gpu passthrough ?
@MakoIsHere I actually manage to install Mac OS High Sierra which supports up to pascal generation cards; as you mentioned 10 series. If I am not mistaken Nvidia open sourced part of its kernel for linux. May be the hackintosh community would find a way to install the graphics driver even for the latest Nvidia drivers. I still have hope 😀
Doesn't work on Fedora 34 with amd cpu, vega 64 and rtx 2080 trying to passtrough vega 64 from the topmost pcie slot results in total system freeze. I do not understand what he is talking about primary and secondary gpus. Both gpus on my system are pcie mounted.
This was the fourth tutorial I've followed and all of the tutorials so far have resulted black screen and system freeze. Extremely annoying
Primary GPU is the one that displays output when the PC boots and is usually in the first pcie slot. Secondary GPUs are all other GPUs. Only secondary GPUs can be passed through using this guide.
@@PavolElsig Thank you from your reply, I found a friend during this weekend who has done this kind of setup with surprisingly similar setup and he explained that there is some proces which initializes during the boot and you can extract and flash something somewhere to uninitialize that after boot. We both have motherboard from asrock and in his case the bios/efi initializes all gpus at boot time so all gpus used must go trough that process.
Complex explanation and I really do not understand enough yet, but he warned me that the learning can take some time (for him two weeks of work) and arch wiki is the best friend you can have.
I am beginning to be more hopeful...
Please my Linux brothers, I need your help.
I want to switch so bad on Manjaro, but the problem is,
when I play a video on TH-cam in 4k, video is smooth but when I play it on Manjaro on 4k, video start to stutter.
Does anyone knows how can i fix that so I can move finally to Manjaro?
I'm using Manjaro KDE Plasma 20.1.2.
On my laptop I have integrated Intel Graphic 620 and dedicated AMD Radeon 530
Using Chrome as my main browser
My guess would be it has something to do with enabling GPU acceleration
Is it possible to get GPU passthrough on Intel i5 760 CPU, which has Intel® Virtualization Technology (VT-x)
enabled, Intel® Virtualization Technology for Directed I/O (VT-d) disabled and Intel® VT-x with Extended Page Tables (EPT) enabled ? I know its like ancient technology, but like to give it a try. Thank you for your answers.
Vt-d is required for passthrough. It won’t work without it. That CPU is just too old.
@@PavolElsig Ok, thanks. So I need to upgrade CPU and motherboard. Which one are you suggesting in price/performance tag. I am leaning toward Ryzen 5600, but cant decide about motherboard.
@@pubacajhen5107 I would recommend an X570 Gigabyte board like the Aorus Pro. I know it might be a bit too expensive. You could go for a cheaper one, but you’d lose a pcie slot that you could use for the VM. I actually have a video on choosing a motherboard for Ryzen.
@@PavolElsig Are there any significant differences between AorusPro X570 rev1.0 and 1.1/1.2?Which one would you buy i.e do you prefer?
@@pubacajhen5107 I don’t know the differences between the revisions, but any of those should be fine. The main reason why I recommended that board is that it has 2 CPU connected pcie slots. Additionally, because it’s a Gigabyte board, you should be able to set the boot GPU to any of the available pcie slots. That way you have a lot of flexibility when assigning devices to your VMs. You should even be able to run two VMs each with their own GPU. If there is a cheaper board that can do all that, get the cheaper one.
I am also waiting for it .... passthrough guide on Arch Linux
There are several comments asking about an Arch guide. I’ll see what I can do
@@PavolElsig thanks a lot
Thank you so much for your guide!
I have a Razer Blade 15 Base 2020 with RTX 2060. I followed this guide to the end but after I install the NVIDIA drivers in my Windows 10 guest and reboot, they show a Code 43 error.
Any idea how I can fix this?
Thanks in advance!
If you’re on a laptop, there are a couple additional steps. This is probably the most thorough guide out there: leduccc.medium.com/simple-dgpu-passthrough-on-a-dell-precision-7450-ebe65b2e648e
@@PavolElsig Thanks for that link Pavol!
Sorry to keep bothering you. I followed the instructions to add a fake battery to the acpi table, but now my VM won't start. It gives me this error:
drive.google.com/file/d/1_PF53jAVu3UB_e6WjOHPAVEoS_7GNz0v/view?usp=sharing
Have you seen this before? Thanks again!
@@reuvengelfarb1344 It looks like a permission issue. Probably the simplest way to deal with it is to disable Selinux.
@@PavolElsig This worked for me! Thanks for all your help Pavol!
Thanks.
No problem!
Quick question: Will I be able to have 2 VMs running with only 2 GPUs?
Not at the same time. Each VM will need a GPU and the host needs one too. If you have an iGPU, you could use that for the host.
@@PavolElsig unfortunately I don't have an iGPU. I read about Linux being able to run headless. But I can't boot it up somehow. I think my Ryzen 5 is the issue. Do you have any solution? Or did you ever hear anything about it?
@@it3963 I have never tried running a headless host, but I know it’s possible. This guide won’t work for that though. Another option is using a single GPU passthrough guide, there are several of those out there.
@@PavolElsig thank you.
Hey Pavol, tried doing this but couldn't get it to work. I have an amd CPU ryzen 9 3950x and a RX 6900xt but it doesn't work. I thought with the script it would use the integrated graphics for the host by default and the 6900xt for the passthrough, so not sure what to do if you can help?
Hi man, i have the same problem, it is possible to communicate with you (discord or another) for fix the problem ?
The R9 3950x doesn't have an iGPU. You might need a cheap GPU for the host.
@@Vggnog3383 yes my discord is kds32
@@PavolElsig and is there a way to use my host gpu in my vm when I start it and I’m that instance it would switch to my cheap gpu at that point but my host gpu unbinds when I switch the vm off and I can use it for Linux again? Is there a way to do that? And hope I explained it well
@@kevinmesto608 You could try one of the single GPU passthrough guides like this one: github.com/joeknock90/Single-GPU-Passthrough They are not easy at all though.
yet another great video..
how about a passthrough guide on Arch Linux?
arch wiki has a great guide
@@vboodesu9150 Yes, I know... However, an automated script might save a little time...
@@masterworld4698 I’ll look into it
Also is it possible to use the host gou as the vm when u start The virtual machine so it will switch to the guest and then when you turn off the vm then the gpu becomes the host again? Also do you happen to have a discord where I can reach u when ur free so I can ask more questions if need be
Why not installing a game on that VM to prove that it works flawlessly ? ^^
I’m glad it worked for you!
@@PavolElsig Well I haven't tried it yet. :p
Can you do Void Linux
You sound like you are annoyed as heck doing this video.