Hardware for Transcoding Undetected

Server Version#:plexmediaserver_1.29.1.6316-f4cdfea9c_amd64.deb
After doing the most recent update, I see this in the console.

PlexMediaServer install:  Nvidia GPU card:  Not Found

I have a P2000 installed and the drivers too on Ubuntu Server 22. I do recall at one point seeing a stream to an off-premise device showing (hw) in the console.

How can I make sure Plex is properly detecting the card?

If the installation script is not seeing an i915 then I presume you have an AMD CPU?

If you do not have /sys/module/nvidia/drivers/pci:nvidia/*:*:*:* then the card is not being seen by the kernel.

@ChuckPa this is what I have:

# ll /sys/module/nvidiafb/drivers
total 0
drwxr-xr-x 2 root root 0 Oct 21 15:28 ./
drwxr-xr-x 6 root root 0 Oct 21 15:28 ../
lrwxrwxrwx 1 root root 0 Oct 21 15:28 pci:nvidiafb -> ../../../bus/pci/drivers/nvidiafb/

also this is the CPU info:

# lscpu
Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         46 bits physical, 48 bits virtual
  Byte Order:            Little Endian
CPU(s):                  48
  On-line CPU(s) list:   0-47
Vendor ID:               GenuineIntel
  Model name:            Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz
    CPU family:          6
    Model:               63
    Thread(s) per core:  2
    Core(s) per socket:  12
    Socket(s):           2
    Stepping:            2
    CPU max MHz:         3300.0000
    CPU min MHz:         1200.0000
    BogoMIPS:            4988.95
    Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtsc
                         p lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2
                          ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm cpuid_fault e
                         pb invpcid_single pti intel_ppin ssbd ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms 
                         invpcid cqm xsaveopt cqm_llc cqm_occup_llc dtherm ida arat pln pts md_clear flush_l1d
Virtualization features: 
  Virtualization:        VT-x
Caches (sum of all):     
  L1d:                   768 KiB (24 instances)
  L1i:                   768 KiB (24 instances)
  L2:                    6 MiB (24 instances)
  L3:                    60 MiB (2 instances)
NUMA:                    
  NUMA node(s):          2
  NUMA node0 CPU(s):     0-11,24-35
  NUMA node1 CPU(s):     12-23,36-47
Vulnerabilities:         
  Itlb multihit:         KVM: Mitigation: VMX disabled
  L1tf:                  Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable
  Mds:                   Mitigation; Clear CPU buffers; SMT vulnerable
  Meltdown:              Mitigation; PTI
  Mmio stale data:       Mitigation; Clear CPU buffers; SMT vulnerable
  Retbleed:              Not affected
  Spec store bypass:     Mitigation; Speculative Store Bypass disabled via prctl and seccomp
  Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer sanitization
  Spectre v2:            Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIBP conditional, RSB filling
  Srbds:                 Not affected
  Tsx async abort:       Not affected

also

# lspci -nnk | grep -iA2 vga 
05:00.0 VGA compatible controller [0300]: NVIDIA Corporation GP106GL [Quadro P2000] [10de:1c30] (rev a1)
	Subsystem: Dell GP106GL [Quadro P2000] [1028:11b3]
	Kernel modules: nvidiafb, nouveau
--
0b:00.0 VGA compatible controller [0300]: ASPEED Technology, Inc. ASPEED Graphics Family [1a03:2000] (rev 30)
	Subsystem: ASUSTeK Computer Inc. ASPEED Graphics Family [1043:85f9]
	Kernel driver in use: ast

Is that what you’re after?

I’m looking for this:

[chuck@glockner ~.2001]$ ls -la /sys/module/nvidia/drivers/pci:nvidia
lrwxrwxrwx 1 root root 0 Oct 21 20:32 /sys/module/nvidia/drivers/pci:nvidia -> ../../../bus/pci/drivers/nvidia/
[chuck@glockner ~.2002]$

which further resolves to:

[chuck@glockner ~.2006]$ ls -la /sys/module/nvidia/drivers/pci:nvidia/
total 0
drwxr-xr-x  2 root root    0 Oct 21 18:12 ./
drwxr-xr-x 34 root root    0 Oct 21 18:12 ../
lrwxrwxrwx  1 root root    0 Oct 21 20:34 0000:07:00.0 -> ../../../../devices/pci0000:00/0000:00:03.0/0000:07:00.0/
--w-------  1 root root 4096 Oct 21 20:34 bind
lrwxrwxrwx  1 root root    0 Oct 21 20:34 module -> ../../../../module/nvidia/
--w-------  1 root root 4096 Oct 21 20:34 new_id
--w-------  1 root root 4096 Oct 21 20:34 remove_id
--w-------  1 root root 4096 Oct 21 18:12 uevent
--w-------  1 root root 4096 Oct 21 20:34 unbind
[chuck@glockner ~.2007]$ 

Notice you can see the PCI slot addrees

You are showing nvidiafb which is only a display FrameBuffer surface. It’s not a rendering GPU node.

Which Nvidia drivers are you using?

I am using 510.85.02

[chuck@glockner ~.2008]$ nvidia-smi
Fri Oct 21 20:37:17 2022       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 510.85.02    Driver Version: 510.85.02    CUDA Version: 11.6     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Quadro P2200        On   | 00000000:07:00.0 Off |                  N/A |
| 48%   38C    P8     4W /  75W |      1MiB /  5120MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+
[chuck@glockner ~.2009]$

Also please notice now nvidia-smi shows you the PCI address 00000000:07:00.0

I was unsure which ones to install so I went to Nvidia’s site and downloaded the drivers from there. Which package did you use on Ubuntu?

The complete list of Nvidia packages I have installed is:

[chuck@glockner ~.2001]$ dpkg -l | grep nvidia | grep 510
ii  libnvidia-cfg1-510-server:amd64       510.85.02-0ubuntu0.20.04.1        amd64        NVIDIA binary OpenGL/GLX configuration library
ii  libnvidia-common-510-server           510.85.02-0ubuntu0.20.04.1        all          Shared files used by the NVIDIA libraries
ii  libnvidia-compute-510-server:amd64    510.85.02-0ubuntu0.20.04.1        amd64        NVIDIA libcompute package
ii  libnvidia-decode-510-server:amd64     510.85.02-0ubuntu0.20.04.1        amd64        NVIDIA Video Decoding runtime libraries
ii  libnvidia-encode-510-server:amd64     510.85.02-0ubuntu0.20.04.1        amd64        NVENC Video Encoding runtime library
ii  libnvidia-extra-510-server:amd64      510.85.02-0ubuntu0.20.04.1        amd64        Extra libraries for the NVIDIA Server Driver
ii  libnvidia-fbc1-510-server:amd64       510.85.02-0ubuntu0.20.04.1        amd64        NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-gl-510-server:amd64         510.85.02-0ubuntu0.20.04.1        amd64        NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  nvidia-compute-utils-510-server       510.85.02-0ubuntu0.20.04.1        amd64        NVIDIA compute utilities
ii  nvidia-dkms-510-server                510.85.02-0ubuntu0.20.04.1        amd64        NVIDIA DKMS package
ii  nvidia-driver-510-server              510.85.02-0ubuntu0.20.04.1        amd64        NVIDIA Server Driver metapackage
ii  nvidia-kernel-common-510-server       510.85.02-0ubuntu0.20.04.1        amd64        Shared files used with the kernel module
ii  nvidia-kernel-source-510-server       510.85.02-0ubuntu0.20.04.1        amd64        NVIDIA kernel source package
ii  nvidia-utils-510-server               510.85.02-0ubuntu0.20.04.1        amd64        NVIDIA Server Driver support binaries
ii  xserver-xorg-video-nvidia-510-server  510.85.02-0ubuntu0.20.04.1        amd64        NVIDIA binary Xorg driver
[chuck@glockner ~.2002]$

If I remember correctly, nvidia-driver-510-server and apt pulled in the rest.
For this machine, xorg isn’t needed; it’s a headless server.

nvidia-driver-510-server seems to have been the correct package name. It installed and the server rebooted.

# ll /sys/module/nvidia/drivers/pci:nvidia/
total 0
drwxr-xr-x  2 root root    0 Oct 22 14:23 ./
drwxr-xr-x 37 root root    0 Oct 22 14:23 ../
lrwxrwxrwx  1 root root    0 Oct 22 14:24 0000:05:00.0 -> ../../../../devices/pci0000:00/0000:00:03.0/0000:05:00.0/
--w-------  1 root root 4096 Oct 22 14:37 bind
lrwxrwxrwx  1 root root    0 Oct 22 14:37 module -> ../../../../module/nvidia/
--w-------  1 root root 4096 Oct 22 14:37 new_id
--w-------  1 root root 4096 Oct 22 14:37 remove_id
--w-------  1 root root 4096 Oct 22 14:23 uevent
--w-------  1 root root 4096 Oct 22 14:37 unbind

Seems I may still have some issues though.

# nvidia-smi
Failed to initialize NVML: Driver/library version mismatch

Not sure how to fix this mess.

Since I don’t have an update to install, what’s the next best way to see if Plex “sees” it?

Very carefully look through all your installed nvidia package versions (dpkg -l | grep nvidia).
They all must match exactly.

The error shown here occurs when nvidia-smi is expecting a different version than the kernel driver has.

If you’ve also installed the DKMS packages, rebuild the initrd ramdisk and restart

@ChuckPa it took a while but I was finally able to find everything installed by apt, dpkg, .run file and even looked in ldconfig to make sure it was all clean of anything nvidia. Just did a clean install of nvidia-driver-510-server

Does this look normal now?

Sun Oct 23 18:21:07 2022       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 510.85.02    Driver Version: 510.85.02    CUDA Version: 11.7     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Quadro P2000        Off  | 00000000:05:00.0 Off |                  N/A |
| 53%   47C    P8     5W /  75W |      6MiB /  5120MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      2640      G   /usr/lib/xorg/Xorg                  4MiB |
+-----------------------------------------------------------------------------+
lsmod | grep nvidia
nvidia_uvm           1216512  0
nvidia_drm             69632  2
nvidia_modeset       1150976  3 nvidia_drm
nvidia              39137280  81 nvidia_uvm,nvidia_modeset
drm_kms_helper        311296  5 drm_vram_helper,ast,nvidia_drm
drm                   622592  11 drm_kms_helper,drm_vram_helper,ast,nvidia,drm_ttm_helper,nvidia_drm,ttm
ls -la /sys/module/nvidia/drivers/pci:nvidia
lrwxrwxrwx 1 root root 0 Oct 23 18:24 /sys/module/nvidia/drivers/pci:nvidia -> ../../../bus/pci/drivers/nvidia
ls -la /sys/module/nvidia/drivers/pci:nvidia/
total 0
drwxr-xr-x  2 root root    0 Oct 22 15:55 .
drwxr-xr-x 36 root root    0 Oct 22 15:55 ..
lrwxrwxrwx  1 root root    0 Oct 22 15:55 0000:05:00.0 -> ../../../../devices/pci0000:00/0000:00:03.0/0000:05:00.0
--w-------  1 root root 4096 Oct 23 18:26 bind
lrwxrwxrwx  1 root root    0 Oct 23 18:26 module -> ../../../../module/nvidia
--w-------  1 root root 4096 Oct 23 18:26 new_id
--w-------  1 root root 4096 Oct 23 18:26 remove_id
--w-------  1 root root 4096 Oct 22 15:55 uevent
--w-------  1 root root 4096 Oct 23 18:26 unbind
dpkg -l | grep nvidia | grep 510
ii  libnvidia-cfg1-510-server:amd64                             510.85.02-0ubuntu0.22.04.1                                  amd64        NVIDIA binary OpenGL/GLX configuration library
ii  libnvidia-common-510-server                                 510.85.02-0ubuntu0.22.04.1                                  all          Shared files used by the NVIDIA libraries
ii  libnvidia-compute-510-server:amd64                          510.85.02-0ubuntu0.22.04.1                                  amd64        NVIDIA libcompute package
ii  libnvidia-decode-510-server:amd64                           510.85.02-0ubuntu0.22.04.1                                  amd64        NVIDIA Video Decoding runtime libraries
ii  libnvidia-encode-510-server:amd64                           510.85.02-0ubuntu0.22.04.1                                  amd64        NVENC Video Encoding runtime library
ii  libnvidia-extra-510-server:amd64                            510.85.02-0ubuntu0.22.04.1                                  amd64        Extra libraries for the NVIDIA Server Driver
ii  libnvidia-fbc1-510-server:amd64                             510.85.02-0ubuntu0.22.04.1                                  amd64        NVIDIA OpenGL-based Framebuffer Capture runtime library
ii  libnvidia-gl-510-server:amd64                               510.85.02-0ubuntu0.22.04.1                                  amd64        NVIDIA OpenGL/GLX/EGL/GLES GLVND libraries and Vulkan ICD
ii  nvidia-compute-utils-510-server                             510.85.02-0ubuntu0.22.04.1                                  amd64        NVIDIA compute utilities
ii  nvidia-dkms-510-server                                      510.85.02-0ubuntu0.22.04.1                                  amd64        NVIDIA DKMS package
ii  nvidia-driver-510-server                                    510.85.02-0ubuntu0.22.04.1                                  amd64        NVIDIA Server Driver metapackage
ii  nvidia-kernel-common-510-server                             510.85.02-0ubuntu0.22.04.1                                  amd64        Shared files used with the kernel module
ii  nvidia-kernel-source-510-server                             510.85.02-0ubuntu0.22.04.1                                  amd64        NVIDIA kernel source package
ii  nvidia-utils-510-server                                     510.85.02-0ubuntu0.22.04.1                                  amd64        NVIDIA Server Driver support binaries
ii  xserver-xorg-video-nvidia-510-server                        510.85.02-0ubuntu0.22.04.1                                  amd64        NVIDIA binary Xorg driver

Now that looks normal.

Look at nvidia-smi and how /sys/module point to 0000:05:00.0.

Now you have proper driver installation.

What’s the correct way now to see if Plex properly detects the GPU and uses it?

  1. If your CPU is an Intel 4xxx and above, with exception of a few SKUs, it will create cause node /dev/dri/renderD128 to be created.

  2. If it is an AMD, AND the nvidia is detected, you should see also see /dev/dri/renderD128

This is my machine with P2200 Nvidia

Last login: Sat Oct 22 15:27:53 2022 from 192.168.0.13
[chuck@glockner ~.2001]$ ls -la /dev/dri
total 0
drwxr-xr-x   3 root root        120 Sep 14 23:43 ./
drwxr-xr-x  20 root root       5640 Sep 26 21:33 ../
drwxr-xr-x   2 root root        100 Sep 14 23:43 by-path/
crw-rw----+  1 root render 226,   0 Sep 14 23:43 card0
crw-rw----+  1 root render 226,   1 Sep 14 23:43 card1
crw-rw----+  1 root render 226, 128 Sep 14 23:43 renderD128
[chuck@glockner ~.2002]$

If you see “renderD128” (from the Intel CPU) and “renderD129” then “renderD129” is the Nvidia (The kernal starts counting at 128 and increments with each device)

To tell PMS which rendering device to use:

  1. The default is ‘renderD128’. No changes required.
  2. To use ‘renderD129’,
    – Stop PMS
    – Edit ‘Preferences.xml’
    – Add HardwareDevicePath="/dev/dri/renderD129" before the closing />
    – Save and start PMS

Preferences.xml will look like this:

SomePreference="Value" HardwareDevicePath="/dev/dri/renderD129" />

Seems I do have the renderD128

root@plex:~# ll /dev/dri
total 0
drwxr-xr-x   3 root root       120 Oct 22 15:55 ./
drwxr-xr-x  23 root root      4820 Oct 23 18:21 ../
drwxr-xr-x   2 root root       100 Oct 22 15:55 by-path/
crw-rw----+  1 root video 226,   0 Oct 22 15:55 card0
crw-rw----+  1 root video 226,   1 Oct 22 15:55 card1
crw-rw----+  1 root video 226, 128 Oct 22 15:55 renderD128

My processors are 2x CPU Intel Xeon E5-2680v3. I haven’t rebooted the server but I did restart PMS. So, since I have the renderD128, I should be all good now?

That is good to go.

As final check, make sure user plex is a member of group video.

If not, add plex and restart PMS.

It already is in the video group. Looks good now. I’ll watch for certain streams to see if it shows the (hw) and go for there. Thanks for the help!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.