Skip to content

Ollama Docs, Revised

Troubleshooting

Troubleshooting page. 46 changes, 13 questions for the owner. Audit: improved. Original source at commit 318ee28.

Revised

Sometimes Ollama doesn't perform as expected. One of the best ways to find out what happened is to look at the logs. To find the logs on Mac, run this command:1

cat ~/.ollama/logs/server.log

On Linux systems with systemd, find the logs with2 this command:X33

journalctl -u ollama --no-pager --follow --pager-end

When you run Ollama in a container, the logs go to stdout/stderr in the container:

docker logs <container-name>

To find the container name, use docker ps.3

If you run ollama serve manually in a terminal, the logs appear in that terminal.4

When you run Ollama on Windows, there are a few different locations. To view them in the explorer window, press <cmd>+R and type in:5X24

  • explorer %LOCALAPPDATA%\Ollama to view logs. The most recent server logs are in server.log, and older logs are in server-#.log.6X37
  • explorer %LOCALAPPDATA%\Programs\Ollama to browse the binaries. The installer adds this to your user PATH.7
  • explorer %HOMEPATH%\.ollama to browse where models and configuration are8 stored
  • explorer %TEMP% to find where9 temporary executable files are stored in one or more ollama* directories

To turn on additional debug logging to help troubleshoot problems, first quit the running app from the tray menu. Then, in a PowerShell terminal, run:10

$env:OLLAMA_DEBUG="1"
& "ollama app.exe"

Join the Discord for help interpreting the logs.?1

LLM libraries

Ollama includes multiple LLM libraries compiled for different GPUs and CPU vector features. Ollama tries to pick the best one based on the capabilities of your system. If this autodetection has problems, or you run into other problems (for example, crashes in your GPU), you can work around them by forcing a specific LLM library. cpu_avx2 performs the best, followed by cpu_avx. The slowest but most compatible is cpu. Rosetta emulation under macOS works with the cpu library.11?2

In the server log, you see a message that looks something like this (it varies from release to release):1213X18

Dynamic LLM libraries [rocm_v6 cpu cpu_avx cpu_avx2 cuda_v11 rocm_v5]

Experimental LLM library override14

To bypass autodetection, set OLLAMA_LLM_LIBRARY to any of the available LLM libraries. For example, if you have a CUDA card but want to force the CPU LLM library with AVX2 vector support, use:15

OLLAMA_LLM_LIBRARY="cpu_avx2" ollama serve

To see what features your CPU has, run:16

cat /proc/cpuinfo| grep flags | head -1

Installing older or pre-release versions on Linux

If you run into problems on Linux and want to install an older version, or you'd like to try out a pre-release before it's officially released, you can tell the install script which version to install.X12

curl -fsSL https://ollama.com/install.sh | OLLAMA_VERSION=0.5.7 sh

Linux tmp noexec

If your system is configured with the "noexec" flag where Ollama stores its temporary executable files, you can specify an alternate location by setting OLLAMA_TMPDIR17 to a location writable by the user ollama runs as. For example, OLLAMA_TMPDIR=/usr/share/ollama/.18?3

Linux Docker19

If Ollama initially works on the GPU in a Docker container, but then switches to running on CPU after some time, with errors in the server log reporting GPU discovery failures, you can resolve this by turning off systemd cgroup management in Docker. Edit /etc/docker/daemon.json on the host and add "exec-opts": ["native.cgroupdriver=cgroupfs"] to the Docker configuration.20

NVIDIA GPU discovery21

When Ollama starts up, it takes inventory of the GPUs present in the system to determine compatibility and how much VRAM is available. Sometimes this discovery can fail to find your GPUs. In general, running the latest driver gives22 the best results.

Linux NVIDIA troubleshooting23

If you use a container to run Ollama, make sure you've set up the container runtime first as described in the Docker page.24X28

Sometimes Ollama25 can have difficulties initializing the GPU. When you check the server logs, this can show up as various error codes, such as "3" (not initialized), "46" (device unavailable), "100" (no device), "999" (unknown), or others. These26 troubleshooting techniques may help resolve the problem:27

  • If you use a container, check that the container runtime works. Try docker run --gpus all ubuntu nvidia-smi. If this doesn't work, Ollama can't see your NVIDIA GPU.28
  • Is the uvm driver loaded? sudo nvidia-modprobe -u
  • Try reloading the nvidia_uvm driver: sudo rmmod nvidia_uvm, then sudo modprobe nvidia_uvm.29X38
  • Try rebooting
  • Make sure you're running the latest NVIDIA30 drivers

If none of those resolve the problem, gather additional information and file an issue:?4

  • Set CUDA_ERROR_LEVEL=50 and try again to get more diagnostic logs
  • Check dmesg for any errors: sudo dmesg | grep -i nvrm and sudo dmesg | grep -i nvidia31

AMD GPU discovery32

On Linux, AMD GPU access typically requires membership in the video group, the render group, or both, to access the /dev/kfd device. If permissions aren't set up correctly, Ollama detects this and reports an error in the server log.33

When running in a container, in some Linux distributions and container runtimes, the ollama34 process may be unable to access the GPU. Use ls -lnd /dev/kfd /dev/dri /dev/dri/* on the host system to determine the numeric group IDs on your system, and pass additional --group-add ... arguments to the container so it can access the required devices. For example, in the following output crw-rw---- 1 0 44 226, 0 Sep 16 16:55 /dev/dri/card0 the group ID column is 44.35

If Ollama doesn't discover or use your GPU correctly for inference, the following may help isolate the failure:36

  • AMD_LOG_LEVEL=3 turns on info log levels in the AMD HIP/ROCm libraries. This can show more detailed error codes that can help you troubleshoot problems.37
  • OLLAMA_DEBUG=1 reports additional information during GPU discovery.38
  • Check dmesg for any errors from the amdgpu or kfd drivers: sudo dmesg | grep -i amdgpu and sudo dmesg | grep -i kfd39

AMD driver version mismatch40

If your AMD GPU isn't41 detected on Linux and the server logs contain messages like:42

msg="failure during GPU discovery" ... error="failed to finish discovery before timeout"
msg="bootstrap discovery took" duration=30s ...

This typically means the system's AMD GPU driver is too old. Ollama bundles ROCm 7 Linux libraries, which require a compatible ROCm 7 kernel driver. If the system is running an older driver (ROCm 6.x or earlier), GPU initialization hangs during device discovery and eventually times out, causing Ollama to fall back to CPU.43X18

To resolve this, upgrade to the ROCm version 744 driver using the amdgpu-install utility from AMD's ROCm documentation. After upgrading, reboot and restart Ollama.

Multiple AMD GPUs

If you experience gibberish responses when models load across multiple AMD GPUs on Linux, see the following guide.

Windows Terminal Errors

Older versions of Windows 10 (for example, 21H1) are known to have a bug where the standard terminal program doesn't display control characters correctly. This can result in a long string of strings like ←[?25h←[?25l being displayed, sometimes with the error The parameter is incorrect. To resolve this problem, update to Windows 10 22H1 or newer.46X15?5

Notes on this page

  1. 1 Wording Audit: improved Plainer words, and the instruction as a direct step.

    Was: Sometimes Ollama may not perform as expected. One of the best ways to figure out what happened is to take a look at the logs. Find the logs on Mac by running the command:

    voice-second-person voice-present-tense

  2. 2 Wording Audit: improved Active voice, as an instruction.

    Was: the logs can be found with

    voice-active-in-instructions

  3. 3 Wording Audit: improved A full sentence instead of a parenthetical.

    Was: (Use docker ps to find the container name)

    proc-imperative

  4. 4 Wording Audit: improved Names the reader as the actor, uses present tense, and "in" the terminal.

    Was: If manually running ollama serve in a terminal, the logs will be on that terminal.

    voice-present-tense voice-active-in-instructions

  5. 5 Wording Audit: improved Fixes the broken parallel structure ("hitting ... and type") and says "press". The key combination is unchanged.

    Was: You can view them in the explorer window by hitting <cmd>+R and type in:

    voice-active-in-instructions prin-plain-words

  6. 6 Wording Audit: improved Present tense, a comma, and a final period.

    Was: The most recent server logs will be in server.log and older logs will be in server-#.log

    voice-present-tense punct-comma-splice

  7. 7 Wording Audit: improved The parenthetical started with a capital letter and had no period; it is now its own sentence.

    Was: to browse the binaries (The installer adds this to your user PATH)

    punct-comma-nonessential

  8. 8 Wording Audit: improved Subject-verb agreement: "models and configuration are stored".

    Was: models and configuration is stored

    gram-subject-verb-agreement

  9. 9 Wording Audit: improved Adds "to find" so the item has a verb, like the others in the list.

    Was: explorer %TEMP% where temporary executable files are stored

    list-parallel-structure

  10. 10 Wording Audit: improved Uses "turn on", ends the sentence before the code block with "run:", and writes "PowerShell" as Microsoft does.

    Was: To enable additional debug logging to help troubleshoot problems, first Quit the running app from the tray menu then in a powershell terminal

    TurnOn proc-one-action-per-step cap-product-names-exact

  11. 11 Wording Audit: improved Fixes the run-on, the typo "an", "workaround" as a verb, "e.g.", the product name "macOS", and the tense. The performance claims are unchanged.

    Was: If this autodetection has problems, or you run into other problems (e.g. crashes in your GPU) you can workaround this by forcing a specific LLM library. cpu_avx2 will perform the best, followed by cpu_avx an the slowest but most compatible is cpu. Rosetta emulation under MacOS will work with the cpu library.

    Latin cap-product-names-exact voice-present-tense

  12. 12 Wording Audit: improved Present tense and a complete parenthetical.

    Was: In the server log, you will see a message that looks something like this (varies from release to release):

    voice-present-tense

  13. 13 Structure Audit: improved The fence had no language label; it is now labeled text. The log line is unchanged.

    Was: Dynamic LLM libraries [rocm_v6 cpu cpu_avx cpu_avx2 cuda_v11 rocm_v5]

    code-block-language

  14. 14 Structure Audit: improved A bold line that acts as a heading became a level 3 heading, in sentence case.

    Was: Experimental LLM Library Override

    cap-sentence-case-headings

  15. 15 Wording Audit: improved Leads with the purpose, puts the variable name in code font, and removes extra commas.

    Was: You can set OLLAMA_LLM_LIBRARY to any of the available LLM libraries to bypass autodetection, so for example, if you have a CUDA card, but want to force the CPU LLM library with AVX2 vector support, use:

    code-font-scope punct-comma-nonessential

  16. 16 Wording Audit: improved A lead-in that ends with a colon, as the code block follows.

    Was: You can see what features your CPU has with the following.

    proc-imperative

  17. 17 Wording Audit: improved Puts the variable name in code font.

    Was: OLLAMA_TMPDIR

    code-font-scope

  18. 18 Wording Audit: improved Comma after "For example", the setting in code font, and a final period.

    Was: For example OLLAMA_TMPDIR=/usr/share/ollama/

    code-font-scope punct-comma-nonessential

  19. 19 Wording Audit: improved The product name is "Docker". The heading anchor does not change.

    Was: Linux docker

    cap-product-names-exact

  20. 20 Wording Audit: improved Capitalizes the product name Docker, uses active voice and "turning off", and shortens "after some period of time".

    Was: If Ollama initially works on the GPU in a docker container, but then switches to running on CPU after some period of time with errors in the server log reporting GPU discovery failures, this can be resolved by disabling systemd cgroup management in Docker. Edit /etc/docker/daemon.json on the host and add "exec-opts": ["native.cgroupdriver=cgroupfs"] to the docker configuration.

    cap-product-names-exact prin-plain-words

  21. 21 Wording Audit: improved Sentence case. The heading anchor does not change.

    Was: NVIDIA GPU Discovery

    cap-sentence-case-headings

  22. 22 Wording Audit: improved Present tense.

    Was: will yield

    voice-present-tense

  23. 23 Wording Audit: improved Sentence case. The heading anchor does not change.

    Was: Linux NVIDIA Troubleshooting

    cap-sentence-case-headings

  24. 24 Wording Audit: improved Link text names the destination ("Docker page"), "use" for "are using", and a final period. The link target is unchanged.

    Was: If you are using a container to run Ollama, make sure you've set up the container runtime first as described in docker

    link-descriptive-text PronounContractions voice-present-tense

  25. 25 Wording Audit: improved Removes the stray article "the".

    Was: Sometimes the Ollama can have

    gram-subject-verb-agreement

  26. 26 Wording Audit: improved Plain wording: "These".

    Was: The following

    prin-plain-words

  27. 27 Wording Audit: improved Adds the missing colon before the list.

    Was: may help resolve the problem

    punct-comma-nonessential

  28. 28 Wording Audit: improved Turns the question into an instruction, ends the command with a period instead of a dash, and keeps the list in one voice.

    Was: If you are using a container, is the container runtime working? Try docker run --gpus all ubuntu nvidia-smi - if this doesn't work, Ollama won't be able to see your NVIDIA GPU.

    list-parallel-structure voice-active-in-instructions Contractions

  29. 29 Wording Audit: improved Puts the driver name in code font and replaces the dash with a colon and commas. The commands are unchanged.

    Was: Try reloading the nvidia_uvm driver - sudo rmmod nvidia_uvm then sudo modprobe nvidia_uvm

    code-font-scope punct-comma-nonessential

  30. 30 Wording Audit: improved The company name is written "NVIDIA".

    Was: nvidia drivers

    cap-product-names-exact

  31. 31 Wording Audit: improved Puts the program name in code font and adds a colon before the commands. The commands are unchanged.

    Was: Check dmesg for any errors sudo dmesg | grep -i nvrm and sudo dmesg | grep -i nvidia

    code-font-scope

  32. 32 Wording Audit: improved Sentence case. The heading anchor does not change.

    Was: AMD GPU Discovery

    cap-sentence-case-headings

  33. 33 Wording Audit: improved Capitalizes "Linux", replaces "and/or" with "or both", uses a contraction, and puts the sentence in present tense.

    Was: On linux, AMD GPU access typically requires video and/or render group membership to access the /dev/kfd device. If permissions are not set up correctly, Ollama will detect this and report an error in the server log.

    cap-product-names-exact voice-present-tense Contractions

  34. 34 Wording Audit: improved Puts the process name in code font.

    Was: the ollama process

    code-font-scope

  35. 35 Wording Audit: improved Adds the missing final period.

    Was: the group ID column is 44

    punct-comma-splice

  36. 36 Wording Audit: improved Shorter, and ends with a colon because a list follows.

    Was: If you are experiencing problems getting Ollama to correctly discover or use your GPU for inference, the following may help isolate the failure.

    PronounContractions proc-imperative

  37. 37 Wording Audit: improved The item had no verb that linked the setting to its effect; it now says what the setting does, in the same form as the next item.

    Was: AMD_LOG_LEVEL=3 Enable info log levels in the AMD HIP/ROCm libraries. This can help show more detailed error codes that can help troubleshoot problems

    TurnOn voice-active-in-instructions

  38. 38 Wording Audit: improved Active voice, present tense, and the same form as the other items.

    Was: OLLAMA_DEBUG=1 During GPU discovery additional information will be reported

    voice-active-in-instructions voice-present-tense

  39. 39 Wording Audit: improved Puts the program and driver names in code font and adds a colon before the commands. The commands are unchanged.

    Was: Check dmesg for any errors from amdgpu or kfd drivers sudo dmesg | grep -i amdgpu and sudo dmesg | grep -i kfd

    code-font-scope

  40. 40 Wording Audit: improved Sentence case. The heading anchor does not change.

    Was: AMD Driver Version Mismatch

    cap-sentence-case-headings

  41. 41 Wording Audit: improved Contraction, as in the voice.

    Was: is not

    Contractions

  42. 42 Structure Audit: improved The fence had no language label; it is now labeled text. The log lines are unchanged.

    Was: msg="failure during GPU discovery" ... error="failed to finish discovery before timeout" msg="bootstrap discovery took" duration=30s ...

    code-block-language code-error-verbatim

  43. 43 Wording Audit: improved Capitalizes "Linux", adds the comma before "which", and uses present tense.

    Was: Ollama bundles ROCm 7 linux libraries which require a compatible ROCm 7 kernel driver. If the system is running an older driver (ROCm 6.x or earlier), GPU initialization will hang during device discovery and eventually time out

    voice-present-tense cap-product-names-exact

  44. 44 Wording Audit: improved In prose, write "version 7" rather than "v7".

    Was: ROCm v7

    VersionWord

  45. 45 Wording Audit: improved The bare URL became a link with descriptive text. The URL is unchanged.

    Was: - https://rocm.docs.amd.com/projects/radeon-ryzen/en/latest/docs/install/installrad/native_linux/mgpu.html#mgpu-known-issues-and-limitations

    link-no-raw-url link-descriptive-text

  46. 46 Wording Audit: improved Removes "please", writes "for example" and "Windows 10" in full, uses a contraction, and fixes the missing period before the last sentence. The The parameter is incorrect message is unchanged.

    Was: Older versions of Windows 10 (e.g., 21H1) are known to have a bug where the standard terminal program does not display control characters correctly. This can result in a long string of strings like ←[?25h←[?25l being displayed, sometimes erroring with The parameter is incorrect To resolve this problem, please update to Win 10 22H1 or newer.

    Please Latin cap-product-names-exact punct-comma-nonessential

Questions for the owner

  • ?1 This page covers many unrelated problems, each without a stated symptom, cause test, or step to confirm the fix; should each become its own topic, and what confirms each fix?

    About: “Join the Discord for help interpreting the logs.”

  • ?2 Should LLM, CUDA, VRAM, AMD, and PATH be spelled out at first use, and what expansions does the owner want?

    About: “Ollama includes multiple LLM libraries compiled for different GPUs and CPU vector features.”

  • ?3 What does the reader see when "noexec" blocks Ollama, so the section can start from that symptom, and how do they confirm the new location works?

    About: “If your system is configured with the "noexec" flag where Ollama stores its temporary executable files”

  • ?4 Where should the reader file the issue, and what should they include?

    About: “gather additional information and file an issue:”

  • ?5 Does "Windows Terminal" in the heading name the Microsoft product, or does it mean the standard terminal program the section describes?

    About: “Windows Terminal Errors”

  • X12 How to install a pre-release. The FAQ installs pre-releases through a preview channel, while Linux and Troubleshooting use OLLAMA_VERSION for pre-releases. Is the preview channel now the supported way to get pre-releases, and should Linux and Troubleshooting say so?

    Pages: Local FAQ, Install Ollama on Linux, Troubleshooting

  • X15 Minimum Windows 10 release. The Windows page requires 22H2 or newer, while Troubleshooting tells readers to update to 22H1 or newer. Is the minimum Windows 10 release 22H2, and should Troubleshooting match it?

    Pages: Install Ollama on Windows, Troubleshooting

  • X18 ROCm versions referenced. Hardware support and Troubleshooting say Ollama uses ROCm v7, while the FAQ still describes ROCm v5.7 and v6.2 limits and Troubleshooting's sample log lists rocm_v5 and rocm_v6. Does the FAQ's Windows Radeon one-model limit still apply under ROCm v7, and should the sample log line be updated?

    Pages: Hardware support, Troubleshooting, Local FAQ

  • X24 Key shortcut for the Windows Run dialog. The Windows page says <Ctrl>+R and Troubleshooting says <cmd>+R for the same list of Explorer paths. Which key combination should both pages give for opening the Run dialog?

    Pages: Install Ollama on Windows, Troubleshooting

  • X28 FAQ, Troubleshooting and Hardware support use relative file links. These links use relative paths, some with source file extensions, unlike the root-relative page links used elsewhere, and may not resolve on the published site. Should these become root-relative page links such as /troubleshooting and /gpu?

    Pages: Local FAQ, Troubleshooting, Hardware support

  • X33 Linux log commands differ. Linux and Troubleshooting both tell readers how to view service logs, with different journalctl commands. Which page should own log instructions, with the other linking to it?

    Pages: Install Ollama on Linux, Troubleshooting

  • X37 Windows file locations in Windows and Troubleshooting. Both pages list the same Explorer paths, with different log file details. Should one page hold the Windows file locations, with the other linking to it?

    Pages: Install Ollama on Windows, Troubleshooting

  • X38 NVIDIA UVM reload in Hardware support and Troubleshooting. Both pages give the same rmmod/modprobe workaround for a lost NVIDIA GPU. Should one page own this workaround?

    Pages: Hardware support, Troubleshooting

Original

Sometimes Ollama may not perform as expected. One of the best ways to figure out what happened is to take a look at the logs. Find the logs on Mac by running the command:

cat ~/.ollama/logs/server.log

On Linux systems with systemd, the logs can be found with this command:

journalctl -u ollama --no-pager --follow --pager-end

When you run Ollama in a container, the logs go to stdout/stderr in the container:

docker logs <container-name>

(Use docker ps to find the container name)

If manually running ollama serve in a terminal, the logs will be on that terminal.

When you run Ollama on Windows, there are a few different locations. You can view them in the explorer window by hitting <cmd>+R and type in:

  • explorer %LOCALAPPDATA%\Ollama to view logs. The most recent server logs will be in server.log and older logs will be in server-#.log
  • explorer %LOCALAPPDATA%\Programs\Ollama to browse the binaries (The installer adds this to your user PATH)
  • explorer %HOMEPATH%\.ollama to browse where models and configuration is stored
  • explorer %TEMP% where temporary executable files are stored in one or more ollama* directories

To enable additional debug logging to help troubleshoot problems, first Quit the running app from the tray menu then in a powershell terminal

$env:OLLAMA_DEBUG="1"
& "ollama app.exe"

Join the Discord for help interpreting the logs.

LLM libraries

Ollama includes multiple LLM libraries compiled for different GPUs and CPU vector features. Ollama tries to pick the best one based on the capabilities of your system. If this autodetection has problems, or you run into other problems (e.g. crashes in your GPU) you can workaround this by forcing a specific LLM library. cpu_avx2 will perform the best, followed by cpu_avx an the slowest but most compatible is cpu. Rosetta emulation under MacOS will work with the cpu library.

In the server log, you will see a message that looks something like this (varies from release to release):

Dynamic LLM libraries [rocm_v6 cpu cpu_avx cpu_avx2 cuda_v11 rocm_v5]

Experimental LLM Library Override

You can set OLLAMA_LLM_LIBRARY to any of the available LLM libraries to bypass autodetection, so for example, if you have a CUDA card, but want to force the CPU LLM library with AVX2 vector support, use:

OLLAMA_LLM_LIBRARY="cpu_avx2" ollama serve

You can see what features your CPU has with the following.

cat /proc/cpuinfo| grep flags | head -1

Installing older or pre-release versions on Linux

If you run into problems on Linux and want to install an older version, or you'd like to try out a pre-release before it's officially released, you can tell the install script which version to install.

curl -fsSL https://ollama.com/install.sh | OLLAMA_VERSION=0.5.7 sh

Linux tmp noexec

If your system is configured with the "noexec" flag where Ollama stores its temporary executable files, you can specify an alternate location by setting OLLAMA_TMPDIR to a location writable by the user ollama runs as. For example OLLAMA_TMPDIR=/usr/share/ollama/

Linux docker

If Ollama initially works on the GPU in a docker container, but then switches to running on CPU after some period of time with errors in the server log reporting GPU discovery failures, this can be resolved by disabling systemd cgroup management in Docker. Edit /etc/docker/daemon.json on the host and add "exec-opts": ["native.cgroupdriver=cgroupfs"] to the docker configuration.

NVIDIA GPU Discovery

When Ollama starts up, it takes inventory of the GPUs present in the system to determine compatibility and how much VRAM is available. Sometimes this discovery can fail to find your GPUs. In general, running the latest driver will yield the best results.

Linux NVIDIA Troubleshooting

If you are using a container to run Ollama, make sure you've set up the container runtime first as described in docker

Sometimes the Ollama can have difficulties initializing the GPU. When you check the server logs, this can show up as various error codes, such as "3" (not initialized), "46" (device unavailable), "100" (no device), "999" (unknown), or others. The following troubleshooting techniques may help resolve the problem

  • If you are using a container, is the container runtime working? Try docker run --gpus all ubuntu nvidia-smi - if this doesn't work, Ollama won't be able to see your NVIDIA GPU.
  • Is the uvm driver loaded? sudo nvidia-modprobe -u
  • Try reloading the nvidia_uvm driver - sudo rmmod nvidia_uvm then sudo modprobe nvidia_uvm
  • Try rebooting
  • Make sure you're running the latest nvidia drivers

If none of those resolve the problem, gather additional information and file an issue:

  • Set CUDA_ERROR_LEVEL=50 and try again to get more diagnostic logs
  • Check dmesg for any errors sudo dmesg | grep -i nvrm and sudo dmesg | grep -i nvidia

AMD GPU Discovery

On linux, AMD GPU access typically requires video and/or render group membership to access the /dev/kfd device. If permissions are not set up correctly, Ollama will detect this and report an error in the server log.

When running in a container, in some Linux distributions and container runtimes, the ollama process may be unable to access the GPU. Use ls -lnd /dev/kfd /dev/dri /dev/dri/* on the host system to determine the numeric group IDs on your system, and pass additional --group-add ... arguments to the container so it can access the required devices. For example, in the following output crw-rw---- 1 0 44 226, 0 Sep 16 16:55 /dev/dri/card0 the group ID column is 44

If you are experiencing problems getting Ollama to correctly discover or use your GPU for inference, the following may help isolate the failure.

  • AMD_LOG_LEVEL=3 Enable info log levels in the AMD HIP/ROCm libraries. This can help show more detailed error codes that can help troubleshoot problems
  • OLLAMA_DEBUG=1 During GPU discovery additional information will be reported
  • Check dmesg for any errors from amdgpu or kfd drivers sudo dmesg | grep -i amdgpu and sudo dmesg | grep -i kfd

AMD Driver Version Mismatch

If your AMD GPU is not detected on Linux and the server logs contain messages like:

msg="failure during GPU discovery" ... error="failed to finish discovery before timeout"
msg="bootstrap discovery took" duration=30s ...

This typically means the system's AMD GPU driver is too old. Ollama bundles ROCm 7 linux libraries which require a compatible ROCm 7 kernel driver. If the system is running an older driver (ROCm 6.x or earlier), GPU initialization will hang during device discovery and eventually time out, causing Ollama to fall back to CPU.

To resolve this, upgrade to the ROCm v7 driver using the amdgpu-install utility from AMD's ROCm documentation. After upgrading, reboot and restart Ollama.

Multiple AMD GPUs

If you experience gibberish responses when models load across multiple AMD GPUs on Linux, see the following guide.

Windows Terminal Errors

Older versions of Windows 10 (e.g., 21H1) are known to have a bug where the standard terminal program does not display control characters correctly. This can result in a long string of strings like ←[?25h←[?25l being displayed, sometimes erroring with The parameter is incorrect To resolve this problem, please update to Win 10 22H1 or newer.

What Changed

This page keeps its sections, commands, links, and code. The edits fix wording the standard flags: sentence-case headings, product names such as macOS, Docker, and NVIDIA, tense and active voice, list form, and one bare URL turned into a link. Questions ask the owner about splitting the unrelated problems into separate topics, the missing symptoms and confirmation steps, and conflicts with other pages.

Content type: troubleshooting. The page helps a reader who is stuck on a problem (logs, GPU discovery, terminal errors) to find the cause and a fix, although it bundles many problems on one page.

Automated check, original: 1 errors, 16 warnings, 7 suggestions. Revised: 0 errors, 8 warnings, 0 suggestions.

Independent audit (GPT-6): improved. The revision is clearer and easier to scan, and it preserves the page’s instructions and link targets. I found no meaning changes that make the page worse; a couple of vague section headings remain.

What the revision missed:

  • The headings “Linux tmp noexec” and “Linux Docker” do not clearly tell a scanning reader what problem or task their sections cover.

Structure (3)

  • 13 The fence had no language label; it is now labeled text. The log line is unchanged. improved
  • 14 A bold line that acts as a heading became a level 3 heading, in sentence case. improved
  • 42 The fence had no language label; it is now labeled text. The log lines are unchanged. improved

Wording (43)

  • 1 Plainer words, and the instruction as a direct step. improved
  • 2 Active voice, as an instruction. improved
  • 3 A full sentence instead of a parenthetical. improved
  • 4 Names the reader as the actor, uses present tense, and "in" the terminal. improved
  • 5 Fixes the broken parallel structure ("hitting ... and type") and says "press". The key combination is unchanged. improved
  • 6 Present tense, a comma, and a final period. improved
  • 7 The parenthetical started with a capital letter and had no period; it is now its own sentence. improved
  • 8 Subject-verb agreement: "models and configuration are stored". improved
  • 9 Adds "to find" so the item has a verb, like the others in the list. improved
  • 10 Uses "turn on", ends the sentence before the code block with "run:", and writes "PowerShell" as Microsoft does. improved
  • 11 Fixes the run-on, the typo "an", "workaround" as a verb, "e.g.", the product name "macOS", and the tense. The performance claims are unchanged. improved
  • 12 Present tense and a complete parenthetical. improved
  • 15 Leads with the purpose, puts the variable name in code font, and removes extra commas. improved
  • 16 A lead-in that ends with a colon, as the code block follows. improved
  • 17 Puts the variable name in code font. improved
  • 18 Comma after "For example", the setting in code font, and a final period. improved
  • 19 The product name is "Docker". The heading anchor does not change. improved
  • 20 Capitalizes the product name Docker, uses active voice and "turning off", and shortens "after some period of time". improved
  • 21 Sentence case. The heading anchor does not change. improved
  • 22 Present tense. improved
  • 23 Sentence case. The heading anchor does not change. improved
  • 24 Link text names the destination ("Docker page"), "use" for "are using", and a final period. The link target is unchanged. improved
  • 25 Removes the stray article "the". improved
  • 26 Plain wording: "These". improved
  • 27 Adds the missing colon before the list. improved
  • 28 Turns the question into an instruction, ends the command with a period instead of a dash, and keeps the list in one voice. improved
  • 29 Puts the driver name in code font and replaces the dash with a colon and commas. The commands are unchanged. improved
  • 30 The company name is written "NVIDIA". improved
  • 31 Puts the program name in code font and adds a colon before the commands. The commands are unchanged. improved
  • 32 Sentence case. The heading anchor does not change. improved
  • 33 Capitalizes "Linux", replaces "and/or" with "or both", uses a contraction, and puts the sentence in present tense. improved
  • 34 Puts the process name in code font. improved
  • 35 Adds the missing final period. improved
  • 36 Shorter, and ends with a colon because a list follows. improved
  • 37 The item had no verb that linked the setting to its effect; it now says what the setting does, in the same form as the next item. improved
  • 38 Active voice, present tense, and the same form as the other items. improved
  • 39 Puts the program and driver names in code font and adds a colon before the commands. The commands are unchanged. improved
  • 40 Sentence case. The heading anchor does not change. improved
  • 41 Contraction, as in the voice. improved
  • 43 Capitalizes "Linux", adds the comma before "which", and uses present tense. improved
  • 44 In prose, write "version 7" rather than "v7". improved
  • 45 The bare URL became a link with descriptive text. The URL is unchanged. improved
  • 46 Removes "please", writes "for example" and "Windows 10" in full, uses a contraction, and fixes the missing period before the last sentence. The The parameter is incorrect message is unchanged. improved