Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # enable debugging
- set -x
- # load vars
- source "/etc/libvirt/hooks/kvm.conf"
- # unload vfio pci
- modprobe -r vfio_iommu_type1
- modprobe -r vfio_pci
- modprobe -r vfio
- # rebind GPU
- virsh nodedev-reattach $VIRSH_GPU_VIDEO
- virsh nodedev-reattach $VIRSH_GPU_AUDIO
- # rebind VTConsoles
- echo 1 > /sys/class/vtconsole/vtcon0/bind
- echo 1 > /sys/class/vtconsole/vtcon1/bind
- # revive nvidia
- nvidia-xconfig --query-gpu-info > /dev/null 2>&1
- # bind EFI-framebuffer
- echo "efi-framebuffer.0" > /sys/bus/platform/drivers/efi-framebuffer/bind
- # load nvidia
- modprobe nvidia_uvm
- modprobe nvidia_drm
- modprobe nvidia_modeset
- modprobe drm_kms_helper
- modprobe drm
- modprobe nvidia
- systemctl start sddm.service
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement