# NVENC and NVDEC work on only one GPU with Multi-GPU setups with NVIDIA Container Toolkit in Driver \>=565

**URL:** <https://forums.developer.nvidia.com/t/nvenc-and-nvdec-work-on-only-one-gpu-with-multi-gpu-setups-with-nvidia-container-toolkit-in-driver-565/347361>\
**Category:** Linux\
**Tags:** ffmpeg, nvenc, docker, driver, gstreamer, linux-driver, containers, kubernetes, cuda\
**Created:** [October 11, 2025, 9:19am UTC](https://forums.developer.nvidia.com/t/nvenc-and-nvdec-work-on-only-one-gpu-with-multi-gpu-setups-with-nvidia-container-toolkit-in-driver-565/347361 "2025-10-11T09:19:27Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![ehfd](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@ehfd](https://forums.developer.nvidia.com/u/ehfd)\
**Post date:** [October 11, 2025, 9:19am UTC](https://forums.developer.nvidia.com/t/nvenc-and-nvdec-work-on-only-one-gpu-with-multi-gpu-setups-with-nvidia-container-toolkit-in-driver-565/347361/1 "2025-10-11T09:19:27Z")

</div>

> <https://github.com/NVIDIA/nvidia-container-toolkit/issues/1249>
>
> \### Summary
> 
> We are experiencing a critical regression with NVENC hardware encod…ing when using NVIDIA driver version \`570.x\` in a multi-GPU Kubernetes environment. On a node with four identical GPUs, any containerized application managed by the GPU Operator can only use the NVENC encoder successfully if it is scheduled on the last enumerated GPU (e.g., GPU 3 of 4). Pods scheduled on any other GPU (0, 1, or 2) fail to initialize the encoder.
> 
> This issue is a clear regression, as the entire setup works perfectly with the \`550.x\` driver series. Host-level encoding works on all cards, and we have confirmed there is \*\*no\*\* driver version mismatch between the host and the container. The problem appears to be specific to how the 570.x driver exposes NVENC capabilities to the containerized environment in a multi-GPU configuration.
> 
> \### Environment Details
> 
> \* \*\*Hardware:\*\*
> \* \*\*CPU:\*\* AMD Ryzen Threadripper 7970X (32-Cores)
> \* \*\*GPU:\*\* 4 x NVIDIA GeForce RTX 4080 SUPER
> \* \*\*Motherboard:\*\* ASUSTeK Pro WS TRX50-SAGE WIFI
> \* \*\*Software:\*\*
> \* \*\*Orchestrator:\*\* Kubernetes
> \* \*\*GPU Management:\*\* NVIDIA GPU Operator
> \* \*\*Host Driver (Problematic):\*\* \`570.x\` (e.g., 570.124.06)
> \* \*\*Host Driver (Working):\*\* \`550.x\` series
> \* \*\*Container:\*\* Using a container with correctly matched user-space libraries for the host driver.
> \* \*\*Application:\*\* An Unreal Engine-based rendering service, and standard \`ffmpeg\`.
> 
> \### Steps to Reproduce
> 
> 1. Configure a Kubernetes node with multiple identical GPUs (e.g., 4x 4080 SUPER) and install NVIDIA host driver \`570.x\`.
> 2. Deploy the NVIDIA GPU Operator.
> 3. Deploy a Kubernetes \`Deployment\` that requests a single GPU (\`spec.containers.resources.limits: nvidia.com/gpu: 1\`).
> 4. Ensure pods from the Deployment are scheduled on different physical GPUs (e.g., GPU 0, GPU 1, etc.).
> 5. Inside a pod scheduled on any GPU \*except the last one\*, attempt to initialize an NVENC session using any application (\`ffmpeg\`, custom code, etc.).
> 
> \### Expected Behavior
> 
> The containerized application should be able to successfully initialize the NVENC hardware encoder and perform video encoding, regardless of which physical GPU (0, 1, 2, or 3) is assigned to the pod.
> 
> \### Actual Behavior
> 
> 1. \*\*Consistent Failure on first N-1 GPUs:\*\* NVENC initialization fails on pods assigned to GPU 0, GPU 1, and GPU 2.
> 2. \*\*Consistent Success on the last GPU:\*\* A pod that is scheduled on GPU 3 works perfectly and can encode video without issue.
> 3. \*\*Application-Agnostic Failure:\*\* The issue is not tied to our application. A standard \`ffmpeg\` command inside a failing pod reproduces the error perfectly:
> \`\`\`bash
> $ ffmpeg -f lavfi -i testsrc=size=1920x1080:rate=30 -t 10 -c:v h264\_nvenc -f null -
> ...
> \[h264\_nvenc @ 0x55de29791c00\] OpenEncodeSessionEx failed: unsupported device (2): (no details)
> \[h264\_nvenc @ 0x55de29791c00\] No capable devices found
> Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0
> \`\`\`
> 4. Our Unreal Engine application logs corresponding errors:
> \`\`\`
> LogAVCodecs: Error: Error Creating: Failed to create encoder \[NVENC 2\]
> LogPixelStreaming: Error: Could not create encoder.
> \`\`\`
> 
> \### Troubleshooting and Analysis
> 
> \* \*\*This is a clear regression,\*\* as downgrading the host driver to the \`550.x\` series resolves the issue completely on the exact same hardware and software stack.
> \* The issue is \*\*specific to the container environment.\*\* Running \`ffmpeg\` with NVENC directly on the host OS works correctly for all 4 GPUs simultaneously.
> \* The problem is tied to the \*\*logical GPU index\*\*, not a specific faulty card. Physically swapping the GPUs does not change the behavior; the failure always occurs on the first N-1 logical GPUs.
> \* Based on this evidence, the behavior strongly suggests a bug in the \`570.x\` driver or a related component of the GPU Operator toolkit. The issue likely lies in the enumeration or initialization process for NVENC capabilities when exposing them to a container in a multi-GPU system.
> 
> \### Workaround
> 
> The only known workaround is to \*\*downgrade the NVIDIA host driver to a version in the 550.x series.\*\*

> <https://github.com/NVIDIA/nvidia-container-toolkit/issues/1209>
>
> So, this is a weird and pretty specific problem. I am at a loss at what I can do… next because I am unsure if this is an issue with nvidia or ffmpeg (nvdec specifically). Issue has been observed in the frigate tensorrt images and ubuntu cuda images with ffmpeg 7.
> 
> This is in relation to ffmpeg crashing (due to not finding a CUDA device) when using multiple nvidia gpus while trying to use any other index than '0'. I have tried to only expose devices using NVIDIA\_VISIBLE\_DEVICES env var and assigning using index or GPU-UUID. The weird part is that I can load ONNX models onto GPU 1, which kind of leads towards this may be something specific to ffmpeg.
> 
> I am opening this issue to seek advice and to see if there are any other users having this issue.
> 
> Error from ffmpeg output:
> 
> \`\`\`logs
> 2025-07-29 16:57:53.773105842 \[2025-07-29 16:57:53\] ffmpeg.alley.detect ERROR : \[AVHWDeviceContext @ 0x5dfde7cb58c0\] cu-\>cuDeviceGet(&hwctx-\>internal-\>cuda\_device, device\_idx) failed -\> CUDA\_ERROR\_INVALID\_DEVICE: invalid device ordinal
> 2025-07-29 16:57:53.773621224 \[2025-07-29 16:57:53\] ffmpeg.alley.detect ERROR : Device creation failed: -542398533.
> 2025-07-29 16:57:53.774103329 \[2025-07-29 16:57:53\] ffmpeg.alley.detect ERROR : \[vist#0:0/h264 @ 0x5dfde7c75f40\] \[dec:h264 @ 0x5dfde7d32440\] No device available for decoder: device type cuda needed for codec h264.
> 2025-07-29 16:57:53.774607022 \[2025-07-29 16:57:53\] ffmpeg.alley.detect ERROR : \[vist#0:0/h264 @ 0x5dfde7c75f40\] \[dec:h264 @ 0x5dfde7d32440\] Hardware device setup failed for decoder: Generic error in an external library
> 2025-07-29 16:57:53.775085378 \[2025-07-29 16:57:53\] ffmpeg.alley.detect ERROR : \[vost#0:0/rawvideo @ 0x5dfde7c80000\] Error initializing a simple filtergraph
> 2025-07-29 16:57:53.775575817 \[2025-07-29 16:57:53\] ffmpeg.alley.detect ERROR : Error opening output file pipe:.
> 2025-07-29 16:57:53.776048525 \[2025-07-29 16:57:53\] ffmpeg.alley.detect ERROR : Error opening output files: Generic error in an external library
> \`\`\`
> 
> Edit: Other issues where this error occurs:
> 
> \- https://github.com/blakeblackshear/frigate/discussions/18018
> \- https://github.com/blakeblackshear/frigate/discussions/18722
> 
> I have also opened a ticket on the ffmpeg bug tracker: https://trac.ffmpeg.org/ticket/11694

> <https://github.com/NVIDIA/k8s-device-plugin/issues/1282>
>
> \### 🐛 Describe the bug
> 
> When deploying GPU-bound pods using the NVIDIA device pl…ugin (\`nvidia-device-plugin\` Helm chart v0.17.1), \*\*FFmpeg NVENC fails inside the container unless the assigned GPU is mounted at the path \`/dev/nvidiaN\` where \`N\` matches its \`index\` in \`nvidia-smi\`.\*\*
> 
> This issue occurs \*\*only when using \`deviceListStrategy: volume-mounts\`\*\*, which is required for secure GPU isolation in our multi-tenant environment. Using \`envvar\` is not an option, as users can override \`NVIDIA\_VISIBLE\_DEVICES\` in untrusted Docker images.
> 
> As a result, \*\*only pods where the assigned GPU's \`nvidia-smi\` index matches the container path \`/dev/nvidiaN\` succeed. All others fail with \`unsupported device\` errors in FFmpeg\*\*.
> 
> \---
> 
> \### 🛠️ Helm values
> 
> \`\`\`yaml
> deviceIDStrategy: uuid
> deviceListStrategy: volume-mounts
> runtimeClassName: nvidia
> \`\`\`
> 
> \---
> 
> \### 🧠 Root cause
> 
> NVENC appears to rely on the assumption that:
> 
> \`\`\`
> /dev/nvidiaN \<—\> GPU with index N from \`nvidia-smi\`
> \`\`\`
> 
> If this alignment is broken (e.g. GPU with \`index: 0\` is mounted as \`/dev/nvidia5\`), the encoder fails:
> 
> \`\`\`
> \[h264\_nvenc @ 0x637317ea8e80\] OpenEncodeSessionEx failed: unsupported device (2): (no details)
> \[h264\_nvenc @ 0x637317ea8e80\] No capable devices found
> \`\`\`
> 
> This behavior is reproducible and consistent across all tested environments.
> 
> \---
> 
> \### 🖥️ Host configuration
> 
> \* 6× NVIDIA RTX 4090 (UUID-assigned, known-good hardware)
> \* Host \`/dev/nvidia\[0-5\]\` layout matches \`nvidia-smi\` output
> \* \`nvidia-smi\`, CUDA, and NVENC work fine directly on host
> \* Issue \*\*only occurs inside container\*\* when mount path/index diverge from \`nvidia-smi\`
> 
> \---
> 
> \### ✅ Working pod example
> 
> \* GPU UUID: \`GPU-46b5dd79-...\`
> \* \`nvidia-smi index\`: \`0\`
> \* Mounted as: \`/dev/nvidia0\`
> \* ✅ \`ffmpeg -c:v h264\_nvenc\` works
> 
> \---
> 
> \### ❌ Failing pod example
> 
> \* GPU UUID: \`GPU-dada647b-...\`
> \* \`nvidia-smi index\`: \`0\`
> \* Mounted as: \`/dev/nvidia5\`
> \* ❌ \`ffmpeg -c:v h264\_nvenc\` fails with:
> 
> \`\`\`text
> \[h264\_nvenc @ 0x637317ea8e80\] OpenEncodeSessionEx failed: unsupported device (2): (no details)
> \[h264\_nvenc @ 0x637317ea8e80\] No capable devices found
> \`\`\`
> 
> \---
> 
> \### 🔍 Additional observations
> 
> \* All expected character devices (\`nvidia\[0-9\]\`, \`nvidiactl\`, \`uvm\`, etc.) are present inside the pod.
> \* The mounted \`/dev/nvidiaX\` files have correct major/minor numbers.
> \* The issue \*\*only depends on the alignment between \`nvidia-smi index\` and the mounted path\*\*.
> \* The \`Device Minor:\` in \`/proc/driver/nvidia/gpus/.../information\` \*\*does not determine NVENC success\*\*, only the mount path does.
> 
> \---
> 
> \### ✅ Expected behavior
> 
> All GPUs assigned to a container should be fully usable via NVENC — regardless of physical or logical index — \*\*as long as the device is properly mounted\*\*.
> 
> The device plugin should ensure that \*\*\`/dev/nvidiaN\` always maps to the GPU with \`nvidia-smi index N\`\*\*, or NVENC workloads will fail.
> 
> \---
> 
> \### 🌎 Environment
> 
> \* \*\*Host OS:\*\* Ubuntu 22.04
> \* \*\*GPUs:\*\* 6× NVIDIA RTX 4090
> \* \*\*Container runtime:\*\* containerd
> \* \*\*Kubernetes:\*\* v1.32.x (K3s)
> \* \*\*NVIDIA Driver:\*\* 570.133.20 (also tested with 575)
> \* \*\*NVIDIA device plugin:\*\* v0.17.1 (Helm)
> \* \*\*nvidia-container-runtime:\*\* 3.14.0-1
> \* \*\*nvidia-container-toolkit:\*\* 1.17.6-1
> \* \*\*NVIDIA\_DRIVER\_CAPABILITIES:\*\* \`compute,video,utility,graphics,display\` (set in the deployment image)
> \* \*\*FFmpeg:\*\* NVENC-enabled build (confirmed working directly on host)
> 
> \---
> 
> \### 🧪 Steps to reproduce
> 
> 1. Deploy multiple pods with:
> 
> \`\`\`yaml
> resources:
> limits:
> nvidia.com/gpu: 1
> \`\`\`
> 
> 2. Inside each pod, run:
> 
> \`\`\`bash
> nvidia-smi --query-gpu=gpu\_uuid,index,name --format=csv,noheader
> ls -l /dev/nvidia\[0-9\]
> ffmpeg -hide\_banner -f lavfi -i testsrc=duration=3:size=1280x720:rate=30 -c:v h264\_nvenc -y /tmp/test.mp4
> \`\`\`
> 
> 3. Observe:
> 
> \* If \`/dev/nvidiaN\` matches the \`index: N\` reported by \`nvidia-smi\`, encoding works.
> \* If not, FFmpeg fails.
> 
> \---
> 
> \### 💡 Suggested improvement
> 
> Ensure the device plugin \*\*mounts GPU devices inside the pod at the \`/dev/nvidiaN\` path where \`N\` is the GPU's index reported by \`nvidia-smi\`\*\*.
> 
> This will restore NVENC compatibility and likely benefit other workloads that rely on this path/index alignment.
> 
> \---
> 
> \### 🚫 Partial workaround
> 
> None identified.
> 
> Detecting the mismatch inside user space (via \`nvidia-smi\` + \`ls -l /dev/nvidia\*\`) lets us fail fast, but does not resolve the root problem — NVENC will still fail to initialize.

> **[\#11694 (Multi-GPU: NVDec cant find CUDA device when used inside a docker...](https://trac.ffmpeg.org/ticket/11694)**

> <https://github.com/NVIDIA/open-gpu-kernel-modules/issues/826>
>
> \### NVIDIA Open GPU Kernel Modules Version
> 
> 570.86.16
> 
> \### Please confirm this i…ssue does not happen with the proprietary driver (of the same version). This issue tracker is only for bugs specific to the open kernel driver.
> 
> \- \[x\] I confirm that this does not happen with the proprietary driver package.
> 
> \### Operating System and Version
> 
> Ubuntu 22.04.5 LTS
> 
> \### Kernel Release
> 
> 5.15.0-113-generic 
> 
> \### Please confirm you are running a stable release kernel (e.g. not a -rc). We do not accept bug reports for unreleased kernels.
> 
> \- \[x\] I am running on a stable kernel release.
> 
> \### Hardware: GPU
> 
> NVIDIA GeForce RTX 4090
> 
> \### Describe the bug
> 
> After installing version 570.86.16 of the open GPU kernel modules, I encountered an error when using the NVENC functionality inside a container with Nvidia Container Runtime. The error indicates that the device is unsupported. However, when running the application directly on the host machine, the NVENC feature works correctly.
> 
> I confirm that this does not happen with the proprietary driver package.
> 
> \### To Reproduce
> 
> \`docker run --runtime=nvidia --gpus '"device=0,1"' jrottenberg/ffmpeg:4.1-nvidia -report -loglevel debug -f lavfi -i testsrc=duration=5:size=1280x720:rate=30 -c:v h264\_nvenc -preset fast -y /tmp/test\_output.mp4\`
> 
> !\[Image\](https://github.com/user-attachments/assets/fe76fdce-0f79-4b42-9c4a-d7bd9b0763ac)
> 
> \### Bug Incidence
> 
> Always
> 
> \### nvidia-bug-report.log.gz
> 
> \[nvidia-bug-report.log.gz\](https://github.com/user-attachments/files/19776094/nvidia-bug-report.log.gz)
> 
> \### More Info
> 
> Similar issues were #104 and #378, but the nvenc problem occurs again in the new version of the driver

The above are critical issues where NVENC and NVDEC work on only one GPU with Multi-GPU setups with NVIDIA Container Toolkit in driver versions \>565, which is \>=570.

This is in relation to NVENC crashing (due to not finding a CUDA device) when using multiple NVIDIA GPUs while trying to use any index other than ‘0’. Many efforts tried to only expose devices using NVIDIA\_VISIBLE\_DEVICES envvar and assigning them using index or GPU-UUID.

Only one GPU works (it may be the first GPU, last GPU, or anything in between), and everything else fails in FFmpeg:

```auto
[h264_nvenc @ 0x] OpenEncodeSessionEx failed: unsupported device (2): (no details)
[h264_nvenc @ 0x] No capable devices found

```

Moreover, GStreamer also fails in a similar way when FFmpeg fails:

```auto
nvh264encoder gstnvh264encoder.cpp:2158:gst_nv_h264_encoder_register_cuda:<cudacontext0> Failed to open session
nvh265encoder gstnvh265encoder.cpp:2196:gst_nv_h265_encoder_register_cuda:<cudacontext0> Failed to open session
nvenc gstnvenc.c:685:gst_nv_enc_register: NvEncOpenEncodeSessionEx failed: codec h264, device 0, error code 2
nvenc gstnvenc.c:685:gst_nv_enc_register: NvEncOpenEncodeSessionEx failed: codec h265, device 0, error code 2

```

The above is on driver version 580.82.07 with five NVIDIA Titan Xp GPUs.

Driver versions 565 or 550 work fine, but this is a regression of the driver version 570 or higher; therefore, I am bringing this up in the forum to the driver team.

This is widely known to happen in Kubernetes, but it may also happen in Docker.

CC @amrits @generix

---

<div class="post-metadata">

**Author:** ![ktsong](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@ktsong](https://forums.developer.nvidia.com/u/ktsong)\
**Post date:** [October 23, 2025, 6:03am UTC](https://forums.developer.nvidia.com/t/nvenc-and-nvdec-work-on-only-one-gpu-with-multi-gpu-setups-with-nvidia-container-toolkit-in-driver-565/347361/2 "2025-10-23T06:03:12Z")

</div>

We are also closely monitoring this issue. Based on our test, ffmpeg NVENC functionality within K8S pods is working well on Tesla T4 nodes with multiple GPU cards. Since issue [NVENC Fails in Kubernetes Pods on all but the last GPU with Driver 570.x or 580.x · Issue #1249 · NVIDIA/nvidia-container-toolkit · GitHub](https://github.com/NVIDIA/nvidia-container-toolkit/issues/1249#issuecomment-3254334064) have indicated stable performance on V100 GPUs, and considering the current findings, we suspect there might be some driver-level issues affecting NVENC support for the GeForce series—particularly models like the 3060, 4090, and 5090. We’re continuing to look into this and will provide updates as we learn more.

---

<div class="post-metadata">

**Author:** ![lambdazx](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@lambdazx](https://forums.developer.nvidia.com/u/lambdazx)\
**Post date:** [October 30, 2025, 3:10am UTC](https://forums.developer.nvidia.com/t/nvenc-and-nvdec-work-on-only-one-gpu-with-multi-gpu-setups-with-nvidia-container-toolkit-in-driver-565/347361/3 "2025-10-30T03:10:45Z")

</div>

It has been confirmed that driver version 565.57.01 does not have this issue, but both the 570 and 580 series are affected. What is the current status regarding this problem?

---

<div class="post-metadata">

**Author:** ![jules16](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@jules16](https://forums.developer.nvidia.com/u/jules16)\
**Post date:** [December 8, 2025, 8:08am UTC](https://forums.developer.nvidia.com/t/nvenc-and-nvdec-work-on-only-one-gpu-with-multi-gpu-setups-with-nvidia-container-toolkit-in-driver-565/347361/4 "2025-12-08T08:08:54Z")

</div>

@ktsong I have confirmed that the 580 driver series have the issue on Nvidia RTX 5070 Ti GPUs. This forces us to downgrade drivers and OS. When should we expect a fix?

---

<div class="post-metadata">

**Author:** ![victor.mylle](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@victor.mylle](https://forums.developer.nvidia.com/u/victor.mylle)\
**Post date:** [January 23, 2026, 8:56am UTC](https://forums.developer.nvidia.com/t/nvenc-and-nvdec-work-on-only-one-gpu-with-multi-gpu-setups-with-nvidia-container-toolkit-in-driver-565/347361/5 "2026-01-23T08:56:30Z")

</div>

Is anyone looking into this issue? We are also forced to use older drivers which blocks the use of our newly purchased RTX 5090 GPUs in our cluster …

---

<div class="post-metadata">

**Author:** ![tzmtl](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@tzmtl](https://forums.developer.nvidia.com/u/tzmtl)\
**Post date:** [February 17, 2026, 1:32am UTC](https://forums.developer.nvidia.com/t/nvenc-and-nvdec-work-on-only-one-gpu-with-multi-gpu-setups-with-nvidia-container-toolkit-in-driver-565/347361/6 "2026-02-17T01:32:27Z")

</div>

I’ve figured out why it doesn’t work. It has nothing to do with the mismatch of /dev/nvidiaX between container and host.

When NVENC is initialized, NVENC’s user‑space stack (libnvcuvid/libnvidia-encode) queries the NVIDIA Resource Manager via /dev/nvidiactl and gets an “attached GPU IDs” list (NV0000\_CTRL\_CMD\_GPU\_GET\_ATTACHED\_IDS, cmd 0x201) that includes all host GPUs, even inside a 1‑GPU pod.

When that list contains multiple GPUs, the NVENC open path takes a multi‑GPU/peer‑init branch and tries to touch the other GPU’s device node (/dev/nvidiaY), which is not mounted in the pod.

That peer‑init step fails, so the code bails out before class enumeration (0x00800201) and before allocating the required RM object (class 0xC661), returning NV\_ENC\_ERR\_UNSUPPORTED\_DEVICE even though the target GPU itself is fine.

The issue needs to be fixed by Nvidia.

---

<div class="post-metadata">

**Author:** ![ehfd](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@ehfd](https://forums.developer.nvidia.com/u/ehfd)\
**Post date:** [February 17, 2026, 8:14am UTC](https://forums.developer.nvidia.com/t/nvenc-and-nvdec-work-on-only-one-gpu-with-multi-gpu-setups-with-nvidia-container-toolkit-in-driver-565/347361/7 "2026-02-17T08:14:27Z")

</div>

@amrits @generix Can a ticket be opened in NVIDIA regarding the above for 590, 580, and 570 (all currently supported driver branches affected)?

---

<div class="post-metadata">

**Author:** ![larsen.dhiet](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@larsen.dhiet](https://forums.developer.nvidia.com/u/larsen.dhiet)\
**Post date:** [February 25, 2026, 2:50pm UTC](https://forums.developer.nvidia.com/t/nvenc-and-nvdec-work-on-only-one-gpu-with-multi-gpu-setups-with-nvidia-container-toolkit-in-driver-565/347361/8 "2026-02-25T14:50:20Z")

</div>

I can also confirm this problem. This issue currently prohibits us from bumping drivers in our cluster and start using 5090s - would be great if this is fixed ASAP!

---

<div class="post-metadata">

**Author:** ![tzmtl](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@tzmtl](https://forums.developer.nvidia.com/u/tzmtl)\
**Post date:** [February 27, 2026, 10:50pm UTC](https://forums.developer.nvidia.com/t/nvenc-and-nvdec-work-on-only-one-gpu-with-multi-gpu-setups-with-nvidia-container-toolkit-in-driver-565/347361/9 "2026-02-27T22:50:56Z")

</div>

I did more investigation, figured out the internal logic.

1. libnvidia-encode.so calls libnvcuvid.so to setup/init GPUs
2. libnvcuvid.so communicates with RM via /dev/nvidiactl, and it can see all GPUs
3. When there are multiple GPUs available, it picks one as “primary” GPU. That’s the GPU with the “lexicographically smallest” uuid. Even if it can get which GPU is really available from libcuda.so

So, when you have multiple GPUs in the host. Only the container which has the “smallest” GPU uuid works.

It doesn’t mean in the host NVENC can only works on one GPU. That “primary” GPU setup is only during GPU init phase. If that phase passes, real nvenc coding work can be done on non primary GPU.

I’m not sure if it’s intended, since it has been long time no fix from Nvidia.

---

<div class="post-metadata">

**Author:** ![ehfd](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@ehfd](https://forums.developer.nvidia.com/u/ehfd)\
**Post date:** [June 9, 2026, 4:01am UTC](https://forums.developer.nvidia.com/t/nvenc-and-nvdec-work-on-only-one-gpu-with-multi-gpu-setups-with-nvidia-container-toolkit-in-driver-565/347361/10 "2026-06-09T04:01:15Z")

</div>

@aplattner @amrits @generix

Hi,

Could the driver team please forward the request below to backport the 610 fix regarding NVENC in containers to 595 and 580? 580 is the last long-term supported version for Maxwell, Pascal, and Volta, and we cannot use earlier drivers due to likely vulnerabilities which will not be fixed.

[https://github.com/NVIDIA/k8s-device-plugin/issues/1282#issuecomment-4653345876](https://github.com/NVIDIA/k8s-device-plugin/issues/1282#issuecomment-4653345876)

[https://github.com/NVIDIA/k8s-device-plugin/issues/1282#issuecomment-4655450391](https://github.com/NVIDIA/k8s-device-plugin/issues/1282#issuecomment-4655450391)

> The LD\_PRELOAD solution is a neat trick. But the suggestion that container-toolkit should filter the library call is an unlikely path forward as container-toolkit shouldn’t interfere with driver’s behaviour (however wrong).  
> The fix certainly belongs in the driver in terms of listing the IDs explicitly exposed to the environment.  
> 610.x versions seem to have the fix. While I need to verify the 610.x fix, I am inclined to mark this issue as ‘Closed’ with the interpretation that it “won’t be fixed in container-toolkit”.
> 
> Users who are still facing the issue have a few options:
> 
> Downgrade the driver to 565.x and prior  
> Use LD\_PRELOAD to intercept the ResourceManager call (details in this comment)  
> use NVIDIA\_VISIBLE\_DEVICES env var (boo :))  
> Use 610.x drivers (not tested yet)  
> Please re-open the issue if anyone feels even slightly otherwise.

> Is it possible to backport the fixes to 595 and 580? Most importantly, 580 is the only long-term supported driver for Pascal and Maxwell GPUs.
> 
> That’s not in our control as we are not a part of the driver team. Our team’s work is focused on GPU enablement in containers and Kubernetes The NVIDIA dev forums will is the right place to make this request.

---

<div class="post-metadata">

**Author:** ![stephane.piquemal](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@stephane.piquemal](https://forums.developer.nvidia.com/u/stephane.piquemal)\
**Post date:** [July 22, 2026, 1:49pm UTC](https://forums.developer.nvidia.com/t/nvenc-and-nvdec-work-on-only-one-gpu-with-multi-gpu-setups-with-nvidia-container-toolkit-in-driver-565/347361/11 "2026-07-22T13:49:12Z")

</div>

Hi,  
I’ve been testing the 610.43.03 drivers with a machine using 3 RTX 2070 and I can tell the NVENC issue described above is **not fixed** at all. Only the container using the GPU with the smaller UUID is able to use NVENC.

---

<div class="post-metadata">

**Author:** ![yeziqi](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@yeziqi](https://forums.developer.nvidia.com/u/yeziqi)\
**Post date:** [August 7, 2026, 12:57pm UTC](https://forums.developer.nvidia.com/t/nvenc-and-nvdec-work-on-only-one-gpu-with-multi-gpu-setups-with-nvidia-container-toolkit-in-driver-565/347361/12 "2026-08-07T12:57:43Z")

</div>

We’re currently experiencing the same problem under **580.126.20** , however the issue only happened on our 8x 4090 GPUs machine, another 8x PRO 5000 machine works fine. Seems matches the conclusion above. We tried to set **NVIDIA\_VISIBLE\_DEVICES value: “all”** to partially solved our specific problem(Isaac sim WebRTC disconnect), but it will lead to the graphics become very noisy.

---

<div class="post-metadata">

**Author:** ![stephane.piquemal](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@stephane.piquemal](https://forums.developer.nvidia.com/u/stephane.piquemal)\
**Post date:** [August 13, 2026, 8:52am UTC](https://forums.developer.nvidia.com/t/nvenc-and-nvdec-work-on-only-one-gpu-with-multi-gpu-setups-with-nvidia-container-toolkit-in-driver-565/347361/13 "2026-08-13T08:52:40Z")

</div>

I updated my drivers to the newly released 610.57.04 and the NVENC issue described above is still present.
