revert.sh (679B)
1 #!/bin/bash 2 set -x 3 source "/etc/libvirt/hooks/kvm.conf" 4 5 modprobe -r vfio_pci 6 modprobe -r vfio_iommu_type1 7 modprobe -r vfio 8 9 virsh nodedev-reattach $VIRSH_GPU_VIDEO 10 virsh nodedev-reattach $VIRSH_GPU_AUDIO 11 12 echo 1 > /sys/class/vtconsole/vtcon0/bind 13 echo 0 > /sys/class/vtconsole/vtcon1/bind 14 15 nvidia-xconfig --query-gpu-info > /dev/null 2>&1 16 17 echo "efi-framebuffer.0" > /sys/bus/platform/drivers/efi-framebuffer/bind 18 19 modprobe nvidia_drm 20 modprobe nvidia_modeset 21 modprobe drm_kms_helper 22 modprobe nvidia 23 modprobe drm 24 modprobe nvidia_uvm 25 26 #systemctl start sddm.service 27 28 #echo 0000:00:14.0 > /sys/bus/pci/drivers/vfio-pci/unbind 29 #echo 0000:00:14.0 > /sys/bus/pci/drivers/xhci_hcd/bind