Independent tech intelligence, checked against primary sources.

TechPulseMind Useful technology.
No manufactured hype.

How to fix Ollama not detecting your NVIDIA GPU after Linux suspend

Ollama can fall back to CPU after a Linux suspend/resume cycle. The documented fix is reloading the NVIDIA UVM driver with rmmod and modprobe.

How to fix Ollama not detecting your NVIDIA GPU after Linux suspend

Before you start: versions, package names and storage identifiers change over time. Check the commands against the official documentation for your setup before running them, especially anything that creates, deletes or overwrites data.

If you suspend and resume your Linux machine and Ollama suddenly stops using your NVIDIA GPU, falling back to the CPU, you are hitting a driver bug the documentation acknowledges. The fix is to reload the NVIDIA UVM driver, and it takes two commands.

The symptom: Ollama falls back to CPU after resume

According to Ollama’s hardware support documentation, on Linux, after a suspend/resume cycle, sometimes Ollama will fail to discover your NVIDIA GPU and fallback to running on the CPU. The documentation describes this as a driver bug rather than an Ollama configuration error, which is why the workaround targets the NVIDIA driver and not Ollama’s settings.

The fix: reload the NVIDIA UVM driver

Ollama’s documented workaround is to reload the NVIDIA UVM driver. Run these two commands on the host:

  • Unload the module: sudo rmmod nvidia_uvm
  • Load it again: sudo modprobe nvidia_uvm

The documentation gives the combined form as sudo rmmod nvidia_uvm && sudo modprobe nvidia_uvm. After the module is reloaded, Ollama should be able to discover the GPU again instead of falling back to CPU inference.

Worth checking before you blame suspend

Not every missing-GPU case is the resume bug. Ollama supports Nvidia GPUs with compute capability 5.0+ and driver version 550 and newer, and cards with compute capability 5.0 through 6.2 require driver version 570 or newer. If your driver is older than those thresholds, reloading the UVM module will not help.

If you have more than one NVIDIA GPU and want to limit Ollama to a subset, set CUDA_VISIBLE_DEVICES to a comma-separated list of GPUs. Numeric IDs work, but the documentation notes ordering may vary, so UUIDs are more reliable; you can find them with nvidia-smi -L. To ignore the GPUs entirely and force CPU usage, use an invalid GPU ID such as -1.

Full details are in Ollama’s hardware support documentation, which also points to the development page for building locally to support older GPUs.

Sources

Some links on this page may be affiliate links. If you buy through them we may earn a commission at no extra cost to you. See our affiliate disclosure.