Procyon Labs

**** COMMODORE 64 BASIC V2 ****

64K RAM SYSTEM 38911 BASIC BYTES FREE

AMD Instinct MI100 (CDNA / Vega 20) GPU on openSUSE Leap

openSUSEopenSUSE LeapAMD Instinct Data Center GPUAMD ROCm

Abstract

Behold! A repeatable procedure for openSUSE Leap 16 with AMD Instinct MI100 “Arcturus” CDNA 1.0 (gfx908) accelerators. AMD does not officially list Leap in the ROCm compatibility matrix – only SLES. This guide uses the SLES 16 package repository, which matches Leap 16’s kernel build, and keeps AMD’s own driver package out of the transaction entirely.

This procedure works because Leap 16 is now built from the same package base as SLE 16, and the running kernel here (6.12.x) matches the 6.12 kernel AMD tests SLES 16.0 against. This as an unsupported-but-pragmatic path, because I’ll do what I want.

For hypervisor PCIe passthrough systems, we’ll also tackle the “AMD reset bug” – where some older AMD GPUs (consumer Vega/Navi, and Instinct cards like the MI100 built on the same silicon) don’t implement a real PCIe FLR or bus reset, so a VM using PCI passthrough leaves the card in whatever state the guest driver left it after shutdown. On Proxmox, this shows up on the next VM start: vfio-pci’s reset call fails (Inappropriate ioctl for device), and QEMU hands the guest a half-initialized GPU with garbage config space (invalid PCI interrupt pin 255). vendor-reset fixes it by hard-coding AMD’s actual internal reset sequence per GPU generation, so the card comes back clean on every VM start instead of needing a full host power cycle.

Be advised that I jump around logically. These guides are my progress notes, and I often have to go back and re-write whole sections as a result of failures or sub-optimal results. Pick and choose what matters to you, but I recommend you go the intellectually curious route and play the whole game <3

Proxmox VE Hypervisor Preparation

Obviously you can skip this part if you’re on bare metal. If you’re using an inferior hypervisor, you can figure things out.

PCIe Passthrough / VFIO

PVE just doesn’t want to let go of devices. If left unaltered, it will claim all your GPUs – which makes them kinda hard to use in VMs. So let’s tell it what we want. What we really, really want.

Enable these in BIOS:

  • SVM (AMD CPU) or VT-x (Intel CPU) virtualization
  • IOMMU AMD-Vi or VT-d (Intel CPU)
  • Above 4G Decoding
  • SR-IOV, if present
  • UEFI boot / CSM disabled, ideally

Create a VFIO modules-load file:

Get Vendor IDs (substitute your model in place if not the MI100):

Add VFIO / Vendor IDs (replace the IDs with yours if different):

Blacklist host GPU drivers for passthrough cards:

We have to add a little something to /etc/default/grub to get IOMMU working.

For AMD CPU systems, this one liner does the trick:

For Intel CPU system, do this:

NOTE: Intel’s IOMMU grouping is often worse than AMD’s, so an extra NIC or USB controller sometimes rides along with the GPU in the same group. If your VM won’t start with vfio: device already attached that’s why.

Next, update grub and reboot!:

Vendor Reset Bug

The MI100 (Arcturus), as well as others from the same silicon era, don’t implement the standard PCIe FLR, so vfio-pci‘s generic reset path fails when a virtual machine utilizing these cards via PCIe passthrough is rebooted. The device is left with garbage in its config space (with restart errors like “invalid PCI interrupt pin 255”), until something performs AMD’s actual vendor-specific reset sequence. That usually involves a full host power reset. But that is quite inconvenient. So somebody glue together a fix. Well, a patch. Whatever.

vendor-reset is the standard fix – a kernel module that implements the correct reset sequence for GPUs that lack real FLR support.

If you’ve already experienced the error after rebooting the guest and are staring at it now, you’ll need to power cycle the host first (not just reboot). If the GPUs are already stuck from the failed attempt, vendor-reset can’t recover a device that’s mid-broken; it needs to take over from a clean state.

Now that’s out of the way, let’s do some repairs.

Install vendor-reset:

NOTE: vendor-reset has to load before vfio-pci claims the GPUs, or the kernel’s default (failing) reset path runs first and can wedge the device in a way vendor-reset can’t fix. Loading it via /etc/modules + regenerating initramfs ensures it’s available early in boot.

Verify after reboot…

Install and Ready the Operating Environment

Do a “Server” installation of openSUSE Leap 16. Pretty simple. From there, the adventure begins.

First, we need to verify that the GPU(s) are properly detected. I have four of these specific cards – your quantity and exact model will probably vary):

Install Prerequisites and Add AMD’s ROCm Repository

We’re using the SLES 16.0 package set for this effort:

Install the ROCm Userspace Stack

A lot of bits are going to be pulled in here. Don’t be alarmed:

What you’re actually getting:

  • amdrocm10.0: HIP runtime, core libraries, system tools
  • amdrocm-core-devel10.0: compilers, CMake config, headers, static libs
  • amdrocm-developer-tools10.0: rocm-smi, profiling tools

Group Membership and PATH

Group membership only takes effect in new login sessions. Either start a fresh shell with newgrp render, or fully log out and back in. Otherwise rocminfo will fail to open /dev/kfd with a permissions error even though everything installed correctly.

Verify GPU(s) are Visible

Pay attention to the “Name: ” listed for your GPU model. That is the ROCm LLVM Target Name. Mine is gfx908 as shown here. This is what you’ll feed tools like llama.cpp during compilation so they get tuned for your specific hardware.

Helpful Links

Proxmox PCI/GPU Passthrough

AMD reset bug / vendor-reset

ROCm on openSUSE Leap

llama.cpp + ROCm

EPYC / NUMA tuning background (if you want to get fancy)

, ,

Leave a Reply

Your email address will not be published. Required fields are marked *