Advertisement
wprod

start.sh

May 17th, 2025
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. #!/bin/bash
  2. set -x
  3.  
  4. # Stop display manager
  5. systemctl stop gdm
  6. systemctl isolate multi-user.target
  7. #killall gdm-x-session
  8. # systemctl --user -M YOUR_USERNAME@ stop plasma*
  9.  
  10. # Unbind VTconsoles: might not be needed
  11. echo 0 > /sys/class/vtconsole/vtcon0/bind
  12. echo 0 > /sys/class/vtconsole/vtcon1/bind
  13.  
  14. # Unbind EFI Framebuffer
  15. echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind
  16. sleep 2
  17.  
  18. # Unload NVIDIA kernel modules
  19. modprobe -r nvidia_drm nvidia_modeset nvidia_uvm nvidia
  20.  
  21. # Unload AMD kernel module
  22. # modprobe -r amdgpu
  23. sleep 2
  24. # Detach GPU devices from bhost
  25. # Use your GPU and HDMI Audio PCI host device
  26. virsh nodedev-detach pci_0000_01_00_0
  27. virsh nodedev-detach pci_0000_01_00_1
  28.  
  29. # Load vfio module
  30. modprobe vfio-pci
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement