Running Ollama with AMD GPU Acceleration on Fedora

Robert ·

Screenshot 20260317 150857 1024x705

I have wanted to run local LLMs on my gaming rig for some time now. But I found that there might be a lot of hurdles and that setting up Ollama on a Linux host with AMD GPU acceleration could prove especially tricky. But this week, I decided to do it anyway and push through. So I try to explain what I did in this article and show you how you can install Ollama locally on a Fedora system with an AMD GPU.

This explanation doesn’t currently explain what went wrong for me to begin with. It does show how I managed to get the GPU acceleration to work for inference with Ollama.

The Problem

On paper, Ollama supports AMD GPUs via ROCm. In reality:

Despite having ROCm installed correctly, Ollama simply was not using the GPU.

Root Cause

The key issue is architectural:

This mismatch causes:

The Fix

The working solution required three key steps:

  1. Install the ROCm-enabled Ollama build
  2. Set a compatibility override for the GPU
  3. Configure systemd correctly

Once those were in place, Ollama successfully detected:

total_vram="12.0 GiB"

…and began using the GPU.

Full Setup Guide

1. Install ROCm on Fedora

sudo dnf install kernel-devel kernel-headers dkms \
rocm-hip rocm-runtime rocminfo rocm-smi rocm-opencl

Add your user to GPU groups:

sudo usermod -aG video $USER
sudo usermod -aG render $USER

Reboot after this step. (You could use the ‘newgrp’ command to add your user to the groups for the session and avoid doing a reboot. But I found that a reboot also helps to test that you have in fact added the user to the groups permanently.)

2. Install Ollama with ROCm Support

This is critical: the ROCm backend is a separate package.

sudo systemctl stop ollama

sudo rm -rf /usr/lib/ollama

curl -fsSL https://ollama.com/download/ollama-linux-amd64.tar.zst \
| sudo tar --zstd -x -C /usr

curl -fsSL https://ollama.com/download/ollama-linux-amd64-rocm.tar.zst \
| sudo tar --zstd -x -C /usr

3. Configure systemd

Edit the Ollama service:

sudo systemctl edit ollama

Add:

[Service]
Environment="HSA_OVERRIDE_GFX_VERSION=10.3.0"
SupplementaryGroups=render video

Note: Make sure to add this section above the line that says: “Edits below this comment will be discarded”

4. Ensure Service Has GPU Access

Ollama runs as its own user, so you must grant it access:

sudo usermod -a -G render,video ollama

Optional but recommended in the override file. You should already have this if you followed the previous step:

[Service]
SupplementaryGroups=render video

5. Restart Ollama

sudo systemctl daemon-reload
sudo systemctl restart ollama

Verifying It Works

Check logs:

journalctl -u ollama -n 20 --no-pager

You should see:

total_vram="12.0 GiB"

Then test a model:

ollama run deepseek-r1:7b

Check whether the GPU is being used:

ollama ps

Look for:

Screenshot 20260317 151335 1 1024x136
PROCESSOR: 100% GPU

Monitoring GPU Usage

rocm-smi

In a terminal, type:

watch -n1 rocm-smi

You should see:

Screenshot 20260317 151121 1024x222

radeontop

In a terminal, type:

radeontop

You should see:

Screenshot 20260317 151518 1024x704

Using Ollama

To use ollama you can simple run ‘ollama run <modelname>’ in a terminal. Or, if you want to use something like Claude, you can run ‘ollama launch claude’.

You should see a chat interface in the terminal. THis is not the nice web interface that most people are used to. So that will be next. Install Open WebUI for Ollama.

Screenshot 20260317 152221 1024x693

Links and References

https://docs.ollama.com/linux#manual-install – How to manually install Ollama on Linux. You will need to do this so that the AMD GPU is supported.