blob: 10dc07a2223f803b1bc81ac19103f9286c667eb3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#!/bin/bash
# for debugging
set -x
# stop sddm
systemctl stop sddm.service
# unbind vt console
echo 0 > /sys/class/vtconsole/vtcon0/bind
echo 0 > /sys/class/vtconsole/vtcon1/bind
# avoid race condition
sleep 10
# unload gpu modules
modprobe -r amdgpu
modprobe -r gpu_sched
modprobe -r ttm
modprobe -r drm_kms_helper
modprobe -r drm_ttm_helper
modprobe -r i2c_algo_bit
modprobe -r drm
# unbind gpu
virsh nodedev-detach pci_0000_06_00_0
virsh nodedev-detach pci_0000_06_00_1
# load vfio modules
modprobe vfio
modprobe vfio-pci
modprobe vfio_iommu_type1
|