Last active
March 14, 2024 18:14
-
-
Save Berny23/2c9b04081a2be7846d800ed78ca2c43d to your computer and use it in GitHub Desktop.
KVM QEMU Single NVIDIA GPU Passthrough with Kubuntu Host and Windows 11 Guest (/etc/libvirt/hooks/qemu.d/<VM-NAME>/release/end/revert.sh)
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 | |
set -x | |
# Reload GPU kernel modules | |
modprobe nvidia | |
modprobe nvidia_modeset | |
modprobe nvidia_uvm | |
modprobe nvidia_drm | |
# Reload mainboard audio controller kernel modules | |
modprobe snd_hda_intel | |
# Rebind VT consoles | |
echo 1 > /sys/class/vtconsole/vtcon0/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment