Adding a Quadro P620 to my Plex VM

I currently run Plex in a CentOS 7 VM (on top of vSphere 6.7) with two 2vCPUs and 2GB of vRAM.

When I needed to transcode video to sync it to a mobile device for a trip the process takes a while and consumes a lot of CPU on the VM. I could just add more vCPUs to the VM but I have a limit on how much CPU I have to toss around and there are more efficient ways to transcode video.

I bought my Dell T340 specifically with a Xeon E-2176G CPU in it so I could take advantage of the on-board GPU to handle my transcoding work. After a bunch of back and forth with VMware, Dell and Intel it turns out that Dell did not build the T340 in a way that it can actually use the on-board GPU on my CPU. Why they offer it as a choice, I don’t know but here we are.

My next option was to purchase a video card to do the work. I did some research and came up with the Quadro P620 (specifically the PYN version) being the most affordable with the features I wanted, specifically NVENC. Added bonus, it supports HEVC (H.265) which should future-proof me for a while and allow me to eventually take advantage of this card for transcoding my Blurays to H.265, but that’s another post.

The card arrived, I installed it, enabled it for passthruough in vSphere, attached it to my Plex VM and booted it up.

I downloaded the latest nVidia driver to my VM and ran the installer (as root):

[root@localhost ~]# chmod a+x NVIDIA-Linux-x86_64-430.50.run
[root@localhost ~]# ./NVIDIA-Linux-x86_64-430.50.run

The installation was straight forward, it in fact took care of everything I needed. It automatically blacklisted the default video device for me, asked me to reboot and re-run the installer, which I did and everything almost worked.

After the drive was successfully installed I ran the nvidia tool provided with the drivers to verify things and was greeted with:

[root@localhost ~]# nvidia-smi

Unable to determine the device handle for GPU 0000:03:00.0: Unknown Error

Fortunately this issue is well documented on the internet and the quick fix was to shut down the VM and make a tweak to it’s configuration. Since I have vCenter I used the GUI to solve this problem instead of downloading the VMX file, editing it and re-uploading the VMX file for the VM:

  1. Login to vCenter
  2. Right click and choose ‘Edit Settings’ on the VM
  3. Go to ‘VM Options’ and expand ‘Advanced’
  4. Click ‘Edit Configuration’
  5. Click ‘Add Configuration Params’
  6. Enter the following without quotes:
    Name: “hypervisor.cpuid.v0”
    Value: “FALSE”
  7. Click ‘Ok’
  8. Click ‘Ok’
  9. Boot up the VM

Once the VM came back up I got the output I was expecting from nvidia-smi

[root@localhost ~]# nvidia-smi

Thu Oct 24 18:36:20 2019
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 430.50       Driver Version: 430.50       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Quadro P620         Off  | 00000000:13:00.0 Off |                  N/A |
| 40%   54C    P0    N/A /  N/A |     10MiB /  2000MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

The last thing to do before testing was to make sure Plex was configured to use hardware transcoding:

  1. Login to your Plex’s WebUI
  2. Under ‘Settings’ click ‘Transcoder’
  3. Checkmark ‘Use hardware acceleration when avalible’
  4. Click ‘Save Changes’

I then gave things a quick test by trying to sync a TV show to my iPhone and then re-ran nvidia-smi:

[root@localhost ~]# nvidia-smi

Thu Oct 24 18:38:59 2019
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 430.50       Driver Version: 430.50       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Quadro P620         Off  | 00000000:13:00.0 Off |                  N/A |
| 41%   57C    P0    N/A /  N/A |    177MiB /  2000MiB |     20%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0     22510      C   /usr/lib/plexmediaserver/Plex Transcoder     167MiB |
+-----------------------------------------------------------------------------+

Bingo, that was it. Now. How much faster was the Quadro P620 over my Xeon E-2176G, roughly 4.5x faster.

My Plex transcoding settings are:

  • Transcoder quality: Prefer higher quality encoding
  • Background transcoding x264 preset: Medium
  • Maximum simultaneous video transcode: 4

But wait you might say, why set “Maximum simultaneous video transcode” to “4”? A Quadro P620 can only do 2?

This is why, only took a few seconds as root:

# git clone https://github.com/keylase/nvidia-patch.git
# cd nvidia-patch/
# bash patch.sh

 

 

7 thoughts on “Adding a Quadro P620 to my Plex VM”

  1. Hi Eric, thank you for your post. Just as I discovered my new T340 hasn’t arrived and I have discovered that the embedded Graphics card of the E-2278G is also going to not work according to your post and the manual.

    Your post sounds like you have the P620 working nicely.

    Having read a few forums on Dell which seem to suggest that there is a 25Watt limit imposed by Dell. Can you confirm that you never had an issue with yours?

    My config includes a 495W PSU, and PERC 730P PCIe Full Height + Broadcom 5719 Quad Port PCI Full Height. Do you think I would run into issues with the power limit?

    Thank you for your contribution.

    Reply
    • I am not sure about a wattage limit. I think you’re just limited by the wattage of the PSU and the PCIe slots. The T340 does not have extra power cables for video cards that require PCIe 6/8 pin power cables.

      According to the specs the P620 maxes out at 40W. I don’t think I’ve ever run mine at 100% load but I’ve had zero issues with it for my current use case which is transcoding videos in my Plex VM.

      My T340 has a PERC 730P, a Quad Broadcom Gigabit Ethernet card, the Quadro P620, at one point ran 8x3TB SATA disks plus a internal SSD, a USB Bluray Drive and some additional fans with out issue (more details on my other T340 related posts https://www.pickysysadmin.ca/category/hardware/dell/).

      I don’t think you’ll run into issues but I didn’t design it either.

      Reply
  2. Hi there,

    Thanks for spelling everything out this – I too ordered a T340 hoping to use the iGPU before realsing it wasn’t supported. Instead I went with a P620 as well.

    Did you run into any IOMMU issues when passing through the device? My H730P RAID controller also appears in the same group, casuing my hypervisor (Proxmox) to crash.

    Any tips or advice you might have would be greatly appreciated.

    Reply
      • Think I got it sorted. Adding “pcie_acs_override=downstream” to kernel commandline was enough to separate them into their own groups. It doesn’t seem like the most elegant solution out there (with a fair number of critics) but I’m happy if it works. My VM now shows GPU as expected.

        This post has been incredibly valuable – without it I would have spent too much on a processor with features I couldn’t use. Thanks so much for your help!

        Reply
  3. Just a quick thanks, this method worked for my new Dell T150 ESXi Ubuntu Plex build. I ended up needing to use the 510 nvidia drivers, and the keylase patch isn’t quite current *yet.*

    Reply

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.