From e8d7b810af55b920fe33b857ac015d818c3c88e6 Mon Sep 17 00:00:00 2001 From: HikariKnight <2557889+HikariKnight@users.noreply.github.com> Date: Thu, 10 Mar 2022 20:02:07 +0100 Subject: [PATCH] update the hardcode comment and add more info about disabling video output --- lib/set_MODULES.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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.