Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #Output debugging
- set -x
- #Load variables
- source "/etc/libvirt/hooks/kvm.conf"
- #Stop display manager
- #systemctl stop display-manager systemctl --user -M Dylon@ stop 'plasma\*'
- #systemctl stop sddm.service
- sudo systemctl stop sddm
- systemctl status display-manager.service
- #Unbind VTconsoles
- echo 0 > /sys/class/vtconsole/vtcon0/bind
- echo 0 > /sys/class/vtconsole/vtcon1/bind
- #framebuffer
- echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind
- #GPUs
- sleep 5
- echo "0000:03:00.0" | sudo tee /sys/bus/pci/devices/0000:03:00.0/driver/unbind
- sleep 5
- modprobe -r amdgpu
- modprobe -r snd_hda_intel
- virsh nodedev-detach $VIRSH_GPU_VIDEO
- virsh nodedev-detach $VIRSH_GPU_AUDIO
- virsh nodedev-detach $VIRSH_GPU_VGA
- virsh nodedev-detach $VIRSH_GPU_AUDIO2
- sleep 5
- modprobe vfio
- modprobe vfio-pci
- modprobe vfio_iommu_type1
Advertisement
Add Comment
Please, Sign In to add comment