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:
@@ -0,0 +1,33 @@
|
||||
{
|
||||
writeShellApplication,
|
||||
kmod,
|
||||
systemd,
|
||||
}:
|
||||
|
||||
writeShellApplication {
|
||||
name = "vfio_startup";
|
||||
runtimeInputs = [
|
||||
kmod
|
||||
systemd
|
||||
];
|
||||
text = ''
|
||||
# Stop the service that uses the GPU
|
||||
echo "Stopping the display manager..."
|
||||
systemctl stop display-manager.service
|
||||
|
||||
# Unload the GPU modules
|
||||
echo "Unloading the GPU modules..."
|
||||
modprobe -r nvidia_uvm
|
||||
modprobe -r nvidia_drm
|
||||
modprobe -r nvidia_modeset
|
||||
modprobe -r nvidia
|
||||
|
||||
# Insert the vfio modules
|
||||
echo "Inserting the vfio modules..."
|
||||
modprobe vfio
|
||||
modprobe vfio_pci
|
||||
modprobe vfio_iommu_type1
|
||||
|
||||
echo "Aaaand... off you go!"
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user