Skip to main content

Fixing ROCm Boot Issues: amdgpu Module Blacklisted

A quick fix for when ROCm installation blacklists the amdgpu kernel module, preventing GPU detection on boot.

S

SmartTechLabs

SmartTechLabs - Intelligent Solutions for IoT, Edge Computing & AI

2 min read
Fixing ROCm Boot Issues: amdgpu Module Blacklisted

The Problem

After installing ROCm on a fresh Linux system, you reboot and… your AMD GPU isn’t detected. Running lsmod | grep amdgpu returns nothing.

What happened? During ROCm installation, the amdgpu kernel module can get added to the system’s blacklist, preventing it from loading at boot.


Symptoms

You might encounter this issue if:

  • rocm-smi shows no devices after a reboot
  • The GPU worked before ROCm installation
  • /etc/modprobe.d/ contains blacklist entries for amdgpu
  • dmesg | grep amdgpu shows no driver initialization

The Fix

We’ve created a simple script that resolves this issue: strix-halo-amdgpu-blacklisted

What It Does

  1. Removes Blacklist Entries: Cleans up modprobe blacklist files
  2. Rebuilds initramfs: Ensures the kernel loads the correct modules
  3. Verifies Configuration: Confirms the fix is in place

Usage

1
2
3
4
git clone https://github.com/smarttechlabs-projects/strix-halo-amdgpu-blacklisted.git
cd strix-halo-amdgpu-blacklisted
sudo ./fix-blacklist.sh
sudo reboot

Manual Fix

If you prefer to fix this manually:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Check for blacklist entries
grep -r "blacklist amdgpu" /etc/modprobe.d/

# Remove or comment out the blacklist line
sudo sed -i 's/blacklist amdgpu/#blacklist amdgpu/' /etc/modprobe.d/*.conf

# Rebuild initramfs (Ubuntu/Debian)
sudo update-initramfs -u

# Or for Fedora/RHEL
sudo dracut --force

# Reboot
sudo reboot

Why This Happens

The ROCm installer sometimes adds kernel module blacklists to prevent conflicts during installation. However, these blacklists can persist and cause issues:

CauseEffect
ROCm installer blacklistamdgpu doesn’t load at boot
Outdated initramfsOld blacklist cached in boot image
Multiple ROCm versionsConflicting modprobe configurations

Prevention

To avoid this issue in future ROCm installations:

  1. Check blacklists after installation: grep -r "blacklist" /etc/modprobe.d/
  2. Always rebuild initramfs: Run update-initramfs -u after ROCm changes
  3. Test before rebooting: Load the module manually with sudo modprobe amdgpu

Affected Systems

This issue has been observed on:

  • Ubuntu 22.04/24.04 with ROCm 6.x
  • AMD Ryzen AI Max 395 (Strix Halo)
  • Various RDNA 2/3 GPUs

Get the Script

Repository: smarttechlabs-projects/strix-halo-amdgpu-blacklisted

A simple fix for a frustrating problem. Star the repo if it helped you!


Running into other ROCm issues? Reach out—we’ve likely seen it before.

Share this article
S

SmartTechLabs

Building Intelligent Solutions: IoT, Edge Computing, AI & LLM Integration