Begin add gpuPassgrouth conf
This commit is contained in:
parent
f7ad61e5a0
commit
c117a43b27
12 changed files with 402 additions and 0 deletions
35
modules/gpuPassthrough/scripts/stop.sh
Normal file
35
modules/gpuPassthrough/scripts/stop.sh
Normal file
|
@ -0,0 +1,35 @@
|
|||
#!/bin/bash
|
||||
set -x
|
||||
|
||||
# Load variables
|
||||
source "/etc/libvirt/hooks/kvm.conf"
|
||||
|
||||
# Unload VFIO-PCI Kernel Driver
|
||||
modprobe -r vfio-pci
|
||||
modprobe -r vfio_iommu_type1
|
||||
modprobe -r vfio
|
||||
|
||||
# Re-Bind GPU to Nvidia Driver
|
||||
virsh nodedev-reattach $VIRSH_GPU_VIDEO
|
||||
virsh nodedev-reattach $VIRSH_GPU_AUDIO
|
||||
virsh nodedev-reattach $VIRSH_USB
|
||||
virsh nodedev-reattach $VIRSH_SERIAL_BUS
|
||||
|
||||
# Rebind VT consoles
|
||||
echo 1 > /sys/class/vtconsole/vtcon0/bind
|
||||
echo 1 > /sys/class/vtconsole/vtcon1/bind
|
||||
|
||||
# Bind EFI-Framebuffer
|
||||
nvidia-xconfig --query-gpu-info > /dev/null 2>&1
|
||||
echo "efi-framebuffer.0" > /sys/bus/platform/drivers/efi-framebuffer/bind
|
||||
|
||||
# Load all Nvidia drivers
|
||||
modprobe nvidia_drm
|
||||
modprobe nvidia_modeset
|
||||
modprobe drm_kms_helper
|
||||
modprobe drm
|
||||
modprobe nvidia_uvm
|
||||
modprobe nvidia
|
||||
|
||||
# Restart Display Manager
|
||||
systemctl start gdm.service
|
Loading…
Add table
Add a link
Reference in a new issue