Set passthrough GPU as a primary graphics card for a VM
-
I am trying to passthrough my Intel iGPU to an Ubuntu VM.
I can see a passed through card in the guest usinglspci
and there is new card in/dev/dri
however Ubuntu uses the primary emulated VGA GPU for display output instead.
I want my passed through GPU to be a primary graphics card for my VM but I do not see any option in XCP-NG to do that.
I came accross this wiki page: https://wiki.xenproject.org/wiki/Xen_VGA_Passthrough.
InThe effect of gfx_passthru= option
section of that article there are described ways to make Xen change primary graphics card OR removecurris
vga card.
I tried addinggfx_passthru=1
andvga=none
to VMother-config
params list but it had no effect at all
So, my question is: how to achieve the behaviour described on the Xen Wiki page in XCP-NG? How to either set a primary graphics card or disabling virtualcurris
card? -
Hi,
Maybe @Teddy-Astie might help
-
Hello @miltador ,
If I understand correctly, your VM has this setup :
- a emulated Cirrus with a virtual display plugged in (this is what you see in Xen Orchestra) as primary device
- a physical (real) Intel iGPU with (supposedly) no display plugged in (i.e no physical screen plugged on the server motherboard)
The catch is that the physical Intel iGPU can only display on real physical screens (and thus not in Xen Orchestra).
So the Ubuntu desktop will display on the Cirrus display (which is the one you see in Xen Orchestra) and only it as you have no other display (otherwise, Ubuntu would show you multiples screens).
That doesn't prevent Ubuntu from using the Intel GPU, just that it's not used for display.
Depending on what you are looking for, you can make Ubuntu use the Intel GPU by :
- if you want to run a graphical program (and perhaps the entire desktop) with the GPU, you may need to use DRI PRIME offload to make the emulated gpu display what the Intel iGPU computes (see https://docs.mesa3d.org/envvars.html#envvar-DRI_PRIME)
- for multimedia software such as Jellyfin, you don't need to do anything special as e.g Jellyfin supports headless setups on Ubuntu (which is what you have basically)
-
@Teddy-Astie hello, thank you for the reply.
I have a physical screen plugged on the motherboard but it receives no output.
I suppose it is because the Ubuntu desktop VM detects emulated Cirrus GPU as a primary one and uses it for video output.
I can see Intel iGPU in Ubuntu VM but I want to use it as a video output on my connected physical display. -
I've tried an experiment and modified slightly
qemu-wrapper
script to not addcirrus-vga
device to the VM. THe VM starts, but I still have no signal on my HDMI output. Seems like more work needs to be done in order to use my iGPU for display on HDMI output...
Browsing through similar topics on the forum it seems like it's not a supported use case? Are there any plans to support this use case?