Physical GPU passthrough to window on wayland host

Hi! I’m running a Wayland desktop on Arch, and I want to use incus to isolate full desktop environments (also Arch Wayland to start). I want to set up GPU passthrough so that the isolated desktop renders to a window on the host, and I’m trying to better understand the steps involved.

I have a discrete GPU and an integrated GPU as detailed below, and I want to pass through the integrated GPU. Setting up passthrough itself seems like something I can probably puzzle through, assuming using an integrated GPU isn’t a roadblock.

But I’m unsure as to how I should get this rendering to a window. What’s the best way to have a containerized GPU render to a host window? Can I set up/forward a virtual display & virtual inputs somehow, or is it best to do remote desktop?

(My hope is that I can do this in a way that is transparent to the isolated environment as in the future I may want to expand to other operating systems.)

GPUs:
  Card 0:
    NUMA node: 0
    Vendor: Advanced Micro Devices, Inc. [AMD/ATI] (1002)
    Product: Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] (1638)
    PCI address: 0000:0a:00.0
    Driver: amdgpu (6.9.9-arch1-1)
    DRM:
      ID: 0
      Card: card0 (226:0)
      Control: controlD64 (226:0)
      Render: renderD129 (226:129)
  Card 1:
    NUMA node: 0
    Vendor: Advanced Micro Devices, Inc. [AMD/ATI] (1002)
    Product: Navi 23 [Radeon RX 6650 XT / 6700S / 6800S] (73ef)
    PCI address: 0000:03:00.0
    Driver: amdgpu (6.9.9-arch1-1)
    DRM:
      ID: 1
      Card: card1 (226:1)
      Control: controlD65 (226:1)
      Render: renderD128 (226:128)
1 Like

Please let me know if I’m mistaken, but trying to get the host window thing working is seeming like it could be a pretty deep rabbit hole. It struck me that this should be a lot easier/simpler just running another hdmi/usb cable pair from the integrated GPU to my existing physical KVM switch. I’m hoping that will mean I can just pass through the integrated GPU and the usb device and call it a day. Fingers crossed :slight_smile:

1 Like

Geoffrey McRae and his small team developed Looking Glass for fast graphics passthrough from a Windows 10 guest VM to a Linux host running Wayland.

Geoffrey has collaborated with Wendell at Level1Techs who has been a big proponent of VFIO GPU Passthrough.

There is a dedicated community at Level1Techs forum for Looking Glass:

The official Looking Glass website:
https://looking-glass.io/

I really hope we are seeing the dawn of seamless integration between VM and Container guests on a Linux desktop using Wayland technology.

I believe that Linux has languished far too long in the doldrums of obsolete graphics technologies and could leap into seamless virtual-guest-in-window compositing on Linux under Wayland.

I’ve been looking for technologies that could enable a guest to be displayed and managed as a Virtual Desktop on one monitor or across multiple.

I’m about to try an AMD Radeon 5700X on a 32-core AMD Epyc platform with 512GB RAM and a bunch of NVME SSDs. Looking for a host OS and so far the best candidate seems to be Fedora SilverBlue.

If SilverBlue doesn’t work I’ll try a Debian or Ubuntu distro. Arch would be awesome but I don’t have the knowledge and experience to put everything together just to get to a usable Desktop Environment, which might mean this project will be the steep learning curve into advanced Linux I must eventually take anyway.

I’ll be trying Incus as the foundation of this platform. Regardless of the outcome it should be an interesting journey.

If Incus guests could be seamlessly displayed in Virtual Desktops it might become a dominant player in the Dev and Gaming communities, as well as its Cloud infrastructure communities. Fingers crossed.

1 Like

@nickwalt Thanks, I did come across Looking Glass! But I had to write it off because it appears to only support Windows guests for now. I agree that the ability to do this relatively seamlessly would be quite handy. Good luck with your experiments! From afar Fedora seems like a nice place to start.

1 Like