You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
528 B

modprobe vfio-pci
for dev in "$@"; do
vendor=$(cat /sys/bus/pci/devices/$dev/vendor)
device=$(cat /sys/bus/pci/devices/$dev/device)
echo $vendor $device > /sys/bus/pci/drivers/vfio-pci/new_id
if [ -e /sys/bus/pci/devices/$dev/driver ]; then
rmmod nvidia_drm
rmmod nvidia_modeset
rmmod nvidia
echo $dev > /sys/bus/pci/devices/$dev/driver/unbind
echo "Unbound old driver"
echo $vendor $device > /sys/bus/pci/drivers/vfio-pci/new_id
echo "Bound VFIO driver"

Proudly self-hosted by Cole Deck. Fast loading powered by Turbo.