LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-23-2023, 12:42 AM   #1
goosesensor
LQ Newbie
 
Registered: Jan 2019
Location: Santa Cruz, CA
Distribution: Arch
Posts: 11

Rep: Reputation: Disabled
Question QEMU GPU passthrough with windowed framebuffer on host


My apologies if this topic would fit better in the Virtualization & Cloud section; it seemed like a better fit here.

I have an odd question that frankly I am not sure where best to ask, so I thought I'd give it a shot here.

For my work, being able to run multiple OSs in KVM VMs with dedicated discreet GPUs would be very convenient. I've done some tinkering with a second video card, QEMU, and macOS (don't worry, this is not a macOS-specific question!).

I have gotten to where I can pass the second GPU through to the VM, and can boot the machine with acceleration to a display connected physically to the second GPU.

My question: is it possible to get the accelerated framebuffer back into the host, e.g. inside the QEMU window in the host?

I'm thinking that the answer may be 'no' for a few reasons, but I hope I am wrong.

Any thoughts appreciated.
 
Old 01-28-2023, 10:48 AM   #2
yvesjv
Member
 
Registered: Sep 2015
Location: Australia
Distribution: Slackware, Devuan, Freebsd
Posts: 566

Rep: Reputation: Disabled
Isn't that dependent on the physical GPU/hardware?
Note: I came accross this vGPU functions while looking up sr-iov (different cat)
https://wiki.archlinux.org/title/Intel_GVT-g
 
Old 01-29-2023, 05:12 PM   #3
goosesensor
LQ Newbie
 
Registered: Jan 2019
Location: Santa Cruz, CA
Distribution: Arch
Posts: 11

Original Poster
Rep: Reputation: Disabled
That's very interesting, thank you. I just so happen to be using a Radeon Pro but it's hard to find information about which models are supported -- some sources say all "Pro" models are. I will definitely be looking into this more.

I think generally the framebuffer, once rendered in the GPU, is not passed back into the host -- it just gets polled over the display cable by the monitor. There are functions in OpenGL, for example, that can copy the buffer back into main memory, but in my experience they are slow.

So that's why I'm wondering, without the use of something like SR-IOV (how does this actually work?) what needs to happen to get that framebuffer back into the host and displayed in the QEMU window.

Note to anybody else reading this -- I am not sure about any of this so take it with a grain of salt.
 
Old 01-31-2023, 12:16 AM   #4
yvesjv
Member
 
Registered: Sep 2015
Location: Australia
Distribution: Slackware, Devuan, Freebsd
Posts: 566

Rep: Reputation: Disabled
Tbh, virtualisation isn't my specialty. We have a specialised team at my workplace just doing that at enterprise scale.

Hope this article helps a bit:
https://www.techtarget.com/searchvir...ktop-GPU-cards
 
Old 02-06-2023, 01:40 AM   #5
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,832
Blog Entries: 17

Rep: Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638Reputation: 638
Quote:
Originally Posted by goosesensor View Post
My question: is it possible to get the accelerated framebuffer back into the host, e.g. inside the QEMU window in the host?
Not sure I understand the question correctly, but, wouldn't that break the principle of the Virtual Machine?

It is however possible for the virtual machine to SHARE things with the host, like for example a filesystem. But in practice with QEMU, that is most easily done with plan9 network file system.

Having done alot of experimentation with GPU passthrough (and failed), albeit not with a second GPU, but sharing the same GPU, I did notice that the principle of the GPU in many cases also works in the same way as sharing. Meaning the way you actually get the screen on a non-GPU-passthrough is basically also over a kind of virtual network video stream. Several of the methods of using a display on a KVM/QEMU VM works in that way, and if I don't remember incorrect Looking Glass being one of them.

So, in theory, it should (maybe) be possible to stream back /dev/fb0 to the host in such a way, or something similar.

Maybe ramfb is a key possibility in all this. A tiny piece of technical detail about it here:
https://bugzilla.redhat.com/show_bug.cgi?id=1679680

Last edited by zeebra; 02-06-2023 at 01:45 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] sddm fails to display (on host) if a monitor is connected to pci passthrough gpu angryJellyBean Linux - General 2 12-18-2022 12:54 AM
QEMU GPU passthrough (2 - NVidia card) Anti-CMOS Linux - Desktop 1 08-06-2019 09:21 AM
Attempting to stretch a native windowed game to fill screen like borderless windowed screen; no success. WannabeMaestro Linux - Games 9 01-16-2019 01:13 PM
[SOLVED] Qemu virtio-9p host filesystem passthrough failure in Slackware-current-13MAY2015 kingbeowulf Slackware 6 06-03-2015 10:31 AM
LXer: Set up qemu-kvm-1.0+noroms as spice enabled qemu server vs qemu-kvm-spice on Ubuntu Precise LXer Syndicated Linux News 0 05-26-2012 07:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration