# Unable to enable hardware transcoding

**URL:** <https://forums.plex.tv/t/unable-to-enable-hardware-transcoding/647454>\
**Category:** Plex Media Server\
**Tags:** server-docker, playback\
**Created:** [October 27, 2020, 12:13am UTC](https://forums.plex.tv/t/unable-to-enable-hardware-transcoding/647454 "2020-10-27T00:13:03Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![selnk](https://avatars.discourse-cdn.com/v4/letter/s/77aa72/32.png) [@selnk](https://forums.plex.tv/u/selnk)\
**Post date:** [October 27, 2020, 12:13am UTC](https://forums.plex.tv/t/unable-to-enable-hardware-transcoding/647454/1 "2020-10-27T00:13:04Z")

</div>

Server Version#: 1.20.3.3483  
Player Version#: 4.34.4

My server has an AMD Ryzen 3 1200 CPU with a NVIDIA GTX960 GPU. Even with nvidia-docker installed and running `docker run --gpus all`, plex doesn’t use the GPU for transcoding. `docker run --gpus all nvidia/cuda:9.0-base nvidia-smi` shows that the GPU can be correctly passed to the container.

Any help is welcome.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [October 27, 2020, 12:44am UTC](https://forums.plex.tv/t/unable-to-enable-hardware-transcoding/647454/2 "2020-10-27T00:44:21Z")

</div>

You need to ensure /dev/dri is mapped through properly.  
You will also need drivers version 450.66 or higher (Nvidia Protocol 10.0 support).

---

<div class="post-metadata">

**Author:** ![selnk](https://avatars.discourse-cdn.com/v4/letter/s/77aa72/32.png) [@selnk](https://forums.plex.tv/u/selnk)\
**Post date:** [October 27, 2020, 1:40am UTC](https://forums.plex.tv/t/unable-to-enable-hardware-transcoding/647454/3 "2020-10-27T01:40:49Z")

</div>

I’m running NVIDIA drivers 455.28 and have mapped /dev/dri with `--device=/dev/dri:/dev/dri`

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [October 27, 2020, 1:41am UTC](https://forums.plex.tv/t/unable-to-enable-hardware-transcoding/647454/4 "2020-10-27T01:41:58Z")

</div>

Check the log files.

If it’s protocol, it will specifically state. 10.0 vs 9.1

If there are permission problems, it will not find it at all.

---

<div class="post-metadata">

**Author:** ![selnk](https://avatars.discourse-cdn.com/v4/letter/s/77aa72/32.png) [@selnk](https://forums.plex.tv/u/selnk)\
**Post date:** [October 27, 2020, 3:00am UTC](https://forums.plex.tv/t/unable-to-enable-hardware-transcoding/647454/5 "2020-10-27T03:00:01Z")

</div>

Nothing interesting in the logs for exact matches on “10.0” or “9.1”. What am I looking for? Which log files?

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [October 27, 2020, 3:38am UTC](https://forums.plex.tv/t/unable-to-enable-hardware-transcoding/647454/6 "2020-10-27T03:38:30Z")

</div>

1. Enable DEBUG logging.
2. Disable Verbose
3. Start a playback which will require transcode

A. If GPU seen and protocol incorrect – it will report the error 10.0 found 9.1  
B. If bad permissions – will not find the GPU.

Check the container’s runtime GUID to match that of /dev/dri (render / video group)

---

<div class="post-metadata">

**Author:** ![selnk](https://avatars.discourse-cdn.com/v4/letter/s/77aa72/32.png) [@selnk](https://forums.plex.tv/u/selnk)\
**Post date:** [October 27, 2020, 4:23am UTC](https://forums.plex.tv/t/unable-to-enable-hardware-transcoding/647454/7 "2020-10-27T04:23:09Z")

</div>

Not seeing any protocol error.  
I’m seeing

> [Transcode/ljx3un9t7ib5bb16trgbmzg9] TPU: hardware transcoding: enabled, but no hardware decode accelerator found  
> [Transcode/ljx3un9t7ib5bb16trgbmzg9] TPU: hardware transcoding: final decoder: , final encoder:  
> [Transcode/ljx3un9t7ib5bb16trgbmzg9] Job running: EAE\_ROOT=‘/tmp/pms-14701642-7504-44bc-bcb1-19cc58eb1dc9/EasyAudioEncoder’ FFMPEG\_EXTERNAL\_LIBS=‘/config/Library/Application\ Support/Plex\ Media\ Server/Codecs/02cff92-3522-linux-x86\_64/’ XDG\_CACHE\_HOME=‘/config/Library/Application Support/Plex Media Server/Cache’ XDG\_DATA\_HOME=‘/usr/lib/plexmediaserver/Resources’ X\_PLEX\_TOKEN=‘xxxxxxxxxxxxxxxxxxxx’ ‘/usr/lib/plexmediaserver/Plex Transcoder’ ‘-codec:0’ ‘hevc’ ‘-codec:1’ ‘mp2’ ‘-ss’ ‘2265’ ‘-analyzeduration’ ‘20000000’ ‘-probesize’ ‘20000000’ ‘-i’ ‘/data/download/others/test\_video.mkv’ ‘-filter\_complex’ ‘[0:0]scale=w=1280:h=720[0];[0]format=pix\_fmts=yuv420p|nv12[1]’ ‘-filter\_complex’ ‘[0:1] aresample=async=1:ocl=’'‘stereo’'‘:rematrix\_maxval=0.000000dB:osr=48000[2]’ ‘-map’ ‘[1]’ ‘-codec:0’ ‘libx264’ ‘-crf:0’ ‘16’ ‘-maxrate:0’ ‘10269k’ ‘-bufsize:0’ ‘20538k’ ‘-r:0’ ‘59.939999999999998’ ‘-preset:0’ ‘veryfast’ ‘-x264opts:0’ ‘subme=1:me\_range=4:rc\_lookahead=10:me=hex:8x8dct=0:partitions=none’ ‘-force\_key\_frames:0’ ‘expr:gte(t,2265+n\_forced\*3)’ ‘-map’ ‘[2]’ ‘-metadata:s:1’ ‘language=eng’ ‘-codec:1’ ‘aac’ ‘-b:1’ ‘256k’ ‘-f’ ‘dash’ ‘-seg\_duration’ ‘3’ ‘-init\_seg\_name’ ‘init-stream$RepresentationID$.m4s’ ‘-media\_seg\_name’ ‘chunk-stream$RepresentationID$-$Number%05d$.m4s’ ‘-window\_size’ ‘5’ ‘-delete\_removed’ ‘false’ ‘-skip\_to\_segment’ ‘756’ ‘-time\_delta’ ‘0.0625’ ‘-manifest\_name’ ‘[http://127.0.0.1:32400/video/:/transcode/session/ljx3un9t7ib5bb16trgbmzg9/0e8b3736-8c22-4a7f-a2df-0ca5ec3e252b/manifest?X-Plex-Http-Pipeline=infinite](http://127.0.0.1:32400/video/:/transcode/session/ljx3un9t7ib5bb16trgbmzg9/0e8b3736-8c22-4a7f-a2df-0ca5ec3e252b/manifest?X-Plex-Http-Pipeline=infinite)’ ‘-avoid\_negative\_ts’ ‘disabled’ ‘-map\_metadata’ ‘-1’ ‘-map\_chapters’ ‘-1’ ‘dash’ ‘-start\_at\_zero’ ‘-copyts’ ‘-y’ ‘-nostats’ ‘-loglevel’ ‘quiet’ ‘-loglevel\_plex’ ‘error’ ‘-progressurl’ ‘[http://127.0.0.1:32400/video/:/transcode/session/ljx3un9t7ib5bb16trgbmzg9/0e8b3736-8c22-4a7f-a2df-0ca5ec3e252b/progress](http://127.0.0.1:32400/video/:/transcode/session/ljx3un9t7ib5bb16trgbmzg9/0e8b3736-8c22-4a7f-a2df-0ca5ec3e252b/progress)’

Plex runs as user plex. I tried chmod 777 on /dev/dri/\*, also set the owner to plex (chown plex). Still no hardware transcoding.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [October 27, 2020, 4:45am UTC](https://forums.plex.tv/t/unable-to-enable-hardware-transcoding/647454/8 "2020-10-27T04:45:02Z")

</div>

Then your cuda drivers / opencl / card something isn’t working right.

Even though you ran a nvidia container which shows things working there’s still no guarantee you’re doing things right for your Plex container.

I can’t be of any help because I have a NUC8 (no room for a card)

---

<div class="post-metadata">

**Author:** ![Saberwolf](https://avatars.discourse-cdn.com/v4/letter/s/f04885/32.png) [@Saberwolf](https://forums.plex.tv/u/Saberwolf)\
**Post date:** [October 28, 2020, 5:13am UTC](https://forums.plex.tv/t/unable-to-enable-hardware-transcoding/647454/9 "2020-10-28T05:13:32Z")

</div>

head to this website and use this runtime for docker you are going to have to figure out how to set it up

> **[NVIDIA/nvidia-container-runtime](https://github.com/NVIDIA/nvidia-container-runtime)**
>
> NVIDIA container runtime. Contribute to NVIDIA/nvidia-container-runtime development by creating an account on GitHub.

i got this information from this website

> **[Repository configuration](https://nvidia.github.io/nvidia-container-runtime/)**
>
> NVIDIA container runtime repository.

and i like to run NVTOP instead of nvidia-smi easier for me to use.

---

<div class="post-metadata">

**Author:** ![cmarcx](https://avatars.discourse-cdn.com/v4/letter/c/47e85d/32.png) [@cmarcx](https://forums.plex.tv/u/cmarcx)\
**Post date:** [November 6, 2020, 3:05pm UTC](https://forums.plex.tv/t/unable-to-enable-hardware-transcoding/647454/10 "2020-11-06T15:05:59Z")

</div>

just set the default runtime on the daemon.json like this:

{  
**"default-runtime": “nvidia”,**  
“runtimes”: {  
“nvidia”: {  
“path”: “/usr/bin/nvidia-container-runtime”,  
“runtimeArgs”:   
}  
},

}

---

<div class="post-metadata">

**Author:** ![Saberwolf](https://avatars.discourse-cdn.com/v4/letter/s/f04885/32.png) [@Saberwolf](https://forums.plex.tv/u/Saberwolf)\
**Post date:** [November 8, 2020, 11:32pm UTC](https://forums.plex.tv/t/unable-to-enable-hardware-transcoding/647454/11 "2020-11-08T23:32:29Z")

</div>

sudo dockerd --add-runtime=nvidia=/usr/bin/nvidia-container-runtime […]

running this command to add it to the daemon.json

---

<div class="post-metadata">

**Author:** ![selnk](https://avatars.discourse-cdn.com/v4/letter/s/77aa72/32.png) [@selnk](https://forums.plex.tv/u/selnk)\
**Post date:** [November 9, 2020, 2:10am UTC](https://forums.plex.tv/t/unable-to-enable-hardware-transcoding/647454/12 "2020-11-09T02:10:20Z")

</div>

I used the NVIDIA Container Toolkit

> **[User Guide — NVIDIA Cloud Native Technologies documentation](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/user-guide.html)**

The runtime is registered as shown in `docker info` shows `nvidia` in the runtimes.

`docker container inspect` shows my plex container is using the nvidia runtime.

Still not getting hardware acceleration.

---

<div class="post-metadata">

**Author:** ![selnk](https://avatars.discourse-cdn.com/v4/letter/s/77aa72/32.png) [@selnk](https://forums.plex.tv/u/selnk)\
**Post date:** [November 9, 2020, 2:26am UTC](https://forums.plex.tv/t/unable-to-enable-hardware-transcoding/647454/13 "2020-11-09T02:26:26Z")

</div>

Found the issue.

> **[NVIDIA Driver not yet supported for Linux Kernel 5.9+](https://forums.developer.nvidia.com/t/nvidia-driver-not-yet-supported-for-linux-kernel-5-9/157263)**
>
> Due to an incompatibility issue, we advise customers to defer updating to Linux Kernel 5.9+ until mid-November when an NVIDIA Linux GPU driver update with Kernel 5.9+ support is expected to be available. Linux Kernel 5.9+ is incompatible with...

Reverted to LTS kernel and it works.

---

<div class="post-metadata">

**Author:** ![Saberwolf](https://avatars.discourse-cdn.com/v4/letter/s/f04885/32.png) [@Saberwolf](https://forums.plex.tv/u/Saberwolf)\
**Post date:** [December 14, 2020, 3:52am UTC](https://forums.plex.tv/t/unable-to-enable-hardware-transcoding/647454/14 "2020-12-14T03:52:08Z")

</div>

in you set up your using docker try running the command ldconfig in the docker image and see if it works i ran into a similar issue and it was getting all the dir passed but was not passing library links

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [March 14, 2021, 3:52am UTC](https://forums.plex.tv/t/unable-to-enable-hardware-transcoding/647454/15 "2021-03-14T03:52:19Z")

</div>

Closed on March 14, 2021, 3:52am UTC

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