Enable GPU acceleration on Linux by configuring drivers and system settings appropriately.
Enable GPU acceleration on Linux by configuring drivers and system settings appropriately.
Hi, I once had a dual-boot setup with Windows and Arch Linux on separate disks. At first it seemed silly, but I kept rebooting into Windows because of laziness. I then tried using VMware on Arch for gaming, but since my system only has one GPU, passthrough isn’t possible. I read about the need for two GPUs to separate the guest OS from the host OS, but Linux doesn’t support a GUI. I’m wondering if there’s a way to use just one GPU without relying on a GUI in the host. Thanks ahead!
System specs: 12700KF (CPU regret – CPU without an integrated GPU), RTX 3070 Ti, 32GB RAM, 3600MHz, M.SI Z690 Edge, Wi-Fi, DDR4, motherboard.
I’m thinking about using KVM or QEMU to “steal” the GPU and run bare metal.
Linux operates without a graphical interface directly, but to observe the running guest operating system you need visual access. This typically involves using a graphical user interface. Virtual machines can run in a "headless" mode where Linux displays their UI inside a virtual frame buffer, yet you can't view the actual screen output. To see the contents, you'd have to route that virtual frame buffer to another device equipped with a graphics card, allowing it to render the frames. Usually, the host system displays the VM's screen by rendering it on its own GPU or integrating the guest's output into its own interface.
You may need to disable any running Display Servers (X.org/Wayland). Searching for single GPU passthrough usually leads to helpful guides, like the one on GitHub: https://github.com/QaidVoid/Complete-Sin...assthrough. Personally, I don’t see much value in it. It won’t speed things up compared to dual booting. You’ll still have to log out and restart Windows each time you need the VM. Unless you’re using a physical disk, it might use a bit more space. Performance will drop noticeably. You’ll have more room for errors, Linux could become mostly unusable while the VM runs. You can connect via SSH from Windows, but WSL is likely a better option. If your aim is gaming, some titles like Valorant detect VMs and treat them as a security risk. My advice is to get a second GPU, switch to dual boot, or run Windows with WSL.
This resource incorporates libvirt hooks for detaching and reconnecting, though it leans toward accepting potential complications.
I wasn't able to enter a TTY session or perform those actions to restore your GPU after leaving the VM.
It seems the setup won't work due to games like Valorant detecting VMs. The secure boot policy error arises because Windows expects a signed package, but unsigned files are needed. You may need to disable secure boot temporarily or adjust the configuration to allow unsigned modules.