Advertisement
wprod

stop.sh

May 17th, 2025
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. #!/bin/bash
  2. set -x
  3.  
  4. # Re-Bind GPU to Nvidia Driver
  5. virsh nodedev-reattach pci_0000_01_00_1
  6. virsh nodedev-reattach pci_0000_01_00_0
  7.  
  8. # Reload nvidia modules
  9. modprobe nvidia
  10. modprobe nvidia_modeset
  11. modprobe nvidia_uvm
  12. modprobe nvidia_drm
  13.  
  14. # Rebind VT consoles
  15. echo 1 > /sys/class/vtconsole/vtcon0/bind
  16. # Some machines might have more than 1 virtual console. Add a line for each corresponding VTConsole
  17. echo 1 > /sys/class/vtconsole/vtcon1/bind
  18.  
  19. nvidia-xconfig --query-gpu-info > /dev/null 2>&1
  20. echo "efi-framebuffer.0" > /sys/bus/platform/drivers/efi-framebuffer/bind
  21.  
  22. # Restart Display Manager
  23. systemctl start gdm
  24.  
  25. # Start NVIDIA Undervolt
  26. systemctl start nvidia_config
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement