Skip to content

Instantly share code, notes, and snippets.

@furaar
Created August 2, 2024 15:12
Show Gist options
  • Save furaar/ee05a5ef673302a8e653863b6eaedc90 to your computer and use it in GitHub Desktop.
Save furaar/ee05a5ef673302a8e653863b6eaedc90 to your computer and use it in GitHub Desktop.
Step-by-step guide to install AMD ROCm on Ubuntu with RX6600 GPU. Includes setting up Ollama and running Llama 3.1 model. Perfect for machine learning and GPU-heavy tasks!

AMD ROCm Installation Guide on RX6600 + Ollama

System Information

            .-/+oossssoo+/-.               x@furaar 
        `:+ssssssssssssssssss+:`           -------- 
      -+ssssssssssssssssssyyssss+-         OS: Ubuntu 22.04.4 LTS x86_64 
    .ossssssssssssssssssdMMMNysssso.       Host: redacted 
   /ssssssssssshdmmNNmmyNMMMMhssssss/      Kernel: 6.5.0-45-generic 
  +ssssssssshmydMMMMMMMNddddyssssssss+     Uptime: 2 hours, 40 mins 
 /sssssssshNMMMyhhyyyyhmNMMMNhssssssss/    Packages: 1820 (dpkg), 11 (snap) 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Shell: bash 5.1.16 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   Resolution: 2560×1440
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   DE: GNOME 42.9 
ossyNMMMNyMMhsssssssssssssshmmmhssssssso   WM: Mutter 
+sssshhhyNMMNyssssssssssssyNMMMysssssss+   WM Theme: Adwaita 
.ssssssssdMMMNhsssssssssshNMMMdssssssss.   Theme: Yaru-blue-dark [GTK2/3] 
 /sssssssshNMMMyhhyyyyhdNMMMNhssssssss/    Icons: Yaru-blue [GTK2/3] 
  +sssssssssdmydMMMMMMMMddddyssssssss+     Terminal: gnome-terminal 
   /ssssssssssshdmNNNNmyNMMMMhssssss/      CPU: AMD Ryzen 9 6900HX with Radeon  
    .ossssssssssssssssssdMMMNysssso.       GPU: AMD ATI Radeon RX 6600/6600 XT/ 
      -+sssssssssssssssssyyyssss+-         GPU: AMD ATI e8:00.0 Rembrandt 
        `:+ssssssssssssssssss+:`           Memory: 4023MiB / 31356MiB 
            .-/+oossssoo+/-.                            

Install Essentials and Monitoring Tool

sudo apt update && sudo apt upgrade
sudo apt-get install neofetch htop wget curl

Install the Latest Supported Kernel

sudo apt install linux-image-generic
sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt install grub-customizer
  • Launch Grub Customizer from Activities.
  • Go to the General tab
  • Set default entry > predefined field to Advanced options for Ubuntu > Ubuntu, with Linux x.x.x-x-generic
  • Save changes and sudo reboot

Ensure to boot into the configured kernel at the boot menu.

Install latest linux headers

sudo apt install "linux-headers-$(uname -r)" "linux-modules-extra-$(uname -r)"

ROCM Installation

Add Current and Future Users to Render and Video Groups

sudo usermod -a -G render,video $LOGNAME
echo 'ADD_EXTRA_GROUPS=1' | sudo tee -a /etc/adduser.conf
echo 'EXTRA_GROUPS=video' | sudo tee -a /etc/adduser.conf
echo 'EXTRA_GROUPS=render' | sudo tee -a /etc/adduser.conf

Update Repositories and Fetch the AMDGPU Package

sudo apt update
wget https://repo.radeon.com/amdgpu-install/6.1.3/ubuntu/focal/amdgpu-install_6.1.60103-1_all.deb
sudo apt install ./amdgpu-install_6.1.60103-1_all.deb

Run the AMDGPU Installer

sudo amdgpu-install --no-dkms --usecase=hiplibsdk,rocm
sudo rocminfo
sudo reboot

Set Environment Variables to Bypass Unsupported Hardware Errors

HSA_OVERRIDE_GFX_VERSION=10.3.0
HIP_VISIBLE_DEVICES=1

Install ollama

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

Edit the Ollama Service File

sudo nano /etc/systemd/system/ollama.service

Add these lines under the existing Environment key:

Environment="HSA_OVERRIDE_GFX_VERSION=10.3.0"
Environment="ROCR_VISIBLE_DEVICES=0"

Reload the daemon and Ollama service:

sudo systemctl daemon-reload
sudo systemctl restart ollama

Install and Run Llama3.1 Model

ollama run llama3.1

Monitor GPU Usage

watch -n 1 rocm-smi

Uninstall AMDGPU Install

amdgpu-install --uninstall
@Set27
Copy link

Set27 commented Aug 31, 2025

How I can find out latest driver for AMD ATI Radeon RX 6600/6600 XT/6600M?
That supported ROCM?

@afrolino02
Copy link

How I can find out latest driver for AMD ATI Radeon RX 6600/6600 XT/6600M? That supported ROCM?

yeah, by default the amdgpu driver uses ROCM you can find it via PPA if you're in ubuntu, or downloading in Arch repositories if you use arch

@Set27
Copy link

Set27 commented Sep 1, 2025

How I can find out latest driver for AMD ATI Radeon RX 6600/6600 XT/6600M? That supported ROCM?

yeah, by default the amdgpu driver uses ROCM you can find it via PPA if you're in ubuntu, or downloading in Arch repositories if you use arch

According to AMD page, 6600xt does not support ROCM at all)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment