ollama - 💡(How to fix) Fix ollama Unable to detect NVIDIA/AMD GPU [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
ollama/ollama#14661Fetched 2026-04-08 00:33:13
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Participants
Timeline (top)
closed ×1labeled ×1

Code Example

(main) root@C.32098470:/workspace$ curl -fsSL https://ollama.com/install.sh | sh
>>> Cleaning up old version at /usr/local/lib/ollama
>>> Installing ollama to /usr/local
>>> Downloading ollama-linux-amd64.tar.zst
#################################################################################################################################################################################################### 100.0%
>>> Adding ollama user to render group...
>>> Adding ollama user to video group...
>>> Adding current user to ollama group...
>>> Creating ollama systemd service...
WARNING: systemd is not running
WARNING: Unable to detect NVIDIA/AMD GPU. Install lspci or lshw to automatically detect and install GPU dependencies.
>>> The Ollama API is now available at 127.0.0.1:11434.
>>> Install complete. Run "ollama" from the command line.



my gpu
(main) root@C.32098470:/workspace$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2025 NVIDIA Corporation
Built on Tue_May_27_02:21:03_PDT_2025
Cuda compilation tools, release 12.9, V12.9.86
Build cuda_12.9.r12.9/compiler.36037853_0

+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 575.64.03              Driver Version: 575.64.03      CUDA Version: 12.9     |
|-----------------------------------------+------------------------+----------------------+
| 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 RTX 5090        On  |   00000000:16:00.0 Off |                  N/A |
| 55%   30C    P8             16W /  575W |   27855MiB /  32607MiB |      0%      Default |
|                                         |                        |                  N/A |
RAW_BUFFERClick to expand / collapse

What is the issue?

ollama Unable to detect NVIDIA GPU

(main) [email protected]:/workspace$ ollama -v Warning: could not connect to a running Ollama instance Warning: client version is 0.17.6

Relevant log output

(main) [email protected]:/workspace$ curl -fsSL https://ollama.com/install.sh | sh
>>> Cleaning up old version at /usr/local/lib/ollama
>>> Installing ollama to /usr/local
>>> Downloading ollama-linux-amd64.tar.zst
#################################################################################################################################################################################################### 100.0%
>>> Adding ollama user to render group...
>>> Adding ollama user to video group...
>>> Adding current user to ollama group...
>>> Creating ollama systemd service...
WARNING: systemd is not running
WARNING: Unable to detect NVIDIA/AMD GPU. Install lspci or lshw to automatically detect and install GPU dependencies.
>>> The Ollama API is now available at 127.0.0.1:11434.
>>> Install complete. Run "ollama" from the command line.



my gpu
(main) [email protected]:/workspace$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2025 NVIDIA Corporation
Built on Tue_May_27_02:21:03_PDT_2025
Cuda compilation tools, release 12.9, V12.9.86
Build cuda_12.9.r12.9/compiler.36037853_0

+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 575.64.03              Driver Version: 575.64.03      CUDA Version: 12.9     |
|-----------------------------------------+------------------------+----------------------+
| 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 RTX 5090        On  |   00000000:16:00.0 Off |                  N/A |
| 55%   30C    P8             16W /  575W |   27855MiB /  32607MiB |      0%      Default |
|                                         |                        |                  N/A |

OS

No response

GPU

No response

CPU

No response

Ollama version

No response

extent analysis

Fix Plan

To resolve the issue of Ollama being unable to detect the NVIDIA GPU, follow these steps:

  1. Install lspci or lshw: These tools are required for automatic detection and installation of GPU dependencies.

    • For Ubuntu/Debian: apt update && apt install lspci
    • For CentOS/RHEL: yum install pciutils
    • For Fedora: dnf install pciutils
  2. Ensure NVIDIA Drivers are Properly Installed:

    • Verify that the NVIDIA drivers are correctly installed and recognized by the system.
    • The provided nvidia-smi output suggests that the drivers are installed, but ensure they match the CUDA version used by Ollama.
  3. Restart the System:

    • After installing lspci or lshw and verifying the NVIDIA driver installation, restart the system to ensure all changes take effect.
  4. Reinstall Ollama:

    • After the system restarts, reinstall Ollama using the installation script: curl -fsSL https://ollama.com/install.sh | sh
    • This step ensures that Ollama can detect and configure itself with the newly installed dependencies.
  5. Verify Ollama Detection:

    • Run ollama -v to check if Ollama can now detect the NVIDIA GPU.

Example Code Snippet

No specific code changes are required for this issue. However, you can verify the GPU detection by checking the output of lspci | grep -i nvidia or nvidia-smi after installing the necessary tools and restarting the system.

Verification

  • After completing the above steps, run ollama -v to verify that Ollama can detect the NVIDIA GPU.
  • Check the Ollama logs for any errors related to GPU detection.

Extra Tips

  • Ensure that your system's BIOS settings allow the GPU to be visible to the operating system.
  • If using a virtual machine, verify that the GPU is properly passed through to the VM.
  • Keep your system and GPU drivers up to date to avoid compatibility issues with Ollama.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING