Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # copy this file to /usr/bin/reset_vega.sh
  4. # This script must be run immediately after you shut down the VM. It doesn't work if the GPU has been left for too long
  5. # following a shut down. It doesn't work if the VM is rebooted.
  6. # to run simply open terminal and run: cat cat /usr/bin/reset_vega.sh
  7. # Remove/Power off the Vega GPU like uninstalling devices in Windows device manager
  8. echo 1 > /sys/bus/pci/devices/0000:43:00.0/remove
  9. echo 1 > /sys/bus/pci/devices/0000:43:00.1/remove
  10.  
  11. # Suspend to RAM
  12. systemctl suspend
  13.  
  14. # Read any user input
  15. read input
  16.  
  17. # Change permisions of the PCI rescan command
  18. sudo chmod 777 /sys/bus/pci/rescan
  19.  
  20. # Rescan PCI devices to reinitialise the vega GPU
  21. sudo echo 1 > /sys/bus/pci/rescan
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement