Advertisement
Guest User

Untitled

a guest
Dec 1st, 2022
719
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. ################################# Variables #################################
  4.  
  5. ## Adds current time to var for use in echo for a cleaner log and script ##
  6. DATE=$(date +"%m/%d/%Y %R:%S :")
  7.  
  8. ################################## Script ###################################
  9.  
  10. echo "$DATE Beginning of Unbind!"
  11.  
  12. ## Load VFIO-PCI driver ##
  13. modprobe vfio
  14. modprobe vfio_pci
  15. modprobe vfio_iommu_type1
  16.  
  17. sleep "1"
  18.  
  19. #dGPU host unbind (6700XT)
  20. #6700 XT VGA => 03:00.0 and [1002:73df]
  21. echo "1002 73df" > /sys/bus/pci/drivers/vfio-pci/new_id
  22. echo "0000:03:00.0" > /sys/bus/pci/devices/0000:03:00.0/driver/unbind
  23. sleep "1"
  24. echo "0000:03:00.0" > /sys/bus/pci/drivers/vfio-pci/bind
  25. echo "1002 73df" > /sys/bus/pci/drivers/vfio-pci/remove_id
  26.  
  27. sleep "1"
  28.  
  29. #6700 XT Audio => 03:00.1 and [1002:ab28]
  30. echo "1002 ab28" > /sys/bus/pci/drivers/vfio-pci/new_id
  31. echo "0000:03:00.1" > /sys/bus/pci/devices/0000:03:00.1/driver/unbind
  32. sleep "1"
  33. echo "0000:03:00.1" > /sys/bus/pci/drivers/vfio-pci/bind
  34. echo "1002 ab28" > /sys/bus/pci/drivers/vfio-pci/remove_id
  35.  
  36. sleep "1"
  37.  
  38. echo "$DATE End of Unbind!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement