You are not logged in.

#1 2023-07-02 22:22:11

Cheeto
Member
Registered: 2022-09-11
Posts: 64

Is this possible? Not-headless multi-GPU, and passthrough to VM.

See diagram I made: https://i.imgur.com/ZTSqICb.png

I've been reading the wiki on gpu passthrough, but it's a lot to take in (40 pages of text, plus I assume another 100-300 pages if you follow the links). And I was supplementing my poor understanding of the technical language by checking out guides around the web, and at some point I stopped and said, "wait, none of this seems to be geared towards my use case, so maybe I should find out if this is even possible before I spend the next year full time studying for a PhD in Linux I/O just to use my dGPU".

I'm not trying to be reliant on looking-glass, because I've done that before and it seems it adds a TON of steps for what appear to be headless setups but...I have a video cable and this is a desktop with a dGPU so maybe I don't need to go headless.

Another thing I noticed was recommendations to isolate the dGPU for the VM, but I'm wondering if I can just NOT do that, like in windows and Mac, and like Linux laptops do with Prime or whatever it is (how you can run the system on iGPU and tell some apps to use the dGPU). Then maybe I could use the dGPU for compute on the host, and I could press the phsyical input button on the monitor to swith to displayport when I need it for display (e.g. a VM).

My system:
OS: Vanilla Arch, Wayland, GNOME, linux-zen, installed via archinstall for predictable configuration when seeking support
MOBO: asus z690 extreme
CPU: i9-13900k, this CPU/MOBO combination does support VT-d and IOMMU and both are enabled
GPU: RTX 4090

Last edited by Cheeto (2023-07-03 00:44:56)

Offline

#2 2023-07-03 06:52:13

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,132

Re: Is this possible? Not-headless multi-GPU, and passthrough to VM.

If the usb-c to HDMI output principally works and your HW (likely) meets the prerequisites for OVMF then yes, but

Then maybe I could use the dGPU for compute on the host, and I could press the phsyical input button on the monitor to swith to displayport when I need it for display (e.g. a VM).

is NOT.

In order to pass the GPU through to the vitual client system, the host must not use it AT ALL, you can  pass it through at runtime, but that requires you to kill any consuming process (the display server, your graphical session) unload/detach the controlling module from the chip and then pass it through via OVMF, this isn't like prime-offloading where the chip remains under the control of the same OS all the time.

https://wiki.archlinux.org/title/PCI_pa … h_via_OVMF is actually pretty straight forward itr…

Online

#3 2023-07-03 15:05:21

Cheeto
Member
Registered: 2022-09-11
Posts: 64

Re: Is this possible? Not-headless multi-GPU, and passthrough to VM.

seth wrote:

If the usb-c to HDMI output principally works and your HW (likely) meets the prerequisites for OVMF then yes, but

Then maybe I could use the dGPU for compute on the host, and I could press the phsyical input button on the monitor to swith to displayport when I need it for display (e.g. a VM).

is NOT.

In order to pass the GPU through to the vitual client system, the host must not use it AT ALL, you can  pass it through at runtime, but that requires you to kill any consuming process (the display server, your graphical session) unload/detach the controlling module from the chip and then pass it through via OVMF, this isn't like prime-offloading where the chip remains under the control of the same OS all the time.

https://wiki.archlinux.org/title/PCI_pa … h_via_OVMF is actually pretty straight forward itr…

Ok.

Ya, that's the wiki page I was referring to. I think the consensus that the wiki is really easy to follow is true, for people who are basically experts and either already know the info and are using it as a refresher/reference, or for people who are experts in other linux domains and are able to learn the technical aspects for any given project as they go through the relevant wiki pages. But as a newbie it's no different than 40 pages of chinese to me—you don't learn chinese by reading it, you first learn chinese and so that stuff written in it can be useful.

Do you have any suggestions for sources on learning the relevant chinese here, so that I can follow the wiki page(s) on this topic? I'm not against learning or reading (within reason, I'm in school full time and I work full time, and I do volunteering and sports), and I really do want to be able to accomplish this. I thought existing guides on the net would cover this but it seems like everyone only wants a windows guest for gaming using looking glass, but I'm more interested in a linux guest, non-gaming related tasks on both the host AND the guest (not necessarily simultaneously, if that's what you were getting at), and going not-headless with dedicated video hardware.

Last edited by Cheeto (2023-07-03 15:05:35)

Offline

#4 2023-07-03 16:16:32

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,132

Re: Is this possible? Not-headless multi-GPU, and passthrough to VM.

I'm in school full time and I work full time, and I do volunteering and sports

So your day has 96h?

The wiki basically guides you through the process - if you's a specific question about the mening of something you can ask.

everyone only wants a windows guest for gaming using looking glass, but I'm more interested in a linux guest

The guest system is pretty much irrelevant and you don't need looking glass because you've multiple outputs attached to the different GPUs anyway.
Don't make this too complicated.

wait, none of this seems to be geared towards my use case

Maybe you should detail your usecase - in case you don't want to pass through the GPU itfp.
What is your ultimate goal (in laymans terms that you understand)

Online

Board footer

Powered by FluxBB