Reattach PCI devices before swaping drivers

Tested with AMD GPU
pull/15/head
Carlos 2 years ago committed by GitHub
parent 4aa007f648
commit c86f8577fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -266,14 +266,17 @@ modprobe vfio-pci
#!/bin/bash #!/bin/bash
set -x set -x
# Unload vfio module
modprobe -r vfio-pci
# Attach GPU devices to host # Attach GPU devices to host
# Use your GPU and HDMI Audio PCI host device # Use your GPU and HDMI Audio PCI host device
virsh nodedev-reattach pci_0000_01_00_0 virsh nodedev-reattach pci_0000_01_00_0
virsh nodedev-reattach pci_0000_01_00_1 virsh nodedev-reattach pci_0000_01_00_1
# Unload vfio module
modprobe -r vfio-pci
# Load AMD kernel module
#modprobe amdgpu
# Rebind framebuffer to host # Rebind framebuffer to host
echo "efi-framebuffer.0" > /sys/bus/platform/drivers/efi-framebuffer/bind echo "efi-framebuffer.0" > /sys/bus/platform/drivers/efi-framebuffer/bind
@ -283,9 +286,6 @@ modprobe nvidia_modeset
modprobe nvidia_uvm modprobe nvidia_uvm
modprobe nvidia modprobe nvidia
# Load AMD kernel module
# modprobe amdgpu
# Bind VTconsoles: might not be needed # Bind VTconsoles: might not be needed
echo 1 > /sys/class/vtconsole/vtcon0/bind echo 1 > /sys/class/vtconsole/vtcon0/bind
echo 1 > /sys/class/vtconsole/vtcon1/bind echo 1 > /sys/class/vtconsole/vtcon1/bind
@ -293,7 +293,7 @@ echo 1 > /sys/class/vtconsole/vtcon1/bind
# Restart Display Manager # Restart Display Manager
systemctl start display-manager systemctl start display-manager
# rc-service xdm start # rc-service xdm start
``` ```
</td> </td>
</tr> </tr>

Loading…
Cancel
Save