Add vfio stuff for win10

Add a whole bunch of stuff to start/stop displays for the win10 vm
Hopefully this will allow win10 to directly use the same GPU in passthru
mode
This commit is contained in:
Greg Hellings
2025-01-08 08:05:24 -06:00
parent 8a0b0f55e8
commit 2bbbeaa5f1
7 changed files with 131 additions and 7 deletions
+32
View File
@@ -0,0 +1,32 @@
{
writeShellApplication,
coreutils,
kmod,
systemd,
}:
writeShellApplication {
name = "vfio_shutdown";
runtimeInputs = [
coreutils
kmod
systemd
];
text = ''
echo "Removing vfio modules..."
modprobe -r vfio_pci
modprobe -r vfio_iommu_type1
modprobe -r vfio
echo "Reload the GPU modules..."
modprobe nvidia
modprobe nvidia_modeset
modprobe nvidia_drm
modprobe nvidia_uvm
echo "Starting the display manager..."
systemctl start display-manager.service
echo "All done!"
'';
}