Skip to content

AI & Automation

Ollama Not Using GPU? How to Check and Fix It (Windows, Mac and Linux)

Ollama running on CPU instead of GPU? Check with ollama ps and the server log, then fix drivers, VRAM limits, Linux and Docker issues. For v0.40.16.

An overheating computer processor next to an idle, unplugged graphics card.

You’ve installed Ollama so you can run AI on your own computer, but answers are slow. Your computer’s main processor is working hard, and your graphics card — the part that’s usually much faster at this — is sitting idle.

This guide helps you check whether Ollama is actually using your GPU (that’s the graphics chip), and fix it if it isn’t.

In this guide you’ll learn:

  • How to check, with a simple command and a log file, whether the model is running on the GPU, the CPU (the main processor), or a bit of both.
  • The usual reasons it falls back to the slower option: an unsupported card, a driver that’s too old, or a model that’s too big for the card’s memory (that’s called VRAM).
  • On Linux, extra checks such as the GPU disappearing after the computer sleeps, missing permissions, or a container that hasn’t been given access to the GPU.
  • The official fixes for Windows, Mac, Linux and Docker.

By the end, you should know where the model is running, and what to change if it isn’t using your graphics card. If you’re new to Ollama, start with our beginner’s guide — there’s a link just below.

Who this guide is for

  • People who installed Ollama and find responses slow, or see high CPU and an idle graphics card.
  • Gamers and creators with an NVIDIA or AMD card who expected it to be used.
  • Linux and Docker users whose GPU worked before and then stopped.

New to Ollama? Start with our beginner’s guide to running a local AI model with Ollama.

What you need before you start

  • Ollama installed and working (on CPU is fine).
  • A model you’ve already downloaded.
  • To know your GPU model:
    • Windows: Task Manager → Performance → GPU.
    • Linux: nvidia-smi for NVIDIA, or rocminfo for AMD ROCm.
    • Mac: Apple menu → About This Mac.
  • Permission to update drivers, plus admin or sudo access on Linux.

Contents

  1. Check where the model is running
  2. Confirm your GPU is supported
  3. Update your GPU driver
  4. Make sure the model fits in VRAM
  5. Read the server log for GPU discovery errors
  6. Linux fixes: suspend/resume, permissions and drivers
  7. Docker fixes
  8. Choose or exclude specific GPUs
  9. Common errors
  10. Troubleshooting checklist
  11. Alternatives and limitations
  12. FAQ

Step 1: Check where the model is running

  1. Start a chat so the model loads, for example ollama run gemma4:e2b. In a second terminal, run:

    ollama ps
    
  2. Read the PROCESSOR column. According to Ollama’s FAQ:

    PROCESSOR shows Meaning
    100% GPU The model is loaded entirely on the GPU. This is the goal.
    100% CPU The model is loaded entirely in system memory, so the GPU isn’t used
    48%/52% CPU/GPU (any split) The model is split between system memory and the GPU, usually because it doesn’t fit in VRAM
  3. Cross-check the server log (see Step 5). On our test machine, which has no GPU, ollama ps showed:

    NAME                   ID              SIZE      PROCESSOR          CONTEXT    RUNNER      UNTIL
    smollm2-test:latest    5f8d559adb61    251 MB    79%/21% CPU/GPU    4096       llamacpp    4 minutes from now
    

    The server log showed only the CPU backend: inference compute id=cpu library=cpu and CPU model buffer. The "GPU" share (about 51 MiB) matched exactly the size of an AMX model buffer line in the log. AMX is a matrix-acceleration feature built into some Intel server CPUs. So on some CPUs, the PROCESSOR column can show a GPU share when no GPU is involved. Trust the log over the summary.

Step 2: Confirm your GPU is supported

Here’s what Ollama’s hardware guide says your computer needs:

GPU Requirement
NVIDIA Compute capability 5.0 or higher and driver 550 or newer. Cards with compute capability 5.0 to 6.2 need driver 570 or newer. Look up your card’s compute capability on NVIDIA’s CUDA GPUs page.
NVIDIA on Windows Ollama’s Windows page lists driver 551.61 or newer
AMD on Linux ROCm-supported Radeon/Instinct GPUs with the AMD ROCm v7 driver. Other AMD GPUs may work through Vulkan.
AMD on Windows An AMD ROCm v7 / HIP7-capable driver stack. Other AMD GPUs may work through Vulkan.
Apple GPU acceleration via Metal on Apple-silicon (M-series) Macs. Intel Macs run on CPU only.
Intel and other GPUs Supported through Vulkan on Windows and Linux. Ollama enables Vulkan by default when the backend is installed.

If your card isn’t listed (for example an old NVIDIA card with compute capability below 5.0), Ollama’s prebuilt version won’t use it. Ollama’s docs point to building from source for older GPUs. That’s an advanced option and isn’t covered here.

Laptops with integrated graphics: Ollama’s server help lists an OLLAMA_IGPU_ENABLE setting ("Enable integrated GPUs"). Integrated GPUs share system memory, so the speed-up may be small. Not tested.

Step 3: Update your GPU driver

Ollama’s troubleshooting page says that in general, running the latest driver gives the best results. It’s the most common fix.

  • NVIDIA (Windows or Linux): install the latest driver from NVIDIA or your distribution, then reboot.
  • AMD on Linux: Ollama’s docs say to install or upgrade to the ROCm v7 driver with AMD’s amdgpu-install utility, then reboot and restart Ollama.
  • AMD on Windows: update to an AMD driver that provides the ROCm v7 / HIP 7 support Ollama requires. Otherwise Ollama may fall back to Vulkan or the CPU.
  • Mac: GPU support comes with macOS. Keep macOS updated (Ollama needs Sonoma 14 or newer).

After updating, restart Ollama (quit and reopen the app, or run sudo systemctl restart ollama on Linux), load the model again and re-run ollama ps.

We have not run these driver steps on an NVIDIA Windows PC or an AMD Linux machine; follow the current vendor and Ollama docs for your card.

Step 4: Make sure the model fits in VRAM

A CPU/GPU split, or 100% CPU on a supported card, often just means the model doesn’t fit in GPU memory.

  1. Compare the model’s SIZE in ollama ps with your GPU’s VRAM. Check VRAM in Task Manager (Windows) or with nvidia-smi (NVIDIA).
  2. Try a smaller model or tag. For example, Ollama’s quickstart recommends 8 GB of VRAM (or unified memory) for gemma4:e2b.
  3. Remember that the context window uses memory too. Ollama’s quickstart notes that larger context windows need more memory. In v0.40.16, ollama serve --help describes the default context as "4k/32k/256k based on VRAM", which you can override with OLLAMA_CONTEXT_LENGTH. If you raised the context length, lower it and test again.
  4. Close other GPU-heavy apps (games, video editors) and check again.

Step 5: Read the server log for GPU discovery errors

When Ollama starts, it takes an inventory of your GPUs. The log tells you what it found.

OS Where the log is
Windows %LOCALAPPDATA%\Ollama\server.log (press Win+R and type explorer %LOCALAPPDATA%\Ollama)
macOS ~/.ollama/logs/server.log, or run cat ~/.ollama/logs/server.log
Linux (systemd) journalctl -u ollama --no-pager --follow --pager-end
Docker docker logs <container-name>
Manual ollama serve Printed in that terminal

Look for the inference compute line. On our CPU-only test machine it read:

msg="inference compute" id=cpu library=cpu ... total="15.6 GiB" available="8.9 GiB"
msg="vram-based default context" total_vram="0 B" default_num_ctx=4096

library=cpu and total_vram="0 B" mean no usable GPU was found. On a machine where the GPU is detected, expect this line to name your GPU and a GPU library instead. To be confirmed with a screenshot from a GPU test machine.

Turn on debug logging for more detail on GPU discovery:

  • Windows: quit Ollama from the tray menu, then in PowerShell run:

    $env:OLLAMA_DEBUG="1"
    & "ollama app.exe"
    
  • Linux (systemd): run sudo systemctl edit ollama, add the lines below under [Service], then run sudo systemctl daemon-reload and sudo systemctl restart ollama.

    [Service]
    Environment="OLLAMA_DEBUG=1"
    
  • macOS: quit the app, then run launchctl setenv OLLAMA_DEBUG 1 and reopen Ollama. Ollama’s FAQ describes launchctl setenv for setting server variables on Mac. Not tested.

Step 6: Linux fixes: suspend/resume, permissions and drivers

GPU lost after sleep (NVIDIA). Ollama’s docs describe a driver bug: after a suspend/resume cycle, Ollama sometimes can’t find the NVIDIA GPU and falls back to CPU. The workaround is to reload the NVIDIA UVM driver:

sudo rmmod nvidia_uvm && sudo modprobe nvidia_uvm

NVIDIA initialisation errors. If the log shows error codes such as 3 (not initialized), 46 (device unavailable), 100 (no device) or 999 (unknown), Ollama’s troubleshooting page suggests:

  1. Check the UVM driver is loaded: sudo nvidia-modprobe -u
  2. Reload it: sudo rmmod nvidia_uvm, then sudo modprobe nvidia_uvm
  3. Reboot.
  4. Install the latest NVIDIA driver.
  5. For more detail, set CUDA_ERROR_LEVEL=50, and check sudo dmesg | grep -i nvrm and sudo dmesg | grep -i nvidia.

AMD permissions. On Linux, AMD GPU access usually requires membership of the video and/or render group (to access /dev/kfd). Ollama reports a permissions problem in the server log. With Vulkan on some distributions, the ollama user may need to be in the render group. A typical command is sudo usermod -aG render,video ollama, followed by restarting the service. That command is standard Linux, not from Ollama’s docs.

AMD driver too old. If the log shows failure during GPU discovery ... failed to finish discovery before timeout, Ollama’s docs say the AMD kernel driver is probably too old for the ROCm 7 libraries Ollama bundles. Upgrade to ROCm v7 with amdgpu-install, reboot and restart Ollama.

Unsupported AMD GPU (advanced). For ROCm, Ollama documents HSA_OVERRIDE_GFX_VERSION, which tells ROCm to use a close supported target. Its example: HSA_OVERRIDE_GFX_VERSION="10.3.0" for an RX 5400. This is experimental, so test carefully.

Vulkan VRAM reporting. Ollama’s docs say Vulkan needs extra capabilities (or root) to report available VRAM. Without them, Ollama uses approximate model sizes to schedule work. To grant the capability:

sudo setcap cap_perfmon+ep /usr/local/bin/ollama

Adjust the path if your ollama binary is somewhere else (which ollama).

Step 7: Docker fixes

  • NVIDIA: install the NVIDIA Container Toolkit on the host, then start the container with GPU access, as in Ollama’s Docker docs:

    docker run -d --gpus=all -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
    

    If docker run --gpus all ubuntu nvidia-smi doesn’t work on your host, Ollama won’t see the GPU inside a container either.

  • AMD: Ollama’s Docker docs use the rocm image tag and pass the AMD devices through:

    docker run -d --device /dev/kfd --device /dev/dri -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama:rocm
    

    On some Linux distributions SELinux blocks containers from using the GPU. Ollama’s docs suggest running sudo setsebool container_use_devices=1 on the host.

  • Vulkan: Ollama’s Docker docs say Vulkan is bundled into the ollama/ollama image, and enabled by default when the container can access the GPU devices.

  • GPU works at first, then switches to CPU: Ollama’s troubleshooting page says this can be fixed by disabling systemd cgroup management in Docker. Add "exec-opts": ["native.cgroupdriver=cgroupfs"] to /etc/docker/daemon.json on the host, then restart Docker.

  • Docker Desktop on Mac: Ollama’s FAQ says GPU acceleration isn’t available there, because Docker Desktop on macOS has no GPU passthrough. Run the native Ollama app instead to use the Mac’s GPU.

Docker steps not tested by ConvertCortex.

Step 8: Choose or exclude specific GPUs

You want to… Setting (on the Ollama server)
Use only certain NVIDIA GPUs CUDA_VISIBLE_DEVICES = comma-separated IDs. UUIDs from nvidia-smi -L are more reliable than numbers.
Use only certain AMD (ROCm) GPUs ROCR_VISIBLE_DEVICES. List devices with rocminfo.
Use only certain Vulkan GPUs GGML_VK_VISIBLE_DEVICES = numeric IDs
Skip an unstable integrated GPU on a mixed laptop Keep Vulkan on and set GGML_VK_VISIBLE_DEVICES to the discrete GPU’s index (Ollama’s example: 1 when Vulkan1 is the discrete GPU)
Turn off Vulkan GPUs OLLAMA_VULKAN=0 or GGML_VK_VISIBLE_DEVICES=-1
Force CPU only (for testing) An invalid ID such as CUDA_VISIBLE_DEVICES=-1

Set these the same way as other Ollama server variables: Windows user environment variables, launchctl setenv on Mac, or systemctl edit ollama on Linux. Then restart Ollama. A wrong value in one of these variables is a common reason a working GPU suddenly "disappears", so check for leftovers.

Common errors

Symptom / log message Likely cause Fix
ollama ps shows 100% CPU No supported GPU detected, or the model doesn’t fit Steps 2 to 5
Split such as 48%/52% CPU/GPU The model is partly offloaded to system RAM Use a smaller model or a shorter context (Step 4)
GPU share shown on a machine with no GPU (seen in our test) The summary counted a CPU acceleration buffer Check the server log (Step 5)
Error codes 3, 46, 100 or 999 in the log (NVIDIA, Linux) Driver or UVM initialisation problem Step 6
failure during GPU discovery ... failed to finish discovery before timeout AMD driver older than ROCm 7 Upgrade to ROCm v7 (Step 6)
GPU works until the laptop sleeps NVIDIA UVM suspend/resume bug Reload nvidia_uvm (Step 6)
GPU in Docker stops working after a while systemd cgroup management native.cgroupdriver=cgroupfs (Step 7)
Characters like ←[?25h←[?25l in the Windows terminal Old Windows 10 terminal bug (e.g. 21H1) Update Windows. This is a display issue, not a GPU issue.

Troubleshooting checklist

  1. ollama ps while a model is loaded: what does PROCESSOR say?
  2. Server log inference compute line: which library and how much VRAM?
  3. Is your GPU in Ollama’s supported list, with the minimum driver?
  4. Driver updated and computer rebooted and Ollama restarted?
  5. Is the model (plus context) smaller than your free VRAM?
  6. Any leftover CUDA_VISIBLE_DEVICES, ROCR_VISIBLE_DEVICES, GGML_VK_VISIBLE_DEVICES or OLLAMA_LLM_LIBRARY settings?
  7. Linux: did the problem start after sleep? Is the user in the right groups?
  8. Docker: does docker run --gpus all ubuntu nvidia-smi work?
  9. Still stuck? Turn on OLLAMA_DEBUG=1, and share the log (with personal paths removed) on Ollama’s GitHub issues or Discord.

Alternatives and limitations

  • Run on CPU with a smaller model: often good enough for summaries and drafts. See our model chooser for 8 GB and 16 GB machines.
  • LM Studio: another local AI app with its own GPU settings screen. It’s worth comparing if Ollama won’t use your card.
  • Cloud AI: if your hardware can’t run the models you need at a usable speed.
  • Limitations: some GPUs simply aren’t supported by Ollama’s prebuilt libraries. Integrated graphics and older cards may give little speed-up. Driver and ROCm support changes over time, so re-check Ollama’s hardware page after updates.

FAQ

How do I know Ollama is using my GPU on Windows?
Run ollama ps while a model is loaded and look for 100% GPU. Task Manager’s GPU graphs can also show activity while the model is answering. Task Manager behaviour not tested.

Does Ollama use the GPU on a Mac?
Yes, on Apple-silicon Macs, through Metal. Intel Macs run on CPU only.

Can Ollama use two GPUs?
Yes. The server help lists OLLAMA_SCHED_SPREAD ("Always schedule model across all GPUs"), and Ollama’s docs describe limiting which GPUs it uses with the variables in Step 8. Multi-GPU not tested.

Why is my GPU detected but the model still slow?
Usually a CPU/GPU split, because the model or context is too big for VRAM. Try a smaller model or context length.

Will forcing a different LLM library help?
Ollama documents OLLAMA_LLM_LIBRARY as an experimental override to bypass autodetection. Use it only for diagnosis.

Official references

Next step

With the GPU working, pick a model that makes the most of your VRAM, or add a ChatGPT-style interface on top of Ollama.

Last updated: 13 November 2026