Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Helpful to read output when debugging
- set -x
- # Stop display manager
- systemctl stop display-manager.service
- ## Uncomment the following line if you use GDM
- #killall gdm-x-session
- sudo rmmod nvidia_uvm
- sudo rmmod nvidia_drm
- sudo rmmod nvidia_modeset
- sudo rmmod nvidia
- # Unbind VTconsoles
- echo 0 > /sys/class/vtconsole/vtcon0/bind
- # Unbind EFI-Framebuffer
- echo "efi-framebuffer.0" > /sys/bus/platform/drivers/efi-framebuffer/unbind
- # Avoid a Race condition by waiting 2 seconds. This can be calibrated to be shorter or longer if required for your system
- sleep 5
- # Unbind the GPU from display driver
- virsh nodedev-detach pci_0000_1c_00_0
- virsh nodedev-detach pci_0000_1c_00_1
- # Load VFIO Kernel Module
- modprobe vfio-pci
Advertisement
Add Comment
Please, Sign In to add comment