From 35df6bb1de1ec98c211811f625e7ec3d4ea8d271 Mon Sep 17 00:00:00 2001 From: Joe Knockenhauer Date: Mon, 29 Mar 2021 07:35:17 -0400 Subject: [PATCH] Create example revert file. --- example-revert.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 example-revert.sh diff --git a/example-revert.sh b/example-revert.sh new file mode 100644 index 0000000..43da011 --- /dev/null +++ b/example-revert.sh @@ -0,0 +1,23 @@ +#!/bin/bash +set -x + +# Re-Bind GPU to Nvidia Driver +virsh nodedev-reattach pci_0000_0c_00_1 +virsh nodedev-reattach pci_0000_0c_00_0 + +# Reload nvidia modules +modprobe nvidia +modprobe nvidia_modeset +modprobe nvidia_uvm +modprobe nvidia_drm + +# Rebind VT consoles +echo 1 > /sys/class/vtconsole/vtcon0/bind +# Some machines might have more than 1 virtual console. Add a line for each corresponding VTConsole +#echo 1 > /sys/class/vtconsole/vtcon1/bind + +nvidia-xconfig --query-gpu-info > /dev/null 2>&1 +echo "efi-framebuffer.0" > /sys/bus/platform/drivers/efi-framebuffer/bind + +# Restart Display Manager +systemctl start display-manager.service