summaryrefslogtreecommitdiff
path: root/.local/share/libvirt-hooks/qemu.d/win11/release/end
diff options
context:
space:
mode:
authorSeth Flynn <[email protected]>2021-11-24 02:02:25 -0500
committerseth <[email protected]>2022-08-04 04:40:17 -0400
commit944b6db89ae715d93d0804a6a2358dcab88f1c07 (patch)
tree5244d9f5ddf4f8a661e17c184fbadf2e553dbd43 /.local/share/libvirt-hooks/qemu.d/win11/release/end
initial bare repo commit
Diffstat (limited to '.local/share/libvirt-hooks/qemu.d/win11/release/end')
-rwxr-xr-x.local/share/libvirt-hooks/qemu.d/win11/release/end/revert.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/.local/share/libvirt-hooks/qemu.d/win11/release/end/revert.sh b/.local/share/libvirt-hooks/qemu.d/win11/release/end/revert.sh
new file mode 100755
index 0000000..502ed39
--- /dev/null
+++ b/.local/share/libvirt-hooks/qemu.d/win11/release/end/revert.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+# debug
+set -x
+
+# unload vfio modules
+modprobe -r vfio_pci
+modprobe -r vfio_iommu_type1
+modprobe -r vfio
+
+# rebind vt console
+echo 1 > /sys/class/vtconsole/vtcon0/bind
+echo 1 > /sys/class/vtconsole/vtcon1/bind
+
+# rebind gpu
+virsh nodedev-reattach pci_0000_06_00_1
+virsh nodedev-reattach pci_0000_06_00_0
+
+# reload gpu modules
+modprobe amdgpu
+modprobe gpu_sched
+modprobe ttm
+modprobe drm_kms_helper
+modprobe drm_ttm_helper
+modprobe i2c_algo_bit
+modprobe drm
+
+# restart sddm
+systemctl start sddm.service