2020-04-25 04:32:07 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# Helpful to read output when debugging
|
|
|
|
set -x
|
|
|
|
|
2020-05-20 18:12:40 +00:00
|
|
|
# Stop display manager (KDE specific)
|
2020-04-25 04:32:07 +00:00
|
|
|
systemctl stop sddm.service
|
|
|
|
|
|
|
|
# Unbind VTconsoles
|
|
|
|
echo 0 > /sys/class/vtconsole/vtcon0/bind
|
|
|
|
|
|
|
|
# Unbind EFI-Framebuffer
|
2020-05-20 18:12:40 +00:00
|
|
|
echo efi-framebuffer.0 > /sys/bus/platform/drivers/efi-framebuffer/unbind
|
2020-04-25 04:32:07 +00:00
|
|
|
|
|
|
|
sleep 5
|
|
|
|
|
|
|
|
# Unload AMD drivers
|
|
|
|
modprobe -r amdgpu
|
|
|
|
|
|
|
|
# Unbind the GPU from display driver
|
|
|
|
virsh nodedev-detach pci_0000_01_00_0
|
|
|
|
virsh nodedev-detach pci_0000_01_00_1
|
|
|
|
|
|
|
|
# Load VFIO kernel module
|
|
|
|
modprobe vfio-pci
|