Advertisement
selharim

vfio start script

Oct 28th, 2023
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. #!/bin/bash
  2. # Helpful to read output when debugging
  3. set -x
  4.  
  5. # Stop display manager
  6. systemctl stop sddm.service
  7.  
  8. # Unbind VTconsoles
  9. echo 0 > /sys/class/vtconsole/vtcon0/bind
  10. echo 0 > /sys/class/vtconsole/vtcon1/bind
  11.  
  12. # Unbind EFI-Framebuffer
  13. echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind
  14.  
  15. # Avoid a Race condition by waiting 2 seconds. This can be calibrated to be shorter or longer if required for your system
  16. sleep 8
  17.  
  18. # Unbind the GPU and audio from display driver
  19. virsh nodedev-detach pci_0000_03_00_0
  20. virsh nodedev-detach pci_0000_03_00_1
  21.  
  22. # Load VFIO Kernel Module
  23. modprobe vfio-pci
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement