Advertisement
Querzion

revert.sh

Nov 14th, 2021 (edited)
835
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.16 KB | None | 0 0
  1. # Path >> /etc/libvirt/hooks/qemu.d/win10/release/end/revert.sh
  2. #!/bin/bash
  3. ### Debugging
  4. set -x
  5.  
  6. ### Load variables
  7. source "/etc/libvirt/hooks/kvm.conf"
  8.  
  9. ### unload vfio-pci
  10. modprobe -r vfio_pci
  11. modprobe -r vfio_iommu_type1
  12. modprobe -r vfio
  13.  
  14. ### Re-Bind GPU to Driver
  15. virsh nodedev-reattach $VIRSH_GPU_VIDEO
  16. virsh nodedev-reattach $VIRSH_GPU_AUDIO
  17.  
  18. ### Rebind VT consoles  -   ls /sys/class/vtconsole/
  19. echo 1 > /sys/class/vtconsole/vtcon0/bind
  20. ### Some machines might have more than 1 virtual console. Add a line for each corresponding VTConsole
  21. echo 0 > /sys/class/vtconsole/vtcon1/bind
  22.  
  23. ### Read nVidia x-config
  24. # nvidia-xconfig --query-gpu-info > /dev/null 2>&1
  25.  
  26. ### Bind EFI-framebuffer
  27. echo "efi-framebuffer.0" > /sys/bus/platform/drivers/efi-framebuffer/bind
  28.  
  29. ### Reload nvidia modules
  30. # modprobe nvidia_drm
  31. # modprobe nvidia_modeset
  32. # modprobe drm_kms_helper
  33. # modprobe nvidia
  34. # modprobe drm
  35. # modprobe nvidia_uvm
  36.  
  37. ### Reload AMD modules
  38. modprode amdgpu # Video Driver
  39. # modprode snd_hda_intel # Audio Driver
  40.  
  41. ### Restart Display Manager
  42. systemctl start sddm.service ### Manjaro / Arch / ArchTitus
  43. # systemctl start display-manager.service
  44.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement