Introduction

In the past, I had troubles getting the ROCm installed and working properly on earlier versions of Ubuntu. Now that ROCm 6.2 has been released with support for Ubuntu 24.04, I have finally had success. The following code snippets have been gathered from the official documentation and adjusted/commented as per my experience.

Additionally, I’ve recorded a short video of my installation on Ubuntu Studio 24.04 LTS. Note my system build is at the bottom of this article as well as in the description of my video.

Official AMD Quick Start Guide

Install Radeon Repo

AMD provides an apt repository that you can use to install the binaries from. Here’s the code to get that added. Please see additional notes within the code:

 1sudo apt update
 2sudo apt install "linux-headers-$(uname -r)" "linux-modules-extra-$(uname -r)"
 3wget https://repo.radeon.com/amdgpu-install/6.2/ubuntu/noble/amdgpu-install_6.2.60200-1_all.deb
 4sudo apt install ./amdgpu-install_6.2.60200-1_all.deb
 5sudo apt update
 6# The following is just a quickstart:
 7# sudo apt install amdgpu-dkms rocm
 8
 9# Use the install script. Check usecases:
10sudo amdgpu-install --list-usecase
11
12# The following will install support for graphical workloads using the open source driver, ROCm support, and DKMS.
13# DKMS support is a minimum requirement for launching docker containers with GPU acccess.
14sudo amdgpu-install --usecase=graphics,rocm,dkms,opencl

Add yourself to render and video groups

I have moved the group add to AFTER the installation of the software:

1sudo usermod -a -G render,video $LOGNAME # Add the current user to the render and video groups
2
3# OPTIONAL:
4# If you want future added users to be added as well, do the following:
5echo 'ADD_EXTRA_GROUPS=1' | sudo tee -a /etc/adduser.conf
6echo 'EXTRA_GROUPS=video' | sudo tee -a /etc/adduser.conf
7echo 'EXTRA_GROUPS=render' | sudo tee -a /etc/adduser.conf

May be required

If using RDNA2 GPU, you may need to add the following to your ~/.profile

1export HSA_OVERRIDE_GFX_VERSION=10.3.0

If RDNA3 GPU:

1export HSA_OVERRIDE_GFX_VERSION=11.0.0

Integrated GPU and Discrete GPU?

The AMD documentation suggests disabling the integrated GPU via your bios since it may cause unforseen issues with the ROCm drivers. If you are unable to do this, then adding the following line to your ~/.profile may help.

I have disabled the integrated GPU in my BIOS so I did not add this line to my system.

Reference: Installation via AMDGPU installer

1export HIP_VISIBLE_DEVICES=0

Post-Installation

  • Now we add a config file that tells the system where to find shared objects for ROCm apps:
1sudo tee --append /etc/ld.so.conf.d/rocm.conf <<EOF
2/opt/rocm/lib
3/opt/rocm/lib64
4EOF
5sudo ldconfig
  • Add rocm binary path to environment
1echo 'export PATH=$PATH:/opt/rocm-6.2.0/bin' | sudo tee /etc/profile.d/rocm-path.sh 
2# If you only want this for your login, you could instead add the export line to your ~/.profile
3# echo 'export PATH=$PATH:/opt/rocm-6.2.0/bin' >> ~/.profile
  • Verify dynamic kernel module
1dkms status

reboot

After issueing the commands above and editing the necessary files, reboot your system.

After reboot, confirm ROCm installation by running:

1# NOTE: These are both in the /opt/rocm-6.2.0/bin folder which should be in your path after the reboot
2rocminfo
3clinfo

My Gear

Please Note: As an Amazon Associate, I earn from qualifying purchases.

Workstation Build: