• penquin@lemm.ee
    link
    fedilink
    arrow-up
    4
    ·
    7 个月前

    That’s why it failed for me, I don’t have an Nvidia GPU. I wanted to pass my GPU to my windows install but it never worked and I blamed kvm 🤦🏽‍♂️ I knew about the first part that the “3rd acceleration” isn’t a full GPU passthrough, but didn’t know the latter was Nvidia only.

    • DefederateLemmyMl@feddit.nl
      link
      fedilink
      English
      arrow-up
      4
      ·
      edit-2
      7 个月前

      It does work with AMD GPUs too, I did it with an RX6800XT myself, but there are some (most…) AMD GPUs that have a reset bug which means they hang if you reboot the guest and you need to powercycle the physical host machine to make the GPU usable for the guest again.

      • penquin@lemm.ee
        link
        fedilink
        arrow-up
        2
        ·
        7 个月前

        Well that sucks. I have a 580xt GPU. It’s about 7 years old, but still powers. Do you have a link on how to get it working? Pretty please?

        • DefederateLemmyMl@feddit.nl
          link
          fedilink
          English
          arrow-up
          4
          ·
          7 个月前

          To get basic GPU passthrough working, I mainly followed the Arch Linux guide: https://wiki.archlinux.org/title/PCI_passthrough_via_OVMF

          Be warned though that this is just the start of the journey. There are all kinds of issues that you need to deal with and decisions that you need to make if you want to practically use it for gaming, and those require lots of googling, piecing bits of information together from all over the place, and trial and error. From memory these are things I had to deal with:

          • How to handle storage? Just a qcow2 file or pass through a partition or drive?
          • How to handle mouse and keyboard input? Emulated or through a passed through USB port? Both have their pros and cons.
          • Audio is a pain in the ass… emulated it either crackly or laggy. There is a way to pass it through to pipewire through a unix socket, but it’s convoluted to setup. Or perhaps you can pass an entire audio device through to your guest?
          • Bluetooth audio, for my wireless headset, was an even bigger issue because audio did not get routed correctly to the headset if I just connected to the host. In the end, I got a separate bluetooth dongle for my VM, and passed it through.
          • How do you handle the display between guest and host? Two separate monitors? A monitor with dual inputs, and toggle between them? Or something like looking-glass, which sounds appealing but again introduces issues like vrr not working properly, and your GPU will probably need a dummy “dongle” to work without an actual monitor connected.
          • Then there’s the CPU and how to divide the cores between guest and host: for best performance, the guest’s cores need to be reserved, and should take into account the CPU topology. For example, I have a 5900x and reserved the 6 cores on one CCX for my VM , leaving the other 6 for my host.

          For more information, there’s the /r/VFIO subreddit. Yeah I know, f*** reddit, but it has a lot of useful information. The looking glass site has some FAQs too, even on things not directly related to looking-glass itself. There is some VFIO discussion on the level one forums as well, but they’re not so active.

          Anyway if all this sounds like a cool project to spend a few weeks on, I heartily recommend you try it. I sure enjoyed setting this all up and getting it working, but I spent way more time configuring and troubleshooting things than I did gaming with that setup, and in the end I decided that just gaming on Proton and occasionally dual booting for problematic games is a much more practical solution.