Home / Guides / Troubleshooting / Linux
Linux
Written by Jakub Rusinowski · Last updated September 1, 2026
AI educator & workshop leader on local LLM deployment
Unable to open /dev/kfd read-write: Permission denied
rocminfo: HSA_STATUS_ERROR_OUT_OF_RESOURCES
hsa api call failure at: ... HSA_STATUS_ERROR_OUT_OF_RESOURCES
| If you see | The cause is | Go to |
|---|---|---|
sudo rocminfo works and plain rocminfo does not | Your user is not in the render and video groups | Fix 1: add the groups — this asymmetry is the whole diagnosis |
You ran usermod and groups still does not show them | Group membership is established at login | Fix 2: log out and back in |
| It works for you but the Ollama service still cannot use the GPU | The service runs as the ollama user, which needs the groups too | Fix 3: add the service user |
| Permission denied inside a container only | Host group IDs were not passed into the container | Fix 4: --group-add with numeric IDs |
| Neither group exists on this distribution | Different distros name and own these nodes differently | Fix 5: a udev rule is the durable answer |
The tell is an asymmetry, and it is diagnostic on its own: run the exact same command with sudo and it works, run it as yourself and it fails. Nothing about ROCm, your card, or your driver is wrong. You cannot open the device file.
rocminfo fails the first time you run it as your own user.ROCm reaches the GPU through two device nodes: /dev/kfd, the compute node the kernel fusion driver exposes, and /dev/dri/render*, the render nodes. Both are owned by system groups — conventionally render and video — precisely so that arbitrary local users cannot submit work to the GPU. Your account is in neither by default, so every ROCm call fails at open(). sudo bypasses the check, which is why the workaround appears to work and why so many people end up running inference as root without realising they never fixed anything. The error surfaces confusingly downstream: HSA_STATUS_ERROR_OUT_OF_RESOURCES sounds like a memory problem and is very often this permission problem seen one layer up.
One command, and it is the documented prerequisite in AMD's own ROCm installation guide. -a matters: without it, usermod -G replaces your entire group list rather than appending to it, which can remove you from sudo and lock you out of administration on the machine.
⚠️ Always include -a. sudo usermod -G video,render $LOGNAME without it replaces every secondary group you belong to, sudo included, and on a machine with no other administrator that is a recovery-media problem.
# bash
sudo usermod -a -G video,render $LOGNAME
# Confirm the account record was updated (this does NOT mean it is active yet)
id -nG $LOGNAME
ls -l /dev/kfd /dev/dri/render*id -nG lists render and video. Note this reads the account database — your current session still does not have them, which fix 2 is about.id -nG $LOGNAME | tr ' ' '\n' | grep -E '^(render|video)