Advertisement
Guest User

stop.sh

a guest
Jun 1st, 2021
1,673
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.72 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # enable debugging
  4. set -x
  5.  
  6. # load vars
  7. source "/etc/libvirt/hooks/kvm.conf"
  8.  
  9. # unload vfio pci
  10. modprobe -r vfio_iommu_type1
  11. modprobe -r vfio_pci
  12. modprobe -r vfio
  13.  
  14. # rebind GPU
  15. virsh nodedev-reattach $VIRSH_GPU_VIDEO
  16. virsh nodedev-reattach $VIRSH_GPU_AUDIO
  17.  
  18. # rebind VTConsoles
  19. echo 1 > /sys/class/vtconsole/vtcon0/bind
  20. echo 1 > /sys/class/vtconsole/vtcon1/bind
  21.  
  22. # revive nvidia
  23. nvidia-xconfig --query-gpu-info > /dev/null 2>&1
  24.  
  25. # bind EFI-framebuffer
  26. echo "efi-framebuffer.0" > /sys/bus/platform/drivers/efi-framebuffer/bind
  27.  
  28. # load nvidia
  29. modprobe nvidia_uvm
  30. modprobe nvidia_drm
  31. modprobe nvidia_modeset
  32. modprobe drm_kms_helper
  33. modprobe drm
  34. modprobe nvidia
  35.  
  36. systemctl start sddm.service
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement