• Vik@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    5 months ago

    I got VFIO/IOMMU + single GPU pass-through working on Fedora 40 with my RX 6800 xt into a win10 VM.

    More of a see if I could sort of thing, I don’t imagine I will actually need it much, but it may help if any of my friends are curious about switching over.

    • barsquid@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      5 months ago

      What are you using to run the VM? Regrettably, I need a Windows install to upgrade firmware on a USB device. I’m hoping I can get it done in a VM and at least not pay them anything. I tried a little yesterday but wasn’t able to install from the Win10 ISO.

      • Hexarei
        link
        fedilink
        arrow-up
        4
        ·
        5 months ago

        I dunno what you were using but I recommend virt-viewer.

        The main thing for this one is that you’ll want to get a PCIe USB controller card and pass that through directly to the VM so that unplugs/replugs/device resets don’t connect the device to the host machine briefly while if determines if it should pass through.

      • Vik@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        ·
        5 months ago

        KVM/QEMU via virt-manager. I would imagine that your use case would work if you pass the USB device or the entire usb host controller through to the VM, but I’m not sure. Please check the video linked in my other comment for more information on the single GPU setup

    • dave@hal9000@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      5 months ago

      Oh my god, I wish! I have tried unsuccessfully before, but I was trying to just pass my onboard AMD igpu to the VM and keep an NVIDIA on Linux.

      When you say single passthrough, you mean splitting the one GPU to host and client?

      I have tried through the arch wiki and a couple of YouTube tutorials with no luck. If you found any tutorials/resources that really, helped, please share!

      Also, I really wish I had the foresight to have bought AMD instead of NVIDIA a few years ago, but it was before I was on Linux as my main driver and didn’t know any better

      • Vik@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        ·
        edit-2
        5 months ago

        Hey there, just using a single GPU in this system. If you have multiple adapters, you can try something like LookingGlass instead. In my case, I would need a single GPU that supports SRIOV, which is typically relegated to data centre products (I believe someone actually managed this with an Intel iGPU + and experimental sriov driver!).

        I’m just passing my GPU through to a virtual machine; it takes precedence over the graphical session, leverages all connected displays and relevant peripherals, and gracefully resumes back into GDM / GNOME once the VM is powered off (can do this conventionally within W10).

        I mostly followed this video:

        https://www.youtube.com/watch?v=eTWf5D092VY

        key thing for AMD gfx is to set ROMBAR = 0 in virt config, this will allow you to actually get functioning display output once the VM is started up.

        As for your buying choices, consumer AMD GPUs have issues with GPU reset (unlike Intel or Nvidia). I think your experience with nvidia graphics here will be better than mine here with amd.

        Byt yeah, since you have multiple gfx adapters at your disposal, it should be possible to get started with LookingGlass (a VM in a movable, resizable window that is fully hw accelerated with shared memory). The Level1Techs forum for LG is very helpful, though I believe the creator of the video above also has a relevant guide for this.

        • dave@hal9000@lemmy.world
          link
          fedilink
          arrow-up
          3
          ·
          5 months ago

          Thanks for sharing the details! I’m gonna check out the video. So if I understand correctly, when you start your VM, it completely takes over video, and you’re not seeing the host desktop at all, but then when you shut down the VM, it returns to your host desktop? So the resulting experience is like dual booting, but a lot faster? I Heard about looking glass, but hadn’t delved into it since I couldn’t even get the igpu to passthrough in the first place (testing with a cable going to another input in my monitor, which AFAIK, would be the part that looking glass solves)

          • Vik@lemmy.world
            link
            fedilink
            English
            arrow-up
            3
            ·
            5 months ago

            Very welcome! Yes, exactly as you described. The nice thing is that you have greater control over Windows in this virtualized environment, particularly with regards to limiting device and network access.

            I gather that display dummy plugs are pretty common in the looking glass community.

            • dave@hal9000@lemmy.world
              link
              fedilink
              arrow-up
              3
              ·
              5 months ago

              Ha, I was about to edit to say I watched the video. It’s a pretty smooth transition into the client machine!

              • Vik@lemmy.world
                link
                fedilink
                English
                arrow-up
                3
                ·
                5 months ago

                It’s kind of crazy to me how well it works! It’s hard for me to wrap my head around it sometimes.

                My end goal is to not have to eventually not need to use windows at all but I’m still very impressed with how this behaves.

                • dave@hal9000@lemmy.world
                  link
                  fedilink
                  arrow-up
                  3
                  ·
                  5 months ago

                  Yeah, I have one piece of software where I need Windows with a GPU (Fusion 360, got it running on wine once but an update broke it), and my wife needs my PC for Adobe stuff sometimes. I might buy a cheapo used older GPU, I don’t need much since it’s not for gaming. That said, the video showed something that might fix where I got stuck last time trying to pass the integrated GPU, so I’m trying that again. I have a Ryzen 9 with 24 cores, so plenty of juice to go around If that if I can pass the igpu through. Then I could try looking glass and be all set. Thanks for sharing, gave me some hope to try again haha