diff --git a/lib/set_MODULES.sh b/lib/set_MODULES.sh index f58ddc4..279eb0b 100755 --- a/lib/set_MODULES.sh +++ b/lib/set_MODULES.sh @@ -55,25 +55,31 @@ function set_MODULES () { CMDLINE=$(cat "$SCRIPTDIR/config/kernel_args") # Ask if we shall disable video output on this card + echo "Disabling video output in Linux for the card you want to use in a VM +will make it easier to successfully do the passthrough without issues." read -p "Do you want to force disable video output in linux on this card? [Y/n]: " DISABLE_VGA case "${DISABLE_VGA}" in [Yy]*) # Update kernel_args file echo "${CMDLINE} vfio_pci.ids=${GPU_DEVID} vfio_pci.disable_vga=1" > "$SCRIPTDIR/config/kernel_args" + + # Update GPU_DEVID + GPU_DEVID="$GPU_DEVID disable_vga=1" ;; [Nn]*) echo "" ;; *) - GPU_DEVID="${GPU_DEVID} disable_vga=1" - # Update kernel_args file echo "${CMDLINE} vfio_pci.ids=${GPU_DEVID} vfio_pci.disable_vga=1" > "$SCRIPTDIR/config/kernel_args" + + # Update GPU_DEVID + GPU_DEVID="$GPU_DEVID disable_vga=1" ;; esac # Write the vfio modprobe config - printf "# This is an autogenerated file that stubs your graphic card for use with vfio + printf "## This is an autogenerated file that stubs your graphic card for use with vfio ## This file should be placed inside /etc/modprobe.d/ # Uncomment the line below to \"hardcode\" your graphic card to be bound to the vfio-pci driver. # In most cases this should not be neccessary, it will also prevent you from turning off vfio in the bootloader.