mirror of
https://gitlab.com/risingprismtv/single-gpu-passthrough.git
synced 2024-08-30 18:12:14 +00:00
24 lines
483 B
Bash
Executable File
24 lines
483 B
Bash
Executable File
#!/bin/bash
|
|
set -x
|
|
|
|
# Unload VFIO-PCI Kernel Driver
|
|
modprobe -r vfio-pci
|
|
modprobe -r vfio_iommu_type1
|
|
modprobe -r vfio
|
|
|
|
# Re-Bind GPU to AMD Driver
|
|
virsh nodedev-reattach pci_0000_01_00_1
|
|
virsh nodedev-reattach pci_0000_01_00_0
|
|
|
|
# Rebind VT consoles
|
|
echo 1 > /sys/class/vtconsole/vtcon0/bind
|
|
|
|
# Re-Bind EFI-Framebuffer
|
|
echo "efi-framebuffer.0" > /sys/bus/platform/drivers/efi-framebuffer/bind
|
|
|
|
#Load amd driver
|
|
modprobe amdgpu
|
|
|
|
# Restart Display Manager
|
|
systemctl start sddm.service
|