# Ubuntu22.04 hardware transcoding not work

**URL:** <https://forums.plex.tv/t/ubuntu22-04-hardware-transcoding-not-work/847780>\
**Category:** Plex Media Server\
**Tags:** server-linux, server-docker\
**Created:** [July 19, 2023, 2:17pm UTC](https://forums.plex.tv/t/ubuntu22-04-hardware-transcoding-not-work/847780 "2023-07-19T14:17:18Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![lkw199711](https://avatars.discourse-cdn.com/v4/letter/l/edb3f5/32.png) [@lkw199711](https://forums.plex.tv/u/lkw199711)\
**Post date:** [July 19, 2023, 2:17pm UTC](https://forums.plex.tv/t/ubuntu22-04-hardware-transcoding-not-work/847780/1 "2023-07-19T14:17:19Z")

</div>

Server Version#: 1.32.4.7195  
Player Version#: 1.74.1.3913-9baac009  
\<If providing [server logs](https://support.plex.tv/articles/200250417-plex-media-server-log-files/) please do NOT turn on verbose logging, only [debug logging](https://support.plex.tv/articles/201643703-reporting-issues-with-plex-media-server/#toc-1) should be enabled\>

cpu: ryzen 1700

gpu: gtx1060 3g

system: ubuntu22.04-server docker (esxi)

### I use plex on docker

```auto
docker -v
Docker version 20.10.21, build 20.10.21-0ubuntu1~22.04.3

docker-compose -v
Docker Compose version v2.19.1

```

### I install nvidia driver 470

```auto
nvidia-smi
Wed Jul 19 13:52:23 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.125.06 Driver Version: 525.125.06 CUDA Version: 12.0 |
|-------------------------------+----------------------+----------------------+
| 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 ... Off | 00000000:03:00.0 Off | N/A |
| 38% 39C P8 6W / 120W | 2MiB / 3072MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+

```

and libnvidia-encode, libnvidia-decode, nvidia-docker2…

### my docker-compose file

```auto
version: '3'
services:
  plex:
    image: plexinc/pms-docker
    restart: unless-stopped
    container_name: plex
    networks:
      macvlan_1:
        ipv4_address: 192.168.2.50
    ports:
      - 32400:32400
    environment:
      PLEX_CLAIM: claim-QPYejXj3EXisyQNxwF3B
      NVIDIA_VISIBLE_DEVICES: all
      NVIDIA_DRIVER_CAPABILITIES: compute,video,utility
      VERSION: docker
      PUID: 1000
      PGID: 1000
      PLEX_UID: 1000
      PLEX_GID: 1000
      TZ: Asia/Shanghai
    volumes:
      - /mnt/double/docker/005plex2:/config
      - /mnt/double/cache/000plex:/transcode
      - /mnt:/mnt
    devices:
      - /dev/dri:/dev/dri
      - /dev/nvidia0:/dev/nvidia0
      - /dev/nvidiactl:/dev/nvidiactl
      - /dev/nvidia-modeset:/dev/nvidia-modeset
      - /dev/nvidia-uvm:/dev/nvidia-uvm
      - /dev/nvidia-uvm-tools:/dev/nvidia-uvm-tools
    labels:
      - "traefik.enable=true"
    deploy:
      resources:
        limits:
          cpus: '0.5'
          memory: 2G
        reservations:
          cpus: '0.05'
          memory: 64M
          # devices:
          # - capabilities: [gpu]
    runtime: nvidia

networks:
  macvlan_1:
    external: true
    driver: macvlan

```

transcoding option is checked

The above is my configuration.

### anyway,

When I try transcoding to play a movie, I get error 4294967283.

#### Frist,

I think maybe my compose file has problem. I keep revising until the current state.

It doesn’t work

#### And,

I think maybe 470 mvidia drive has problem, then i create a new ubuntu22.04, install 535 and 525

(because 535 drivers have not yet been tested.)

![image-20230719220902266]()

It doesn’t work

#### finaly

I create a new plex rollback to a old version

It doesn’t work

This is my first plex logs

[Plex Media Server Logs\_2023-07-18\_19-17-34.zip](https://forums.plex.tv/uploads/short-url/yPIF2AYGEZygsuQqPtuM0A4ZnbL.zip) (87.2 KB)

and drive 525 logs

[Plex Media Server Logs\_2023-07-19\_21-44-58.zip](https://forums.plex.tv/uploads/short-url/vE0KjTM9SRGP5Soq1X8La05MB2V.zip) (810.5 KB)

Please help me, I try any thing i can do. but doesn’t work.

---

<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:** [July 19, 2023, 10:39pm UTC](https://forums.plex.tv/t/ubuntu22-04-hardware-transcoding-not-work/847780/2 "2023-07-19T22:39:17Z")

</div>

1. Nvidia 535 drivers have been verified to work OK. I was able to complete that work over the weekend.

2. Nvidia 470 drivers are now too old to use

3. I have no idea what is going on with the proprietary nvidia GPU manager service (SR-IOV) but every time I see it – It’s causing failures.

```auto
      - /dev/nvidia0:/dev/nvidia0
      - /dev/nvidiactl:/dev/nvidiactl
      - /dev/nvidia-modeset:/dev/nvidia-modeset
      - /dev/nvidia-uvm:/dev/nvidia-uvm
      - /dev/nvidia-uvm-tools:/dev/nvidia-uvm-tools

```

I have a clean installation without issue.

```auto
Last login: Wed Jul 19 18:35:26 2023 from 192.168.0.13
[chuck@glockner ~.2001]$ nvidia-smi
Wed Jul 19 18:38:47 2023       
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.54.03 Driver Version: 535.54.03 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 | 4MiB / 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]$ ls -la /dev/dri
total 0
drwxr-xr-x 3 root root 120 Jul 15 19:23 ./
drwxr-xr-x 21 root root 5820 Jul 15 19:23 ../
drwxr-xr-x 2 root root 100 Jul 15 19:23 by-path/
crw-rw----+ 1 root render 226, 0 Jul 15 19:23 card0
crw-rw----+ 1 root render 226, 1 Jul 15 19:23 card1
crw-rw----+ 1 root render 226, 128 Jul 15 19:23 renderD128
[chuck@glockner ~.2003]$

```

In ESXi. I have always passed the physical GPU – NOT a virtual GPU node.  
It looks like you’re trying to pass the whole virtual GPU manager (nvidia0 and control nodes – which won’t work)

PMS wants:

1. `card0` or `card1`
2. `renderD128` or `renderD129`

Keep it simple.

---

<div class="post-metadata">

**Author:** ![lkw199711](https://avatars.discourse-cdn.com/v4/letter/l/edb3f5/32.png) [@lkw199711](https://forums.plex.tv/u/lkw199711)\
**Post date:** [July 20, 2023, 4:28am UTC](https://forums.plex.tv/t/ubuntu22-04-hardware-transcoding-not-work/847780/3 "2023-07-20T04:28:12Z")

</div>

I try delete nvidia map option, Keep Only

```auto
- /dev/dri:/dev/dri

```

But it still doesn’t work

On my host

```auto
ls -la /dev/dri
total 0
drwxr-xr-x 3 root root 140 Jul 19 12:54 .
drwxr-xr-x 20 root root 4240 Jul 19 12:55 ..
drwxr-xr-x 2 root root 120 Jul 19 12:54 by-path
crw-rw---- 1 root video 226, 0 Jul 19 12:54 card0
crw-rw---- 1 root video 226, 1 Jul 19 12:54 card1
crw-rw---- 1 root render 226, 128 Jul 19 12:54 renderD128
crw-rw---- 1 root render 226, 129 Jul 19 12:54 renderD129

```

On plex container

```auto
ls -la /dev/dri
total 0
drwxr-xr-x 2 root root 120 Jul 20 12:12 .
drwxr-xr-x 6 root root 440 Jul 20 12:12 ..
crw-rw---- 1 root video 226, 0 Jul 20 12:12 card0
crw-rw---- 1 root video 226, 1 Jul 20 12:12 card1
crw-rw---- 1 root video1 226, 128 Jul 20 12:12 renderD128
crw-rw---- 1 root video1 226, 129 Jul 20 12:12 renderD129

```

I use esxi to directly connect the graphics card to ubuntu, container don’t have “by-path” floder. Is it related to this?

---

<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:** [July 20, 2023, 4:56am UTC](https://forums.plex.tv/t/ubuntu22-04-hardware-transcoding-not-work/847780/4 "2023-07-20T04:56:42Z")

</div>

In ESXi,

You ADD the PCI Device (the GPU card) to the VM.

(This is the physical addition/allocation)

When the OS starts. if the drivers are installed on the Guest OS in the VM, the card will be seen.

Do not forget you need libnvidia-decode and libnvidia-encode packages  
(check this)

---

<div class="post-metadata">

**Author:** ![lkw199711](https://avatars.discourse-cdn.com/v4/letter/l/edb3f5/32.png) [@lkw199711](https://forums.plex.tv/u/lkw199711)\
**Post date:** [July 20, 2023, 5:00am UTC](https://forums.plex.tv/t/ubuntu22-04-hardware-transcoding-not-work/847780/5 "2023-07-20T05:00:20Z")

</div>

Yes, I have already installed these two packages(525)

---

<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:** [July 20, 2023, 6:37am UTC](https://forums.plex.tv/t/ubuntu22-04-hardware-transcoding-not-work/847780/6 "2023-07-20T06:37:56Z")

</div>

Here are my transcoder settings (P2200 GPU)

 ![Screenshot from 2023-07-20 02-36-53](https://global.discourse-cdn.com/plex/original/4X/d/5/b/d5b22c81b6ecd71485d723934f7fae7415baca75.png)

1. Verify your Nvidia driver. Rebuild initramfs as appropriate / recompile DKMS. These logs show the version is too low. ( Did you install 525 on the host or in the guest?)

```auto
Jul 18, 2023 19:15:57.185 [140126118656824] ERROR - [Req#13b/Transcode] [FFMPEG] - Cannot load libnvidia-encode.so.1
Jul 18, 2023 19:15:57.185 [140126118656824] ERROR - [Req#13b/Transcode] [FFMPEG] - The minimum required Nvidia driver for nvenc is 455.28 or newer
Jul 18, 2023 19:15:57.277 [140126118656824] WARN - [Req#13b/Transcode] Codecs: avcodec_open2 returned -1 for encoder 'h264_nvenc'
Jul 18, 2023 19:15:57.277 [140126118656824] DEBUG - [Req#13b/Transcode] Codecs: testing hevc (decoder) with hwdevice vaapi
Jul 18, 2023 19:15:57.281 [140126118656824] DEBUG - [Req#13b/Transcode] Codecs: hardware transcoding: testing API vaapi

```

1. After upgrading the drivers - select the Nvidia GPU and SAVE

```auto
Jul 18, 2023 19:13:30.489 [140126134827832] DEBUG - [GPU] Got device: GP106 [GeForce GTX 1060 3GB], nvidia@unknown, default true, best true, ID /dev/dri/renderD129, DevID [10de:1c02:10de:0000], flags 0x70
Jul 18, 2023 19:13:30.489 [140126134827832] DEBUG - [GPU] Got device: Unknown, unknown@builtin, default false, best false, ID /dev/dri/renderD128, DevID [15ad:0405:15ad:0405], flags 0x0
Jul 18, 2023 19:13:30.505 [140126134827832] DEBUG - Grabber: Cleaning up orphaned grabs.

```

1. Start the playback (15 seconds) in the web browser.

2. I would like to see DEBUG log files ZIP which captures the start of transcoding  
(first 15 seconds).

---

<div class="post-metadata">

**Author:** ![lkw199711](https://avatars.discourse-cdn.com/v4/letter/l/edb3f5/32.png) [@lkw199711](https://forums.plex.tv/u/lkw199711)\
**Post date:** [July 20, 2023, 7:47am UTC](https://forums.plex.tv/t/ubuntu22-04-hardware-transcoding-not-work/847780/7 "2023-07-20T07:47:10Z")

</div>

wow, I update plex image latest, delete this option

```auto
NVIDIA_DRIVER_CAPABILITIES: compute,video,utility

```

I don’t know which step worked, now i can see my card in plex setting  
 ![H1SXOVU6$2Q@@Y`QUWDPAA_tmb](https://global.discourse-cdn.com/plex/original/4X/2/c/3/2c3dcb96fb5e157a07c7f02616974d982531960e.jpeg)

But I encountered a new problem,  
 ![image](https://global.discourse-cdn.com/plex/original/4X/3/1/2/312819d1c305aaa0505fa759743e12d1e74bb9ff.jpeg)  
There is no transcoding option on the playback interface

Sometimes they can work, but used cpu, Very sluggish.

Sometimes error

 ![image](https://global.discourse-cdn.com/plex/original/4X/f/5/b/f5b1d4ebf578ae9251fbf060ea6139345e5dd24b.png)

o, you show the logs is driver 470, now i am 525

```auto
nvidia-smi
Thu Jul 20 07:45:47 2023       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.125.06 Driver Version: 525.125.06 CUDA Version: 12.0 |
|-------------------------------+----------------------+----------------------+
| 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 ... Off | 00000000:03:00.0 Off | N/A |
| 38% 40C P8 6W / 120W | 2MiB / 3072MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+

```

and this is my new logs

[Plex Media Server Logs\_2023-07-20\_15-46-23.zip](https://forums.plex.tv/uploads/short-url/cqejLJHzFC0gUtKMkWS4z9mme0C.zip) (641.6 KB)

I think I’m close

---

<div class="post-metadata">

**Author:** ![lkw199711](https://avatars.discourse-cdn.com/v4/letter/l/edb3f5/32.png) [@lkw199711](https://forums.plex.tv/u/lkw199711)\
**Post date:** [July 20, 2023, 7:56am UTC](https://forums.plex.tv/t/ubuntu22-04-hardware-transcoding-not-work/847780/8 "2023-07-20T07:56:44Z")

</div>

![image](https://global.discourse-cdn.com/plex/original/4X/a/2/d/a2db29f493cb33ef5b7b65290de46cb63c80dc46.png)

no(hw)

---

<div class="post-metadata">

**Author:** ![lkw199711](https://avatars.discourse-cdn.com/v4/letter/l/edb3f5/32.png) [@lkw199711](https://forums.plex.tv/u/lkw199711)\
**Post date:** [July 20, 2023, 8:52am UTC](https://forums.plex.tv/t/ubuntu22-04-hardware-transcoding-not-work/847780/9 "2023-07-20T08:52:00Z")

</div>

I try to update 535,but not work.  
then i switch to ubuntu which used 470,  
they can work  
 ![image](https://global.discourse-cdn.com/plex/original/4X/3/1/8/3182c18b1498f1954c71489cae9334b99590ec4c.jpeg)

thanks  
oh god, they can work , oh god… 😭

---

<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:** [October 18, 2023, 8:52am UTC](https://forums.plex.tv/t/ubuntu22-04-hardware-transcoding-not-work/847780/10 "2023-10-18T08:52:27Z")

</div>

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