XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Set passthrough GPU as a primary graphics card for a VM

    Scheduled Pinned Locked Moved Compute
    5 Posts 3 Posters 694 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      miltador
      last edited by miltador

      I am trying to passthrough my Intel iGPU to an Ubuntu VM.
      I can see a passed through card in the guest using lspci 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.
      In The effect of gfx_passthru= option section of that article there are described ways to make Xen change primary graphics card OR remove curris vga card.
      I tried adding gfx_passthru=1 and vga=none to VM other-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 virtual curris card?

      1 Reply Last reply Reply Quote 0
      • olivierlambertO Offline
        olivierlambert Vates 🪐 Co-Founder CEO
        last edited by

        Hi,

        Maybe @Teddy-Astie might help 🙂

        1 Reply Last reply Reply Quote 1
        • TeddyAstieT Offline
          TeddyAstie Vates 🪐 XCP-ng Team Xen Guru
          last edited by

          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)
          M 1 Reply Last reply Reply Quote 0
          • M Offline
            miltador @TeddyAstie
            last edited by

            @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.

            1 Reply Last reply Reply Quote 0
            • M Offline
              miltador
              last edited by

              I've tried an experiment and modified slightly qemu-wrapper script to not add cirrus-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?

              1 Reply Last reply Reply Quote 0
              • First post
                Last post