Skip to content

Instantly share code, notes, and snippets.

@thejevans
Created April 23, 2018 00:27
Show Gist options
  • Save thejevans/935d6d0d7e0b0fde578ab307b865ebb1 to your computer and use it in GitHub Desktop.
Save thejevans/935d6d0d7e0b0fde578ab307b865ebb1 to your computer and use it in GitHub Desktop.
# Card has nvidia driver
lspci -nnk -d 10de:1c03
lspci -nnk -d 10de:10f1
modprobe vfio
modprobe vfio_pci
# VGA
echo '0000:01:00.0' > /sys/bus/pci/devices/0000:01:00.0/driver/unbind
echo '10de 1c03' > /sys/bus/pci/drivers/vfio-pci/new_id
echo '0000:01:00.0' > /sys/bus/pci/devices/0000:01:00.0/driver/bind
echo '10de 1c03' > /sys/bus/pci/drivers/vfio-pci/remove_id
# Audio
echo '0000:01:00.1' > /sys/bus/pci/devices/0000:01:00.1/driver/unbind
echo '10de 10f1' > /sys/bus/pci/drivers/vfio-pci/new_id
echo '0000:01:00.1' > /sys/bus/pci/devices/0000:01:00.1/driver/bind
echo '10de 10f1' > /sys/bus/pci/drivers/vfio-pci/remove_id
sleep 1
# Card has vfio driver
lspci -nnk -d 10de:1c03
lspci -nnk -d 10de:10f1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment