Urgent.News

What's breaking now, across thousands of outlets.

Tech

Ollama Not Using GPU? Fix It on Linux, Windows and WSL

TL;DR Run ollama ps while a model is loaded: the PROCESSOR column tells you the truth. 100% GPU means the GPU is fine and you can stop reading. A split like 40%/60% CPU/GPU means the model didn't fit in VRAM — use a smaller quant. 100% CPU means Ollama found no usable GPU: usually an outdated driver, a missing group membership (AMD on Linux), a pinned OLLAMA_LLM_LIBRARY , or a container started…

To determine if Ollama is utilizing your GPU on Linux, Windows, or WSL2, follow these steps:

1. Load a model in Ollama and check the output:

- In one terminal, run `ollama run llama3.2 hello`.

- In another terminal, execute `ollama ps`.

2. Look at the "PROCESSOR" column in the `ollama ps` output. There are three possible states:

- 100% GPU: The GPU is functioning correctly, and the model has successfully offloaded all layers.

- 48%/52% CPU/GPU: The GPU is partially utilized, but the model or context size exceeds the available VRAM. Consider reducing the context size or using a quantized model.

- 100% CPU: Inference is being processed by the CPU. The GPU either wasn't detected or was explicitly disabled.

3. To identify the actual GPU Ollama is utilizing, examine the server log:

- Run `journalctl -u ollama --no-pager | grep -i inference compute` on Linux.

- On Windows, check the Ollama supported-GPU list to ensure your GPU is recognized.

4. Common issues preventing GPU usage:

- Outdated or incompatible NVIDIA driver: Update the driver, reboot, and restart the Ollama service.

- Missing AMD group memberships (render and video) on Linux: Add the user to the appropriate groups and restart the Ollama service.

- Unsupported AMD GPU: Ensure your AMD GPU is supported or attempt to override the detection using `HSA_OVERRIDE_GFX_VERSION`.

- Pinned OLLAMA_LLM_LIBRARY: Remove the environment variable if it's causing issues with GPU detection.

5. After applying driver or group fixes, restart the Ollama service to ensure it re-detects the GPU.

6. If updating Ollama, the backend library may be pinned. Remove `OLLAMA_LLM_LIBRARY` if it's causing GPU usage issues.

7. Ollama can indeed work in WSL2, provided the correct NVIDIA driver is installed and accessible from WSL2.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Putting Apple's Virtualization framework under a Flutter app

I maintain WSL Manager , a Flutter desktop app from 2021 that saves you from typing wsl.exe flags. Version 2 runs the same app on Apple silicon, where it manages native Linux and macOS VMs through…

  • WSL Manager is a Flutter app released in 2021 for managing WSL environments.
  • Version 2 adds support for Apple silicon devices via Apple's Virtualization framework.
  • vmctl CLI communicates with Flutter app through JSON output for VM management.

A 4 GB Laptop GPU Beats a 12-Core CPU by 4.3x on Gemma 4

This article compares two ways of serving the same small language model on the same laptop: CPU-only, and on the 4 GB GTX 1650 Ti sitting in the same chassis.

  • Laptop GPU outperforms 12-core CPU by 4.3x on Gemma 4 model
  • 3.35 GB quantization-aware GGUF model served on both CPU and GPU
  • GPU memory holds 1598 MiB of model's 3.334 GB tensor bytes

Learn PostgreSQL extensions through a gloriously bad idea: MM/DD/YYYY

This project teaches four of PostgreSQL's most powerful features by building something no sane person would ship: extensions — how you add new capabilities to PostgreSQL in C, expression indexes — how…

  • Create expression index for MM/DD/YYYY dates
  • Define custom type with operators for partial date searches
  • Use GiST index for efficient month, day, year component queries

More from Wednesday 16 September →