diff --git a/hosts/malachite/default.nix b/hosts/malachite/default.nix index 020f10f..8f0aea4 100644 --- a/hosts/malachite/default.nix +++ b/hosts/malachite/default.nix @@ -24,15 +24,20 @@ let echo 0 > /sys/class/vtconsole/vtcon1/bind # Unbind EFI-Framebuffer - #echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind - - # Unbind the GPU from display driver - virsh nodedev-detach pci_0000_03_00_0 - virsh nodedev-detach pci_0000_03_00_1 - virsh nodedev-detach pci_0000_03_00_2 + # echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind # Unload Modules - modprobe -r amdgpu + # modprobe -r amdgpu + modprobe -r nvidia_drm nvidia_modeset nvidia_uvm nvidia + + # Unbind the GPU from display driver + # virsh nodedev-detach pci_0000_03_00_0 + # virsh nodedev-detach pci_0000_03_00_1 + # virsh nodedev-detach pci_0000_03_00_2 + virsh nodedev-detach pci_0000_01_00_0 + virsh nodedev-detach pci_0000_01_00_1 + virsh nodedev-detach pci_0000_01_00_2 + virsh nodedev-detach pci_0000_01_00_3 # We love race conditions sleep 2 @@ -53,9 +58,13 @@ let modprobe -r vfio_iommu_type1 vfio_pci vfio # Re-Bind GPU to Host - virsh nodedev-reattach pci_0000_03_00_0 - virsh nodedev-reattach pci_0000_03_00_1 - virsh nodedev-reattach pci_0000_03_00_2 + # virsh nodedev-reattach pci_0000_03_00_0 + # virsh nodedev-reattach pci_0000_03_00_1 + # virsh nodedev-reattach pci_0000_03_00_2 + virsh nodedev-reattach pci_0000_01_00_0 + virsh nodedev-reaetach pci_0000_01_00_1 + virsh nodedev-reaetach pci_0000_01_00_2 + virsh nodedev-reaetach pci_0000_01_00_3 # Rebind VT consoles echo 1 > /sys/class/vtconsole/vtcon0/bind @@ -64,10 +73,11 @@ let sleep 2 # Bind Framebuffer - #echo "efi-framebuffer.0" > /sys/bus/platform/drivers/efi-framebuffer/bind + # echo "efi-framebuffer.0" > /sys/bus/platform/drivers/efi-framebuffer/bind # Reload Modules - modprobe amdgpu + # modprobe amdgpu + modprobe nvidia_drm nvidia_modeset nvidia_uvm nvidia # Back to On-Demand Scheduler for file in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do echo "ondemand" > "$file"; done