Plex Media Server not utilizing GPU

Server Version#: 1.32.7.7571-13cdc68dc
Player Version#: N/A

I have Plex running in a KVM inside TrueNAS. The VM has a PCI Device Passthrough, and I am passing through an Nvidia Quadro P1000 GPU.

The OS picked it up fine, and the drivers are installed. Plex appears to see it without an issue, however htop and nvtop seem to wildly disagree about this – as the system is under (what I think) is an extreme load and the GPU isn’t being touched … any ideas on what I’m missing here would be greatly appreciated. Thank you.

I should add that this is a fresh install using the latest drivers and latest Plex server available.

OS: RHEL 9.2
Nvidia Driver Version: 535.113.01

Its chewing through the libraries, I wouldn’t expect such a high load forever, just this initial gut-punch, but I still think the GPU should be getting in on this load.

Need SERVER DEBUG logs ZIP please which capture the start of a transcoded playback

Can’t diagnose without it. :slight_smile:

Plex Media Server Logs_2023-10-03_12-39-55.zip (4.8 MB)

Thanks for the help!

@ChuckPa I downloaded the NVIDIA VIDEO CODEC SDK which has provided me with (among others) two files:
libnvcuvid.so and libnvidia-encode.so, perhaps I should add them to /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Codecs/a31c019-4614-linux-x86_64 ?

Not sure if that would help, but I didn’t know if it could hurt – so I’m asking before acting.

Get rid of that. Plex brings what it needs automatically. You manually injecting things will result in failure.

There is only one thing you’ll want for using the Nvidia card in the VM

  1. Go to Nvidia site
  2. Download their Nvidia GPU drivers for Redhat ( a .run file ?? )
  3. Install.
  4. When complete, restart the VM
  5. Verify GPU found with: nvidia-smi
  6. Start Plex

nvidia-smi output:

[chuck@glockner ~.2001]$ nvidia-smi
Tue Oct  3 16:07:35 2023       
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.104.12             Driver Version: 535.104.12   CUDA Version: 12.2     |
|-----------------------------------------+----------------------+----------------------+
| 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 |
| 49%   40C    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 ~.2002]$ 

Confirms card identified and accessible with CUDA

Yes, I had already downloaded and installed the drivers

Here is the output of nvidia-smi

Here is my configuration.

  1. I have 256 GB of memory so I can use /dev/shm for transcoder temp :sunglasses:

  2. Confirm all the options are enabled.

Yes, I have all the same options.

This is the imgur link to the screenshot: https://i.imgur.com/toAvOVw.jpg

Finished reading your logs

  1. Activity: registered new activity 9ce96666-3d4e-4c99-9f11-cb9b28550fc7 - "Generating video chapter thumbnails"

This is VERY CPU intensive.

  1. Scanner is running and updating / ingesting media & metadata “Something changed”

  2. Please play a file, known NOT to have subtitles, and force a transcode
    – From a terminal window - nvidia-smi an observe the transcoder active

[chuck@glockner ~.2002]$ nvidia-smi
Tue Oct  3 16:32:45 2023       
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.104.12             Driver Version: 535.104.12   CUDA Version: 12.2     |
|-----------------------------------------+----------------------+----------------------+
| 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 |
| 49%   42C    P0              21W /  75W |    368MiB /  5120MiB |      0%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+
                                                                                         
+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A   3608004      C   ...lib/plexmediaserver/Plex Transcoder      364MiB |
+---------------------------------------------------------------------------------------+
[chuck@glockner ~.2002]$ 

Be advised: Limited HEVC HDR

Quadro P600 / P620/ P1000	Pascal	3rd Gen	D/M	1	1	YES	YES	YES	NO	YES	YES	YES	YES	YES	YES	YES	NO	NO	NO	NO	NO

So, oddly – I see the transcode pop up on nvidia-smi during the Preview-Roll, but when the actual movie starts, there is nothing on nvidia-smi, although Tautulli reports that I am indeed transcoding the file, without subtitles.

138 MB is largely from the probing tests.

Give this a shot

Yeah, that worked great. I was able to see it Transcoding the file in nvidia-smi – curious though, why doesn’t Plex offload the scene indexing and thumbnailing?! Also, why would some things not use the GPU (American Gangster, in this example) but this would? Just because it was 4k? Which, BTW, I think is the first time I’ve ever played 4k through Plex – that picture quality was out of this world!

HW use is suppressed when there are subtitles because, at any time, the player might want to enable subtitle burning. (EMPHASIS on burning)

I am very careful (A***-retentive to some hahaha) in that I strip subtitles unless I absolutely need them. Media curation (removing unused junk) is something everyone should be doing. Plex is good but garbage is garbage :slight_smile: lol

Here’s another 4K I think you’ll love.

1 Like

Thanks, @ChuckPa , I really appreciate the swift and definitive help!

Supplemental: (I forgot)

Scene indexing / thumbnail generation could be done with the GPU —

IF and ONLY IF

the system were totally idle.

Otherwise, you have the risk of this scenario:

  1. User has a system which can handle only one transcode slot
  2. The scanner is generating thumbnails
  3. A user hits “Play”
  4. What do you say ?
    – “We’re sorry, all system resources are busy right now, please wait …”
    -or-
    – “Insufficient resources, unable to transcode video”
    -or-
    – Kill the thumbnails and then launch playback ?
    – (doable but could take an extra 10+ seconds to start playback)

Engineering decided to make thumbnail generation a ‘background’ task and relegate to the CPU at lowered CPU priority ( nice 20 on Linux )

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