Why Ollama ignores the GPU and how to find the cause
When a shared Ollama server runs slowly on CPU even though a GPU is installed, the fix depends on which layer fails: the driver, the kernel module, the container runtime, file permissions or the runtime version that Ollama expects. Fixing Ollama GPU not detected problems starts with finding that layer, because changing settings at the wrong one wastes time and can leave the server in a worse state. Ollama does not announce a fallback to CPU in a friendly way, so the first job is to confirm the symptom with ollama ps, which shows whether a loaded model is running on the GPU, the CPU, or a split between the two, and then to read the server log at startup for the GPU discovery lines.
During startup, Ollama probes the system for usable accelerators through the vendor libraries it depends on. If the probe fails, the server still starts and serves requests, which is why the problem often looks like a performance issue rather than an outage. The NVIDIA path depends mainly on the host driver answering correctly, the kernel modules being loaded, and, in containers, the NVIDIA container runtime exposing the device to the container. The AMD path depends on the ROCm driver stack matching what Ollama was built against, and on the user running the service being allowed to open the GPU device files, which is usually a group membership question. Confirm which vendor you run and which deployment type (bare metal, systemd service or container) you use before you touch anything, because each combination has different checks. Confirm the exact driver and runtime versions your Ollama release supports in its release notes and documentation.
Bring in outside help when the GPU disappears after a kernel, driver or container runtime update, when several hosts behave differently from one image, or when a fix requires changing drivers on a shared production system that other services depend on. A written scope should name the hosts, the Ollama version, the expected ollama ps output after the fix and the rollback plan for each driver change. Internal teams can usually handle a single workstation or a well-documented service, and the decision turns on how many people depend on the server and how quickly it must be restored.
Triage steps to confirm the GPU is missing from Ollama
This sequence separates a host-level GPU problem from an Ollama-level discovery problem, so you fix the layer that is actually failing. Each step ends with a check that tells you whether to continue or stop and fix.
Confirm the host sees the GPU
Run the vendor's own tool on the host before touching Ollama. On NVIDIA systems, run
nvidia-smiand confirm it lists the GPU, the driver version and memory. On AMD systems, runrocm-smi(or the ROCm tool your distribution ships) and confirm the card appears. Success is a table listing each GPU with memory figures. Failure is a missing device, an error such as the driver not being loaded, or a tool that cannot find the GPU at all. If the host tool fails, stop here: Ollama cannot use a GPU the operating system does not expose, and the fix belongs at the driver or kernel layer.Check the Ollama version
Record the installed version with
ollama --versionand, if the server is running, check the version it reports through its API. Note this before changing anything so you can compare behavior before and after a fix and roll back if needed. Compare it against the release notes in the Ollama GitHub releases page, since GPU support changes between releases. If the version is old, plan to upgrade rather than patch around a known discovery issue. Record the version in your change ticket whether or not it turns out to matter.Read the discovery lines in the service logs
Open the Ollama service logs for the server. On Linux with systemd, use
journalctl -u ollamaand look for GPU discovery messages written when the server starts. In containers, read the container logs. The logs topic in this group explains where each platform writes logs and how to enableOLLAMA_DEBUG. A success line names the GPU and its available memory. A failure line reports that no GPU was found, that a library failed to load, or that a driver or permission check failed. Use the exact wording as your search term when you check the Ollama documentation and GitHub issues.Run a test prompt to load a model
Discovery messages only show what happened at start-up, so load a model to test the real path. Send a short prompt with
ollama runor a single request to the local API on port 11434, using a model you already have pulled. Wait for the response to complete. This step forces Ollama to allocate memory for the model, which is when a GPU problem usually appears. If the request fails with an out-of-memory error, note it, because the model may be too large for the available VRAM rather than undetected.Check where the model is running with ollama ps
Run
ollama pswhile the model is still loaded. The PROCESSOR column shows where the model runs. A value of100% GPUmeans the model is fully on the GPU. A value of100% CPUmeans no GPU was used, which confirms the detection failure. A split value such as a percentage on CPU and a percentage on GPU means partial offload, which is a sizing or memory issue rather than a detection failure. Treat that split as a different problem and follow the sizing and slow-response topics.Decide the next fix from the evidence
Combine the results. If the host tool shows the GPU, the logs report no GPU, and
ollama psshows 100% CPU, the problem sits between the driver and Ollama, so move to the driver, container runtime and permission checks in this topic. If the host tool fails, fix the driver or kernel layer first. Ifollama psshows 100% GPU, discovery is working and the earlier symptom had another cause. Write down which branch you took, the version and the three outputs, so the fix can be confirmed later against the same evidence.
NVIDIA, AMD and Docker paths to troubleshoot
On a bare Linux host, GPU discovery problems usually sit in one of three layers: the NVIDIA kernel driver, the userspace tools that talk to it, or the kernel modules that Ollama's CUDA path depends on. Start from the bottom. If the driver cannot see the card, nothing above it will work, so confirm the hardware and driver first, then check whether Ollama's logs show it discovering the device.
- Driver health: Run
nvidia-smias the same user that runs the Ollama service. If it fails or lists no GPUs, the problem is the driver or the kernel, not Ollama. - Driver and kernel match: After a kernel update, confirm the NVIDIA kernel module was rebuilt or installed for the running kernel. A mismatch often shows up as
nvidia-smifailing with a driver version message. - nvidia_uvm module: If
nvidia-smiworks but Ollama still falls back to CPU, check whether thenvidia_uvmmodule is loaded withlsmod. Reloading it is a common recovery step, but only stop workloads that use the GPU first, and confirm the exact module reload procedure for your distribution in the Ollama documentation and your driver vendor's current guide. - Service environment: Confirm the Ollama service starts after the driver is ready and that no unit file restricts device access.
- Log confirmation: Check the startup log for the GPU discovery lines described in the logging topic, then confirm the result with
ollama psafter loading a model.
Do not treat a reboot as a fix in itself. Record which check failed so the cause is clear if it returns after the next driver or kernel change.
AMD GPU support depends on the ROCm stack, and most failures come from one of two places: the user running the Ollama process cannot open the GPU device files, or the ROCm driver on the host does not match the ROCm runtime that the Ollama build expects. Check permissions first because they are fast to verify, then compare versions.
- Device group membership: Confirm the service user belongs to the
videoandrendergroups, since those groups typically own the device nodes Ollama opens. Membership changes often need a service restart before they take effect. - Device nodes: List the
/dev/kfdand/dev/drientries and their group owners, and confirm they are present after boot. - ROCm version alignment: Check the installed ROCm driver and runtime versions against the Ollama release you are running. The Ollama release notes and the GitHub repository list supported AMD hardware, so confirm your card appears there before tuning drivers.
- Unsupported or new hardware: If the card is not on the supported list, GPU discovery can fail even when the driver loads. Confirm support rather than assuming it.
- Service restart after changes: Restart the Ollama service after group or driver changes, then confirm with
ollama psthat the model runs on the GPU.
Exact package names and repository setup vary by distribution, so confirm each step against the Ollama documentation and AMD's current ROCm installation guide for your operating system.
Containers add a separate layer. The host may see the GPU perfectly well while the container cannot, because the container runtime did not pass the device, the NVIDIA container toolkit is missing or misconfigured, or the device cgroup rules block access. Test the container runtime on its own before you change Ollama settings, because a failed test isolates the cause quickly.
- Container toolkit: Confirm the NVIDIA container toolkit is installed and registered with Docker, and that a test container can run
nvidia-smi. If it cannot, fix the runtime before anything else. - Device passthrough: For AMD, confirm the container receives the
/dev/kfdand/dev/dridevices and the group IDs needed to open them. Missing device mappings are a common cause of CPU fallback. - Cgroup device permissions: Some setups restrict device access through cgroup rules. Check the container's device settings and the host's cgroup configuration, and confirm the exact configuration keys for your Docker version in its current documentation.
- Ollama container flags: Confirm the Ollama container was started with the GPU options described in the Ollama documentation, and that the image tag matches the version you intend to run.
- Verification: Check the container logs for discovery messages, then run
ollama psinside the container to confirm the loaded model is using the GPU.
Record the exact run command or compose file once it works, so the configuration can be reviewed and reproduced after upgrades.
Configuration settings that affect GPU use
This table compares the Ollama settings that touch GPU behavior or make GPU problems visible, and what each one can and cannot fix. Read each row as a question: does this setting help me find the cause, or does it change where the server or models live? The main takeaway is that most of these settings do not make a missing GPU appear, so start with driver and runtime checks before changing concurrency values.
| Setting | When it fits | What it does not fix |
|---|---|---|
| OLLAMA_DEBUG | When you need discovery output to see which GPU libraries Ollama probed and what it reported | Missing drivers, runtime or device access; the output shows the failure, it does not correct it |
| OLLAMA_HOST | When the server must listen on another address or port, for example for a proxy or container network | GPU discovery; the bind address changes access to the API, not hardware detection |
| OLLAMA_MODELS | When model files must live on a larger or dedicated volume with the right permissions | GPU discovery; a wrong model path causes load errors, not a CPU-only fallback |
| OLLAMA_NUM_PARALLEL (default 1 per model) | When concurrent requests need more slots on hardware that already shows the GPU | Missing GPU detection; a higher value adds memory pressure and does not enable a GPU |
| OLLAMA_MAX_LOADED_MODELS (default 3 times GPU count, or 3 on CPU) | When several models must stay resident and the GPU count is already correct | Discovery failures; if the GPU is absent, the default already reflects CPU use |
| systemd service environment | When settings must persist across reboots, set through a drop-in override for the ollama service | Driver problems; environment variables cannot install or repair the GPU stack |
| Container runtime flags | When the container must receive GPU devices and the runtime must expose them to Ollama | Host driver mismatches; flags pass devices through, so the host stack must already work |
Where GPU discovery breaks between hardware and the model runner
The path starts at the physical GPU and passes through the host driver and kernel module, then through the container runtime or device passthrough into the Ollama service and finally the model runner. Each hand-off is a place where discovery can fail silently, so each troubleshooting check sits at the boundary it tests. The final decision is what ollama ps reports: a GPU or CPU processor column tells you whether the model actually loaded onto the accelerator.
GPU discovery hand-offs and the check that confirms each one.
Driver and ROCm version mismatches that look like missing GPUs
A driver or ROCm runtime that does not match the Ollama build or the running kernel can make a working GPU look absent. Ollama discovers accelerators through the vendor libraries it finds on the host, so when the user-space libraries and the kernel module disagree, discovery fails and Ollama falls back to CPU without an obvious error. The GPU is physically present and healthy; the software stack that talks to it is not. This is most common right after an operating system kernel update, a driver upgrade, or a ROCm install that was done for another application on the same server.
A reboot or module reload is often required after a driver change because the kernel keeps the old driver loaded until the next boot or until the module is unloaded and reloaded. For NVIDIA hosts, check that nvidia-smi reports the same driver version it reported before the change, and confirm that the kernel module version matches the user-space library version. For AMD hosts, confirm the kernel driver and the installed ROCm packages come from the same release set. If they differ, stop and align them before you reload anything. Mixed versions often fail silently, so a successful nvidia-smi or rocm-smi run alone does not prove that Ollama can use the GPU.
Pin and record the driver, kernel and ROCm versions for every Ollama host, and store them with the Ollama version in your change log. Before any driver or kernel change, read the Ollama release notes on Ollama GitHub releases and confirm which GPU driver and ROCm versions the target Ollama build supports, since this page does not list compatible version numbers. Route driver and runtime changes through the same controlled process you use for Ollama itself, as described in the upgrade and version pinning topic, and test the change on a non-production host first. Record the result of ollama ps after each change so you can tell which combination last worked.
Security and operational risks during GPU fixes
GPU troubleshooting often means changing things that other workloads depend on: device permissions, container settings, kernel modules and logs. The cards below cover the risks that come with each fix on a shared Ollama host, and what to check before and after you make a change.
Device access widens the host attack surface
Giving a service account or container access to GPU device files such as /dev/nvidia* or /dev/kfd lets that process talk directly to the driver. Any process with that access can use the GPU and read memory or state it should not see. Before granting access, confirm which user or container needs it, remove access when the fix is done, and check group membership so that unrelated accounts do not inherit it.
Privileged containers and broad device mounts
Running the Ollama container with --privileged or mounting every device under /dev is a common shortcut when GPU detection fails. It removes isolation that the container runtime normally provides. Prefer mounting only the specific GPU device nodes and driver libraries the container needs, and document exactly which flags were used so that a later reviewer can see what was granted and why.
Cgroup changes reach other workloads
Device cgroup rules are applied at the host level, so editing them to allow GPU access can change what other containers on the same machine are allowed to touch. A rule meant for Ollama may also affect a database, a training job or a monitoring agent. Before changing cgroup settings, list the containers running on the host, record the current rules, and plan a way to restore them.
Debug logs can expose prompts and paths
Setting OLLAMA_DEBUG makes the server write more detail to its logs, which can include file paths, model names, configuration and request information. On a shared server those logs may be read by people who should not see user activity. Turn debug output on only for the time needed to diagnose discovery, restrict who can read the log files, and turn it off afterward.
Kernel module reloads interrupt running work
Reloading drivers or nvidia_uvm requires the GPU to be idle, so any model that is loaded or any request in progress will fail or stop. Processes holding the device can also block the reload. Check for active Ollama requests and other GPU users with ollama ps and vendor tools first, schedule the reload with the people who depend on the server, and expect that loaded models will need to load again.
Local API is unauthenticated while debugging
The local Ollama API at port 11434 does not require authentication, and by default Ollama binds to 127.0.0.1. Setting OLLAMA_HOST to a wider address to reach the server from another machine during debugging exposes that API to the network with no login in front of it. Keep the default binding, use an SSH tunnel or a local client for remote checks, and reset OLLAMA_HOST once the test is complete.
Questions teams ask before fixing GPU detection
How long does a GPU detection fix usually take?
No fixed duration applies to every host, so the honest answer is that the time depends on what is broken and how the change must be approved. A single workstation with a clear driver mismatch can often be checked in one session, while a fleet of hosts that needs a driver upgrade, a container runtime change and a reboot window takes longer. The main drivers are the driver stack (NVIDIA or AMD, kernel module state and the ROCm version), the container setup (whether Ollama runs in Docker and how the GPU is passed through), the number of hosts affected, and whether change approval, testing and rollback records are required before a reboot. Ask any partner for a written scope that lists the hosts, the drivers in use and the approval steps, then build the schedule from that document.
Does Ollama itself cost money to run on our GPUs?
Running Ollama on your own hardware does not carry a license fee. The Ollama pricing page states that running models on your own hardware is always unlimited, and the project is released under the MIT license. Paid plans on that page apply to cloud models, with Pro at $20 per month ($200 per year), Max at $100 per month, Team at $500 per month and Enterprise at custom pricing. A GPU fix therefore costs the labor of diagnosis and change work, plus any hardware or support contracts you already hold for the server. Confirm with Ollama whether any plan you are considering touches your local deployment before you buy it.
What do we need to provide before the work starts?
Your team needs to provide a clear access path and a set of facts about the host. The list usually includes:
- Administrative access to the host, with sudo or root rights for driver, kernel module and container runtime changes
- Hardware details: GPU model, driver version, operating system, kernel version and whether Ollama runs natively, in Docker or in another container runtime
- Current logs from the Ollama service, showing what GPU discovery reported at startup
- A maintenance window, since driver reloads and container restarts can interrupt users who share the server
- Approved change records and a rollback plan if your change control process requires them
Having this ready shortens diagnosis and keeps the change inside the window you approved.
Can our own engineers fix GPU detection without a partner?
Yes, for a single host with clear logs and a team that already administers Linux GPU servers. The work is largely methodical: confirm the driver loads, check the container runtime can see the GPU, reload the nvidia_uvm module or fix AMD group permissions where needed, then confirm with ollama ps. A partner adds more value when you run a fleet, when driver and ROCm versions must be aligned across many machines, or when every change needs documented evidence for a compliance assessment. Your team keeps ownership either way, and the choice comes down to available hours, the number of hosts and how much change documentation you must produce.
What does a fixed-scope GPU engagement include?
A fixed-scope engagement sets out the work, deliverables and timeline in writing before anything changes on your servers. For GPU detection, the written scope typically covers which hosts are in range, the diagnosis of driver, container runtime and permission problems, the agreed changes, the verification steps and the handover notes your operators need. DeployOpen plans, implements, documents and supports self-hosted open-source platforms inside your own infrastructure, so the changes run in your accounts, data centers or restricted networks. Ask for the list of deliverables and the verification evidence, including the ollama ps output showing the GPU in use, before you sign.
Will fixing GPU detection create compliance evidence we need?
A GPU fix on its own does not produce an audit report, and DeployOpen does not issue audit reports, attestations or certifications. Independent auditors and certification bodies issue those. What the work can produce is the material assessors ask for: a record of the host configuration before and after, the change tickets, the verification output and the operating notes. Agree the evidence format in the scope so the records match your control framework. Confirm with your assessor which artifacts they expect before the change window opens.
What are the risks of changing GPU drivers on a shared server?
The main risks are interrupted service, a host that fails to boot after a driver change and a container that loses GPU access after a restart. Reloading nvidia_uvm or changing driver packages can disrupt running models, and mismatched kernel modules and user-space libraries can leave Ollama on the CPU without an obvious error. Limit the risk by announcing the window to users, taking a snapshot or backup of the host where your policy allows, changing one component at a time and keeping the previous driver package available for rollback. Re-check ollama ps after each change so you know whether the GPU is in use.
Confirming the fix with ollama ps and a test request
A driver change that makes the GPU visible is not a fix until a model actually runs on it. Start with a test prompt against each model your users call, because loading a model is what triggers GPU allocation. Send a short request through the local API on port 11434, then run ollama ps while the model is still resident. Read the PROCESSOR column: a value of 100% GPU means the model is fully in VRAM, while a split such as 48%/52% CPU/GPU means part of the model is offloaded and the GPU is not doing the full job. If the column shows 100% CPU for a model you expected to run on the GPU, the discovery problem is still present, even if nvidia-smi or rocm-smi now lists the card. Repeat the check for every model in your catalog, since a model that fits in VRAM on one day may not fit after a context setting or model change.
Next, restart the Ollama service and read the logs from that start-up. Look for the GPU discovery lines that name the device and its available memory, and confirm that the discovery message appears after the restart rather than only in an earlier session. The location of those logs depends on how you installed Ollama, so confirm it against the Ollama FAQ and your own service manager before you rely on it. Then repeat the test prompt and ollama ps check after every reboot and after every Ollama upgrade, because a new release or a kernel and driver update can change discovery behavior. Record the result in a change log with the Ollama version, driver and runtime versions, the command output and the date. Treat a result that only passed once as unconfirmed until the next scheduled check also passes.
How DeployOpen scopes and delivers GPU troubleshooting
DeployOpen approaches GPU detection problems on Ollama as a bounded piece of work inside your own infrastructure, starting from the host, driver and container runtime and working outward. Each engagement is agreed in writing before work starts, so the fix, the evidence that it holds and the handover are defined up front.
How we scope
- Confirm the host OS, GPU vendor, driver stack and whether Ollama runs natively, in Docker or in another container runtime.
- Record the current ollama ps output, relevant log lines and the model sizes and concurrency settings in use.
- Agree in writing which GPU hosts, containers and Ollama versions are in scope, and what a confirmed fix looks like.
How we build
- Check driver, kernel module and container runtime configuration against the vendor requirements for your platform.
- Apply the changes needed for discovery, such as device access, group permissions or cgroup settings, one step at a time.
- Confirm the GPU is detected and used by running a test model and checking that ollama ps reports GPU placement.
How we hand over
- Deliver a written record of the root cause, each change made, the configuration files touched and the commands used to verify.
- Document the checks to repeat after reboots, driver updates, kernel updates or Ollama upgrades so the fix stays visible.
- Walk your platform team through the runbook so they can reproduce the verification without DeployOpen involved.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers if your GPU hosts need regular attention.
- Ask for a quote that lists the scope, the hosts covered, the deliverables and any retest included in the fixed scope.
- Confirm with your vendors which driver and ROCm or CUDA combinations they support for your hardware before scheduling changes.

