Advertisement
Guest User

Untitled

a guest
Dec 1st, 2022
621
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. #!/bin/bash
  2. ################################# Variables #################################
  3.  
  4. ## Adds current time to var for use in echo for a cleaner log and script ##
  5. DATE=$(date +"%m/%d/%Y %R:%S :")
  6.  
  7. ################################## Script ###################################
  8.  
  9. echo "$DATE Beginning of Bind!"
  10.  
  11.  
  12. #dGPU host bind (6700XT)
  13. echo 1 > /sys/bus/pci/devices/0000:03:00.0/remove
  14. sleep "1"
  15. echo 1 > /sys/bus/pci/devices/0000:03:00.1/remove
  16. sleep "1"
  17. echo 1 > /sys/bus/pci/rescan
  18.  
  19. sleep "1"
  20.  
  21. ## Unload VFIO-PCI driver ##
  22. modprobe -r vfio_pci
  23. modprobe -r vfio_iommu_type1
  24. modprobe -r vfio
  25.  
  26. sleep "1"
  27.  
  28. echo "$DATE End of Bind!"
  29.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement