When I HW transcode any movie, Plex crashes

Server Version#: Linux Ubuntu 1.40.3.8555
Player Version#: IOS 8.37; Plex for MACos M1 Pro: 1.96.0.177-dc5df788
Plex Media Server Logs_2024-07-16_09-55-15.zip (5.2 MB)

Whenever I put on a 4K HDR movie, or even a 1080p SDR movie, if HW acceleration is on (I achieve this with a 1080Ti, passed through proxmox on a Dell R720, with 2xE5-2650v2. With CPU tone-mapping there’s no problem, but as soon as I turn on HW transcoding, video plays back for a minute, then it start stuttering, then video stops but audio keeps going on, and ultimately the server crashes. CUDA is downloaded correctly and I have 535 driver for the Nvidia GPU. Ubuntu is 20.04.

When you invoke nvidia-smi, do you see the Plex Transcoder listed ?

@ChuckPa It does, it appears as Plex Transcode Job, ca. 400MB of NVRAM used. Then it goes to near zero and then it exits when Plex tells it to (i don’t know why PMS thinks client is exiting). Other times Plex for Mac/iOS just says “Couldn’t start playback session for this item.”

Normal SMI:

+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.183.01             Driver Version: 535.183.01   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  NVIDIA GeForce GTX 1080 Ti     Off | 00000000:01:00.0 Off |                  N/A |
|  0%   32C    P8              17W / 250W |     12MiB / 11264MiB |      0%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+
                                                                                         
+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A      8606      G   /usr/lib/xorg/Xorg                            9MiB |
+---------------------------------------------------------------------------------------+

Plex Starts Transcoding:

+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.183.01             Driver Version: 535.183.01   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  NVIDIA GeForce GTX 1080 Ti     Off | 00000000:01:00.0 Off |                  N/A |
|  0%   34C    P0              60W / 250W |    138MiB / 11264MiB |      0%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+
                                                                                         
+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A      8606      G   /usr/lib/xorg/Xorg                            9MiB |
|    0   N/A  N/A   1155545      C   ...b/plexmediaserver/Plex Media Server      124MiB |
+---------------------------------------------------------------------------------------+

In this case Plex for Mac showed this error without starting playback:
An unknown error occurred (4294967283) Error code: 4294967283

But then started working again by clicking on retry. (HD1080 H264 → SD 4mbps)

+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.183.01             Driver Version: 535.183.01   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  NVIDIA GeForce GTX 1080 Ti     Off | 00000000:01:00.0 Off |                  N/A |
|  0%   44C    P2              58W / 250W |    430MiB / 11264MiB |      1%      Default |
|                                         |                      |                  N/A |
+-----------------------------------------+----------------------+----------------------+
                                                                                         
+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A      8606      G   /usr/lib/xorg/Xorg                            9MiB |
|    0   N/A  N/A   1256916      C   ...lib/plexmediaserver/Plex Transcoder      416MiB |
+---------------------------------------------------------------------------------------+

Then trying a 4K HDR10 (HEVC Main 10) (hw) -> 1080P (H264)—Transcode (hw) Stream to iOS (iPhone 15 Pro)
It keeps on trying to start playing, then it says the server is not powerful enough to play this.

+---------------------------------------------------------------------------------------+
| Processes:                                                                            |
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |
|        ID   ID                                                             Usage      |
|=======================================================================================|
|    0   N/A  N/A      8606      G   /usr/lib/xorg/Xorg                            9MiB |
|    0   N/A  N/A   1259286      C   ...lib/plexmediaserver/Plex Transcoder      416MiB |
+---------------------------------------------------------------------------------------+

Then PMS crashes. Keep in mind this is with both hw decoding and encoding on.

In your /etc/modprobe.d/vfio.conf in Proxmox have you blacklisted both the GPU and the audio component of your GPU? Have you also blacklisted all of the Nvidia drivers in /etc/modprobe.d/blacklist.conf? Something like this…
blacklist nvidia blacklist nvidiafb blacklist nvidia_drm

And, rebooted. If either of those aren’t done, you will see this behavior because the GPU is partially claimed by the Proxmox host.

1 Like

@albertogiardino

The transcoder always tests the GPU to ensure there’s enough video memory available for the job it’s about to run and it can perform the requested transcode.

This is why you see it pop in and out prior to the actual transcode

@rubylaser

THANK YOU for sharing this!!!
I knew it could be done. I’d done it but didn’t remember the blacklist details.

@ChuckPa @rubylaser
Already taken those steps when I set the GPU up for Proxmox. It’s even worse for 4K HDR->1080P. Essentially it doesn’t even start, it just crashes PMS.

@albertogiardino

We did discover problems with 1.40.3.8555
Because of those, we have updates in 1.40.4

If everything was working correctly with 1.40.2 , I recommend first downgrading to 1.40.2 and confirming it’s still working correctly.

After that, you can decide whether or not you want to upgrade to 1.40.4 which contains the fixes for 1.40.3.8555

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