NVIDIA / NVIDIA/open-gpu-kernel-modules

CUDA initialization failiure on latest release drivers

Open
#797 27 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C
Stars
17.4k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

NVIDIA Open GPU Kernel Modules Version

570.86.16 [Edit: Still failing on 570.124.04]

Please confirm this issue does not happen with the proprietary driver (of the same version). This issue tracker is only for bugs specific to the open kernel driver.
  • I confirm that this does not happen with the proprietary driver package.
Operating System and Version

NixOS 25.05 (Warbler)

Kernel Release

Linux 6.13.4 #1-NixOS SMP PREEMPT_DYNAMIC Fri Feb 21 13:11:21 UTC 2025 x86_64 GNU/Linux

Please confirm you are running a stable release kernel (e.g. not a -rc). We do not accept bug reports for unreleased kernels.
  • I am running on a stable kernel release.
Hardware: GPU

NVIDIA GeForce RTX 3080 Laptop GPU

Describe the bug

The specific issue seems to have first been described here: https://github.com/NVIDIA/open-gpu-kernel-modules/discussions/780

When attempting to initialize NVDEC/CUDA in any capacity:

cu->cuInit(0) failed -> CUDA_ERROR_NOT_INITIALIZED: initialization

or

        53.376880366 [2624-2624] ../src/direct/nv-driver.c: 295            init_nvdriver Initing nvdriver...
        53.376904963 [2624-2624] ../src/direct/nv-driver.c: 313            init_nvdriver NVIDIA kernel driver version: 570.86.16, major version: 570, minor version: 86
        53.376909963 [2624-2624] ../src/direct/nv-driver.c: 320            init_nvdriver Got dev info: 100 1 2 6
        53.386246461 [2624-2624] ../src/direct/direct-export-buf.c:  27       findGPUIndexFromFd CUDA ERROR 'initialization error' (3)

        53.386254391 [2624-2624] ../src/vabackend.c:2252       __vaDriverInit_1_0 CUDA ERROR 'initialization error' (3)

is returned.

This does not occur on proprietary kernel.

Setting "uvm_disable_hmm=1" on open kernel, as described in the above link, SOMETIMES worksaround/solves the issue.

To Reproduce

This occurred when using any program trying to use CUDA/NVDEC.

I ran into it while using:

ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -i input.mp4 -c:a copy -c:v h264_nvenc -b:v 5M output.mp4

which would return

[AVHWDeviceContext @ 0x359865c0] cu->cuInit(0) failed -> CUDA_ERROR_NOT_INITIALIZED: initialization error.

Similar initialization error would occur when invoking "vainfo" [through nvidia-vaapi-driver]:

        53.376880366 [2624-2624] ../src/direct/nv-driver.c: 295            init_nvdriver Initing nvdriver...
        53.376904963 [2624-2624] ../src/direct/nv-driver.c: 313            init_nvdriver NVIDIA kernel driver version: 570.86.16, major version: 570, minor version: 86
        53.376909963 [2624-2624] ../src/direct/nv-driver.c: 320            init_nvdriver Got dev info: 100 1 2 6
        53.386246461 [2624-2624] ../src/direct/direct-export-buf.c:  27       findGPUIndexFromFd CUDA ERROR 'initialization error' (3)

        53.386254391 [2624-2624] ../src/vabackend.c:2252       __vaDriverInit_1_0 CUDA ERROR 'initialization error' (3)
Bug Incidence

Always

nvidia-bug-report.log.gz

nvidia-bug-report-BUG.log.gz

nvidia-bug-report-SUCCESSFUL-EX.log.gz

nvidia-bug-report-FAILURE-WITH-UVM-DISABLE-HMM.log.gz

Success generated on open kernel with uvm_disable_hmm=1, which also still sometimes fails to fix

More Info

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the CUDA/NVDEC reproducer, the attached nvidia-bug-report logs, and the linked discussion about uvm_disable_hmm=1; compare the failing and successful open-driver runs with the proprietary-driver behavior. Done means CUDA and NVDEC initialize reliably on the open kernel driver without requiring the workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, linux
Domain
operating-systems
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.