Created
October 7, 2020 14:28
-
-
Save sifiro/604e6b02f7fbe1f2618b0a26dc5975b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Unload VFIO-PCI Kernel Driver | |
modprobe -r vfio-pci | |
# Re-Bind GPU to Nvidia Driver | |
echo -n "0000:09:00.0" > /sys/bus/pci/drivers/nvidia/bind | |
echo -n "0000:09:00.1" > /sys/bus/pci/drivers/snd_hda_intel/bind | |
echo 1 > /sys/bus/pci/rescan | |
# Wait 1 second to avoid possible race condition | |
sleep 1 | |
# Re-Bind EFI-Framebuffer | |
echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/bind | |
# Re-bind to virtual consoles | |
echo 1 > /sys/class/vtconsole/vtcon0/bind | |
echo 1 > /sys/class/vtconsole/vtcon1/bind | |
# Restart Display Manager | |
#startx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment