Nixos with vfio and GPU passthrough setup
Nixos with vfio and GPU passthrough setup
I attempted to use the instructions from the GPU VFIO guide (https://astrid.tech/2022/09/22/0/nixos-gpu-vfio). I followed them exactly and still didn’t get anything. I even bought the same CPU and motherboard mentioned in the guide, but nothing worked. I tried several other Linux distros with matching kernels and still faced issues. Now I’m starting fresh for the 8th or 10th version, but this time I’m using a new BIOS and everything from scratch. The EFI/BIOS settings are set as follows:
- ADVANCE | XMP-II: ENABLED
- PSSS SUPPORT: ENABLED
- NX MODE: ENABLED
- SVM MODE: ENABLED
- SMT MODE: ENABLED
- AMD fTPM SWITCH: AMD CPU fTPM
- ADVANCE AMD CBS NBIO COMMON OPTIONS: IOMMU ENABLED
- DMA PROTECTION: AUTO
- DMAr SUPPORT: AUTO
- PCIe ARI SUPPORT: DISABLE
- PCIe ARI ENUMERATION: DISABLE
- ENABLE AER CAP: DISABLED
- SRIS: AUTO
- ADVANCE AMD CBS NBIO COMMON OPTIONS SMU: AUTO
- cTDP CONTROL: AUTO
- EFFICIENT MODE EN: AUTO
- PACKAGE POWER LIMIT CONTROL: AUTO
- APBDIS: AUTO
- DF CSTATES: AUTO
- CPPC PREFERRED CORES: AUTO
Paste of relevant logs: boot log, configuration.nix, pre-requisites.nix, vfio-isis.nix, sudo dmesg.
The issue: I can’t attach the VFIO drivers to my GPU. Apologies for any language issues. Anyone can assist?
Gpu passthrough requires three Iommu features enabled in BIOS settings. The UEFI isn't booting. Blacklist drivers such as nouveau and nvidia/amd, and verify lspci -K if it fails. Disable the audio GPU driver as well. List drivers in VFIO like 0000:0000,1111:1111 (GPU and GPU audio). If you achieved success, consider learning CPU pinning to prevent conflicts between Linux and VM. I managed to get it working with Kubuntu. For NixOS, it's still new to this area—I might try later. Someone shared their configuration and got it done. Reddit link could be useful too.
Hey there! Glad you reached out for assistance. I’m excited to share that I’ve successfully implemented it: https://old.reddit.com/r/VFIO/comments/1...n_7_5700x/ Just wanted to reassure everyone it’s achievable. Don’t let anyone assume it’s impossible—just a few adjustments to your UEFI/BIOS settings will make it work.