Hi,
I needed to passthrough GPU Nvidia GeForce GTX 1660 Ti to VM to use it for Plex server hardware acceleration.
Took me a lot of time to find a working configuration so I want to share. May be will help someone
I used the following sources:
Plex on ProxMox Tutorial WITH nVidia Hardware Encoding
The Ultimate Beginner's Guide to GPU Passthrough
GPU Nvidia 1660 passthrough
103.conf
/etc/default/grub
/etc/modprobe.d/blacklist.conf
lspci -k
lspci -nns 08:00
/etc/modprobe.d/vfio.conf
On the VM (Ubuntu server 20.04)
/etc/modprobe.d/blacklist-nvidia-nouveau.conf
sudo update-initramfs -u
lspci -k
lspci -nns 01:00
I needed to passthrough GPU Nvidia GeForce GTX 1660 Ti to VM to use it for Plex server hardware acceleration.
Took me a lot of time to find a working configuration so I want to share. May be will help someone
I used the following sources:
Plex on ProxMox Tutorial WITH nVidia Hardware Encoding
The Ultimate Beginner's Guide to GPU Passthrough
GPU Nvidia 1660 passthrough
103.conf
Code:
bios: ovmf
boot: order=scsi0;ide2;net0
cores: 4
cpu: host,hidden=1,flags=+pcid
efidisk0: proxthin:vm-103-disk-1,efitype=4m,pre-enrolled-keys=1,size=4M
hostpci0: 0000:08:00,pcie=1,x-vga=1
ide2: local:iso/ubuntu-20.04.3-live-server-amd64.iso,media=cdrom
machine: q35
memory: 5024
name: plex
net0: virtio=96:4C:80:5C:68:D0,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
parent: drivers_downloaded
scsi0: proxthin:vm-103-disk-0,size=96G
scsihw: virtio-scsi-pci
smbios1: uuid=3f65ef9d-1434-4938-ba99-3e66103674f2
snaptime: 1634907300
sockets: 1
vga: virtio
vmgenid: 43467307-a9d1-4a06-9bcb-795afc011219
/etc/default/grub
Code:
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet amd_iommu=on iommu=pt video=vesafb:off video=efifb:off"
GRUB_CMDLINE_LINUX=""
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
Code:
update-grub
/etc/modprobe.d/blacklist.conf
Code:
blacklist nvidia
blacklist nouveau
blacklist radeon
blacklist i2c_nvidia_gpu
blacklist nvidiafb
lspci -k
Code:
08:00.0 VGA compatible controller: NVIDIA Corporation TU116 [GeForce GTX 1660 Ti] (rev a1)
Subsystem: PNY TU116 [GeForce GTX 1660 Ti]
Kernel driver in use: vfio-pci
Kernel modules: nvidiafb, nouveau
08:00.1 Audio device: NVIDIA Corporation TU116 High Definition Audio Controller (rev a1)
Subsystem: PNY TU116 High Definition Audio Controller
Kernel driver in use: vfio-pci
Kernel modules: snd_hda_intel
08:00.2 USB controller: NVIDIA Corporation TU116 USB 3.1 Host Controller (rev a1)
Subsystem: PNY TU116 USB 3.1 Host Controller
Kernel driver in use: vfio-pci
Kernel modules: xhci_pci
08:00.3 Serial bus controller [0c80]: NVIDIA Corporation TU116 USB Type-C UCSI Controller (rev a1)
Subsystem: PNY TU116 USB Type-C UCSI Controller
Kernel driver in use: vfio-pci
Kernel modules: i2c_nvidia_gpu
lspci -nns 08:00
Code:
08:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU116 [GeForce GTX 1660 Ti] [10de:2182] (rev a1)
08:00.1 Audio device [0403]: NVIDIA Corporation TU116 High Definition Audio Controller [10de:1aeb] (rev a1)
08:00.2 USB controller [0c03]: NVIDIA Corporation TU116 USB 3.1 Host Controller [10de:1aec] (rev a1)
08:00.3 Serial bus controller [0c80]: NVIDIA Corporation TU116 USB Type-C UCSI Controller [10de:1aed] (rev a1)
/etc/modprobe.d/vfio.conf
Code:
options vfio-pci ids=10de:2182,10de:1aeb,10de:1aec,10de:1aed disable_vga=1
On the VM (Ubuntu server 20.04)
/etc/modprobe.d/blacklist-nvidia-nouveau.conf
Code:
blacklist nouveau
options nouveau modeset=0
lspci -k
Code:
01:00.0 VGA compatible controller: NVIDIA Corporation TU116 [GeForce GTX 1660 Ti] (rev a1)
Subsystem: PNY TU116 [GeForce GTX 1660 Ti]
Kernel driver in use: nvidia
Kernel modules: nvidiafb, nouveau, nvidia_drm, nvidia
01:00.1 Audio device: NVIDIA Corporation TU116 High Definition Audio Controller (rev a1)
Subsystem: PNY TU116 High Definition Audio Controller
Kernel driver in use: snd_hda_intel
Kernel modules: snd_hda_intel
01:00.2 USB controller: NVIDIA Corporation TU116 USB 3.1 Host Controller (rev a1)
Subsystem: PNY Device 1313
Kernel driver in use: xhci_hcd
01:00.3 Serial bus controller [0c80]: NVIDIA Corporation TU116 [GeForce GTX 1650 SUPER] (rev a1)
Subsystem: PNY TU116 [GeForce GTX 1650 SUPER]
Kernel driver in use: nvidia-gpu
Kernel modules: i2c_nvidia_gpu
lspci -nns 01:00
Code:
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU116 [GeForce GTX 1660 Ti] [10de:2182] (rev a1)
01:00.1 Audio device [0403]: NVIDIA Corporation TU116 High Definition Audio Controller [10de:1aeb] (rev a1)
01:00.2 USB controller [0c03]: NVIDIA Corporation TU116 USB 3.1 Host Controller [10de:1aec] (rev a1)
01:00.3 Serial bus controller [0c80]: NVIDIA Corporation TU116 [GeForce GTX 1650 SUPER] [10de:1aed] (rev a1)
Last edited: