Guest User

/prepare/begin/start.sh

a guest
Jul 30th, 2025
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.75 KB | Software | 0 0
  1. #!/bin/bash
  2. # Helpful to read output when debugging
  3. set -x
  4.  
  5. # Stop display manager
  6. systemctl stop display-manager.service
  7. ## Uncomment the following line if you use GDM
  8. #killall gdm-x-session
  9.  
  10. sudo rmmod nvidia_uvm
  11. sudo rmmod nvidia_drm
  12. sudo rmmod nvidia_modeset
  13. sudo rmmod nvidia
  14.  
  15. # Unbind VTconsoles
  16. echo 0 > /sys/class/vtconsole/vtcon0/bind
  17.  
  18. # Unbind EFI-Framebuffer
  19. echo "efi-framebuffer.0" > /sys/bus/platform/drivers/efi-framebuffer/unbind
  20.  
  21. # Avoid a Race condition by waiting 2 seconds. This can be calibrated to be shorter or longer if required for your system
  22. sleep 5
  23.  
  24. # Unbind the GPU from display driver
  25. virsh nodedev-detach pci_0000_1c_00_0
  26. virsh nodedev-detach pci_0000_1c_00_1
  27.  
  28. # Load VFIO Kernel Module
  29. modprobe vfio-pci
  30.  
Advertisement
Add Comment
Please, Sign In to add comment