[GH-ISSUE #10691] ollama not using AMD GPU and using CPU instead #7028

Closed
opened 2026-04-12 18:56:02 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @WhyNotHugo on GitHub (May 13, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/10691

What is the issue?

On my host, ollama isn't using the gpu. It also logs that the version parameter is not exposed via sysfs:

level=WARN source=amd_linux.go:61 msg="ollama recommends running the https://www.amd.com/en/support/linux-drivers" error="amdgpu version file missing: /sys/module/amdgpu/version stat /sys/module/amdgpu/version: no such file or directory"
level=INFO source=amd_linux.go:386 msg="amdgpu is supported" gpu=GPU-8668c3be2237aa5f gpu_type=gfx1100
level=INFO source=types.go:130 msg="inference compute" id=GPU-8668c3be2237aa5f library=rocm variant="" compute=gfx1100 driver=0.0 name=1002:744c total="20.0 GiB" available="14.6 GiB"

The amdgpu module is loaded:

> lsmod | grep ^amdgpu 
amdgpu              11591680  66

It also exposes quite a few other parameters, but no version:

> ls -1F /sys/module/amdgpu/ 
coresize
drivers/
holders/
initsize
initstate
notes/
parameters/
refcnt
sections/
taint
uevent

When executing a model, I also see:

ggml_cuda_init: failed to initialize ROCm: no ROCm-capable device is detected

GPU usage remains at 0%, only CPU is used. I'm running ollama via docker:

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

Relevant log output


OS

Linux

GPU

AMD

CPU

Intel

Ollama version

ollama version is 0.6.8

Originally created by @WhyNotHugo on GitHub (May 13, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/10691 ### What is the issue? On my host, ollama isn't using the gpu. It also logs that the version parameter is not exposed via `sysfs`: ``` level=WARN source=amd_linux.go:61 msg="ollama recommends running the https://www.amd.com/en/support/linux-drivers" error="amdgpu version file missing: /sys/module/amdgpu/version stat /sys/module/amdgpu/version: no such file or directory" level=INFO source=amd_linux.go:386 msg="amdgpu is supported" gpu=GPU-8668c3be2237aa5f gpu_type=gfx1100 level=INFO source=types.go:130 msg="inference compute" id=GPU-8668c3be2237aa5f library=rocm variant="" compute=gfx1100 driver=0.0 name=1002:744c total="20.0 GiB" available="14.6 GiB" ``` The amdgpu module is loaded: ```console > lsmod | grep ^amdgpu amdgpu 11591680 66 ``` It also exposes quite a few other parameters, but no `version`: ```con > ls -1F /sys/module/amdgpu/ coresize drivers/ holders/ initsize initstate notes/ parameters/ refcnt sections/ taint uevent ``` When executing a model, I also see: ``` ggml_cuda_init: failed to initialize ROCm: no ROCm-capable device is detected ``` GPU usage remains at 0%, only CPU is used. I'm running ollama via docker: ```console docker run --rm --name ollama --device /dev/kfd --device /dev/dri -v ollama:/root/.ollama -p 11434:11434 ollama/ollama:rocm ``` ### Relevant log output ```shell ``` ### OS Linux ### GPU AMD ### CPU Intel ### Ollama version ollama version is 0.6.8
GiteaMirror added the bug label 2026-04-12 18:56:02 -05:00
Author
Owner

@WhyNotHugo commented on GitHub (May 13, 2025):

Figured it out!

The user running ollama needs access to /dev/dri/renderD128. Changing file ownership works as a quick fix. Usages should be safe; this device is used only for rendering, and should not provide access to, e.g.: the current display's buffer.

<!-- gh-comment-id:2877682721 --> @WhyNotHugo commented on GitHub (May 13, 2025): Figured it out! The user running ollama needs access to `/dev/dri/renderD128`. Changing file ownership works as a quick fix. Usages should be safe; this device is used only for rendering, and should not provide access to, e.g.: the current display's buffer.
Author
Owner

@WhyNotHugo commented on GitHub (May 13, 2025):

Maybe ollama could explicitly check for access to this file and warn if permissions need to be tweaked?

<!-- gh-comment-id:2877683324 --> @WhyNotHugo commented on GitHub (May 13, 2025): Maybe ollama could explicitly check for access to this file and warn if permissions need to be tweaked?
Author
Owner

@Nyx1197 commented on GitHub (May 14, 2025):

maybe add /dev/fb0 ?

<!-- gh-comment-id:2878897980 --> @Nyx1197 commented on GitHub (May 14, 2025): maybe add `/dev/fb0` ?
Author
Owner

@rick-github commented on GitHub (May 14, 2025):

The usual way to do this is to add the user running ollama to the render group.

https://github.com/ollama/ollama/blob/main/docs/troubleshooting.md#amd-gpu-discovery

<!-- gh-comment-id:2879712306 --> @rick-github commented on GitHub (May 14, 2025): The usual way to do this is to add the user running ollama to the `render` group. https://github.com/ollama/ollama/blob/main/docs/troubleshooting.md#amd-gpu-discovery
Author
Owner

@WhyNotHugo commented on GitHub (May 14, 2025):

On Alpine, the node is owned by root:video by default, so I configured my host to use root:gpu and added the user to that group.

At this point my issue is solved. Not sure if you want to leave the issue open to track "show a clear error message when permissions are wrong" or just close it.

<!-- gh-comment-id:2879731523 --> @WhyNotHugo commented on GitHub (May 14, 2025): On Alpine, the node is owned by `root:video` by default, so I configured my host to use `root:gpu` and added the user to that group. At this point my issue is solved. Not sure if you want to leave the issue open to track "show a clear error message when permissions are wrong" or just close it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#7028