update the hardcode comment and add more info about disabling video output
This commit is contained in:
parent
3649856676
commit
e8d7b810af
1 changed files with 9 additions and 3 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue