New to VFIO VMs, any ideas on how to work with 1 GPU and Ryzen iGPU?

I always dreamed of a seamless Windows integration into a Debian distro (like a reverse WSLg, with Linux being the host).

I have a Ryzen 4750G and a GTX 1070ti. I was new to VFIO, and only had have lots of remote headless Linux server experience :P.

Since I have a Mini-ITX Gigabyte B450 I AORUS PRO, I planned to pass my GTX1070ti while keeping my APU for Linux.

Suffice to say, it probably wasn’t the most ’ user-friendly’ experience, and learning KDE Neon didn’t help.

I eventually rage-formatted my SSD and continued using Windows (I had Linux installed on my second SSD, don’t worry).

Looking back, I now really want to get back into it, as I learned more than ever about how Linux and computers work.

I want to give it another try, but I don’t know where to start, as VFIO has developed so much since I’ve last tried.

User NetworkingMicrobe also has a similar configuration to mine, it seems, and has also gotten farther than I have:

I have some ideas (like using a robust and baby-proof distro like POP_OS), but other than that, I’m open to ideas (or even the proper guides as 80% of them I find are outdated).

Happy to learn,

(Edit) : New to this awesome forum and not sure exactly where to post topics. If I posted it in the wrong location, please let me know and I’ll move it.

1 Like

Hey! Welcome to Level1techs!

Check that you can enable IOMMU
And that the groups are valid. (i.e your gpu is in its own group.)
Archwiki - Setting up IOMMU

The archwiki guide is really good.
But here are two guides for Single-GPU-Passthrough.
joeknock90 Single-GPU-Passthrough
YuriAlek vfio

There’s no magic bullet - in my experience it is very much DIY. But the resources to achieve it are there you just have to have the patience/understanding to read them.

Good luck! Don’t hesitate to ask for help if something seems hard :nerd_face:

The way I look to break GPU passthrough is twofold.
1- isolate or separate the DGPU from the system, so it effectively is not used by the host
2- pass the GPU through to the guest.

There are ways to reallocate, to unbind, to unload a GPU that the host is using, but I found it easier to just keep them separate.

An easy thing to forget, is that you need to use the iGPU in the bios as the primary display out for the system, else the system might over-ride isolating things later.
Also ensure virtualisation is enabled in the bios, as well as the IOMMU as pollo said.

Then I would look at some of the guides on the forum.

Depending on the board topography, the DGPU might not be in a separate IOMMU group, in which, you might need to patch your kernel?

Here are a couple guides after quick google searches, if you find that a couple of them don’t have the correct steps (or don’t work for your hardware/setup for whatever reason, its not usually a bad idea to look around for solutions or read around until you find one that works for you).

P.S if you have no intention of playing games or doing gpu intensive work on your host, you could pass through your GPU to a VM and keep the iGPU for the host.
Alternatively, single-gpu passthrough does exist with a few more steps and allows swapping of the GPU between the host and guest, but the downside of this is you cannot use programs such as looking-glass because access to the host while using single-gpu passthrough is restricted.

I would start with the arch and gentoo wiki for the most up to date info (for the most part) as well as extra steps that you can do with the VM like cpu-pinning and a setup of looking-glass if you do decide to go with only using the iGPU on the host.

Thank you guys so much for all your help. Every suggestion you’ve given has been great.

I think I was close to getting a proper configuration as you’ve described, but one of the hardest roadblocks was getting the Xorg to use the proper graphics (I should have also mentioned that I planned to use my iGPU with my host).
It was getting to the point where it felt like I was installing a desktop environment for Gentoo :P.

Also, only now am I starting to notice a regular occurrence and connecting two to one:

I’m using a Gigabyte B450 mobo. Even though I’m reading it has the best bios configurations (which I can see when I heard that Initial Display Output setting is unique to them), I think the B450 chipset can’t handle the newer gen OEM Ryzen 7 Pro 4750g.

What’s happening is that every time I don’t completely disable the APU in the bios, no output shows on both units.
What’s even weirder is it POST boot loops quickly about 6 times until I notice the RGB lights turn orange, indicating that all settings are reset to default (even ram speeds).

My CMOS isn’t broken: I can enter the bios and load my config again. But once again the quick boot loop happens. Also, mashing del during any of these post loops does nothing, and I only see the output when the windows login screen appears regardless.

Suffice to say, I blame the chipset holding Gigabyte’s attempt for seamless compatibility. I’m going to get the X570 variant of the same ITX mobo (thumbs up for Gigabyte is one of few tech companies who know when to not re-invent the wheel).

Excited to finally settle down in this rabbit hole,

1 Like

Check the BIOS version as you need F60 or newer to get support for the 4750G.
X570/B450 should not have any effect in your case.

Already have the latest version:

Wondering if my motherboard has serial pins that prints bios boot details. I could then use a simple uart to USB to read it.

I could also try to use my M.2 x4 PCIe slot to plug in a POST code displayer. Either way, I have no idea what’s going on when it happens.