chore(malachite): update passthrough script for nvidia
This commit is contained in:
parent
54c92e13a6
commit
b1dde40dcc
1 changed files with 22 additions and 12 deletions
|
|
@ -26,13 +26,18 @@ let
|
|||
# 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
|
||||
|
||||
# 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
|
||||
|
|
@ -67,7 +76,8 @@ let
|
|||
# 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue