[GH-ISSUE #8647] ollama[2075]: cuda driver library failed to get device context 999time=2025-01-29T03:21:43.859+01:00 level=WARN source=gpu.go:449 msg="error looking up nvidia GPU memory" #67657

Closed
opened 2026-05-04 11:14:36 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @kurdo2000 on GitHub (Jan 29, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/8647

What is the issue?

Hi,

is my GPU not supported or what's the error?

+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.120 Driver Version: 550.120 CUDA Version: 12.4 |
|-----------------------------------------+------------------------+----------------------+
| 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 1660 Off | 00000000:01:00.0 On | N/A |
| 0% 48C P0 17W / 130W | 1602MiB / 6144MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| 0 N/A N/A 2627 G /usr/lib/xorg/Xorg 1032MiB |
| 0 N/A N/A 2853 G /usr/bin/gnome-shell 79MiB |
| 0 N/A N/A 3461 G /usr/libexec/xdg-desktop-portal-gnome 108MiB |
| 0 N/A N/A 4054 G ...irefox/4793/usr/lib/firefox/firefox 203MiB |
| 0 N/A N/A 25159 G /usr/bin/nautilus 40MiB |
| 0 N/A N/A 106416 G ...erProcess --variations-seed-version 82MiB |
+-----------------------------------------------------------------------------------------+

nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Tue_Oct_29_23:50:19_PDT_2024
Cuda compilation tools, release 12.6, V12.6.85
Build cuda_12.6.r12.6/compiler.35059454_0

If you still need more context, please ask. I'm new here.

OS

Linux

GPU

Nvidia

CPU

Intel

Ollama version

0.5.7

Originally created by @kurdo2000 on GitHub (Jan 29, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/8647 ### What is the issue? Hi, is my GPU not supported or what's the error? +-----------------------------------------------------------------------------------------+ | NVIDIA-SMI 550.120 Driver Version: 550.120 CUDA Version: 12.4 | |-----------------------------------------+------------------------+----------------------+ | 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 1660 Off | 00000000:01:00.0 On | N/A | | 0% 48C P0 17W / 130W | 1602MiB / 6144MiB | 0% Default | | | | N/A | +-----------------------------------------+------------------------+----------------------+ +-----------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=========================================================================================| | 0 N/A N/A 2627 G /usr/lib/xorg/Xorg 1032MiB | | 0 N/A N/A 2853 G /usr/bin/gnome-shell 79MiB | | 0 N/A N/A 3461 G /usr/libexec/xdg-desktop-portal-gnome 108MiB | | 0 N/A N/A 4054 G ...irefox/4793/usr/lib/firefox/firefox 203MiB | | 0 N/A N/A 25159 G /usr/bin/nautilus 40MiB | | 0 N/A N/A 106416 G ...erProcess --variations-seed-version 82MiB | +-----------------------------------------------------------------------------------------+ nvcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2024 NVIDIA Corporation Built on Tue_Oct_29_23:50:19_PDT_2024 Cuda compilation tools, release 12.6, V12.6.85 Build cuda_12.6.r12.6/compiler.35059454_0 If you still need more context, please ask. I'm new here. ### OS Linux ### GPU Nvidia ### CPU Intel ### Ollama version 0.5.7
GiteaMirror added the bugnvidia labels 2026-05-04 11:14:37 -05:00
Author
Owner

@rick-github commented on GitHub (Jan 29, 2025):

GeForce GTX 1660 has compute capacity of 7.5 so should be supported.

The 999 error is a generic "unknown error" code, which isn't super helpful. What happens if you try removing the uvm module:

sudo systemctl stop ollama
sudo rmmod nvidia_uvm
sudo modprobe nvidia_uvm
sudo systemctl start ollama
``
<!-- gh-comment-id:2621284077 --> @rick-github commented on GitHub (Jan 29, 2025): GeForce GTX 1660 has compute capacity of 7.5 so should be supported. The 999 error is a generic "unknown error" code, which isn't super helpful. What happens if you try removing the uvm module: ``` sudo systemctl stop ollama sudo rmmod nvidia_uvm sudo modprobe nvidia_uvm sudo systemctl start ollama ``
Author
Owner

@kurdo2000 commented on GitHub (Jan 30, 2025):

@rick-github thanks for your response. I'll close this as I stopped using ollama.. I'm donig fine with llama.cpp and don't wanna mess nvidia configs anymore.

<!-- gh-comment-id:2623420494 --> @kurdo2000 commented on GitHub (Jan 30, 2025): @rick-github thanks for your response. I'll close this as I stopped using ollama.. I'm donig fine with llama.cpp and don't wanna mess nvidia configs anymore.
Author
Owner

@krishnareddyML commented on GitHub (Feb 5, 2025):

Any solution to this problem, i am also facing same issue when run ollama from langchain continuously for 200 calls its getting hang up and giving same above error.

<!-- gh-comment-id:2635718820 --> @krishnareddyML commented on GitHub (Feb 5, 2025): Any solution to this problem, i am also facing same issue when run ollama from langchain continuously for 200 calls its getting hang up and giving same above error.
Author
Owner

@The-LittleTeapot commented on GitHub (Apr 29, 2025):

I am also plagued by the same error:

cuda driver library failed to get device context 46time=2025-04-29T16:46:07.633+03:00 level=WARN source=gpu.go:434 msg="error looking up nvidia GPU memory"

<!-- gh-comment-id:2838996418 --> @The-LittleTeapot commented on GitHub (Apr 29, 2025): I am also plagued by the same error: `cuda driver library failed to get device context 46time=2025-04-29T16:46:07.633+03:00 level=WARN source=gpu.go:434 msg="error looking up nvidia GPU memory"`
Author
Owner

@rick-github commented on GitHub (Apr 29, 2025):

cudaErrorDevicesUnavailable = 46

  • This indicates that all CUDA devices are busy or unavailable at the current time. Devices are often
    busy/unavailable due to use of cudaComputeModeProhibited, cudaComputeModeExclusiveProcess,
    or when long running CUDA kernels have filled up the GPU and are blocking new work from starting.
    They can also be unavailable due to memory constraints on a device that already has active CUDA
    work being performed.
<!-- gh-comment-id:2839017378 --> @rick-github commented on GitHub (Apr 29, 2025): cudaErrorDevicesUnavailable = 46 - This indicates that all CUDA devices are busy or unavailable at the current time. Devices are often busy/unavailable due to use of [cudaComputeModeProhibited](https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__TYPES.html#group__CUDART__TYPES_1gg7eb25f5413a962faad0956d92bae10d0fc71b88518e4501544d6e65b5f3671b6), [cudaComputeModeExclusiveProcess](https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__TYPES.html#group__CUDART__TYPES_1gg7eb25f5413a962faad0956d92bae10d02cd032834fecbec513ea1018145b111d), or when long running CUDA kernels have filled up the GPU and are blocking new work from starting. They can also be unavailable due to memory constraints on a device that already has active CUDA work being performed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#67657