this post was submitted on 17 Dec 2024
44 points (97.8% liked)
Linux
48664 readers
579 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I haven't looked into how to configure this but it should be possible, and you would use the motherboard HDMI port for the VM, and the ports on the dGPU for the host. As usual, the arch wiki is your friend, even if you are not using arch
But... If you don't care about VM performance (seeing as you are passing the iGPU to it) you should look into other options like virtio or sr-iov, so you don't need to fiddle with the HDMI ports. Please notice that virtio is paravirtualized and only works well for Linux hosts, and sr-iov is real hardware virtualization and requires hardware support. Both these methods require only one GPU. Once again, look at the arch wiki and the qemu wiki.
Also, if you are using Linux hosts, you should really look into "GPU native context" which is a paravirtualization method that works similarly to Hyper-V's GPU paravirtualization (which is currently the best) and would allow almost native performance for the VM, without requiring multiple GPUs. It is not available for amdgpu yet, but you can follow development here.
P.s. if you are using windows hosts, paravirtualization methods will not be satisfactory for the foreseeable future. You will need either passthrough (like you suggested) or full virtualization (with sr-iov). I can give you more details if you like.
So I did follow a tutorial earlier and I think I got something going. One thing the tutorial didn't mention is plugging one of the monitors into the motherboard's HDMI. That's why I only had one monitor when I did it? 🤦🏽♂️
Probably, if everything else is correct. GPU passthrough hands over an entire GPU to the virtual machine, so the only way of getting the output of that vm is plugging a monitor in that GPU
Makes sense. Thank you. I'll mess with it more and see what I can come up with.
This might be of use to you:
https://looking-glass.io/
You might still need a dummy hdmi/DP plug/adapter.
Hold on, what? So this is just something you download and run? I've never heard of this thing, in case this question sounds stupid. Lol
You would still need to pass the GPU through to the VM, but this can eliminate the need to plug the GPU output into another device or use a dedicated monitor.
I have never used it, but I know it is pretty common.