So, someone figured out how to unlock vGPU for consumer nvidia GPUs:
Unfortunately this requires some patching to the proprietary driver, nothing crazy, just need to include a file on the available dkms source. I wonder if anyone knows how this could be made to work on NixOS?
For those who do not know, vGPU allows you to share a single host GPU with several virtual machines, effectively allowing for a really nice Windows VM situation for games and such, with near-native performace, without needing to dedicate a separate GPU to Linux! NixOS seems great for this because someone could make some option like graphics.vgpu.enable and it’d all be set up automatically
Looks like someone would have to package the Nvidia GRID driver first, which I don’t know would even be possible, since I think it requires a paid license to even use. Could be wrong though.
This module provides the drivers for the host kvm NixOS machine, not the guest VM. (Although it shouldn’t be to difficult to get that to work as well.)
The normal nvidia vgpu-kvm drivers don’t include the ability to use the standard X11 desktop on the host, but this module works around that by hackishly combining and building the host and guest drivers into the same package so that you can use your normal desktop while also providing virtual GPUs to guest VMs.
While this can be tested to work without a proper license, the guest will be limited in framerate until you obtain one. It should be possible to obtain a 90 day evaluation license from Virtual GPU (vGPU) Software Free 90Days Trial | NVIDIA .
Theoretically the GRID + vGPU KVM drivers could be upstreamed into NixOS if there were users that could maintain it, while the vgpu_unlock and driver merging stuff should probably be maintained externally from NixOS.
This has not been working in the latest versions, of nixOS, I made a version that works.
But it doesn’t compile the drivers on the fly, I pre compiled them and for now it’s just grabbing them from my google drive