Enable GPUs on IBM POWER8/POWER9 and PowerPC Mac systems by bypassing OpenFirmware/OPAL PCIe enumeration issues.
Two approaches:
- Internal PCIe - Rescan internal slots after boot (no extra hardware!)
- OCuLink External - Add more GPUs via SFF-8612 adapters
IBM POWER and PowerPC Mac systems have restrictive firmware (OPAL/OpenFirmware) that often fails to properly enumerate modern GPUs during boot. This prevents using GPUs even when the hardware is fully capable.
If your GPU is already in an internal PCIe slot but not detected at boot:
# Quick test - may work without kernel patch!
sudo ./scripts/pnv-php-rescan.sh
# If that doesn't work, apply the kernel patch first
# See: patches/pnv-php-oculink.patchHow it works:
- Boot system (OPAL ignores GPU, no device tree entry)
- Load patched
pnv_phpdriver with bypass mode - Trigger PCIe bus rescan
- GPU appears in Linux!
Use a generic PCIe x4 OCuLink adapter card to connect GPUs externally. Since OCuLink is electrically just PCIe, we can:
- Boot the system with only the adapter installed
- Connect the GPU via OCuLink cable after boot
- Force Linux to rescan the PCIe bus
- GPU appears and drivers load normally
┌─────────────────────────────────────────────────────────────┐
│ POWER8/G5 System │
│ │
│ PCIe Slot ──► OCuLink Adapter ──► SFF-8612 Cable ──► GPU │
│ │ (passive) │ (Tesla) │
│ │ │ │
│ Firmware sees: Linux sees: │
│ "Generic PCIe "NVIDIA Tesla" │
│ Bridge" via PCIe rescan │
└─────────────────────────────────────────────────────────────┘
| System | GPU Support | Notes |
|---|---|---|
| POWER8 S824/S822LC | K80, M40, P100, V100 | NVIDIA 440.x drivers |
| POWER9 AC922/IC922 | V100, A100 | NVIDIA 450.x+ drivers |
| System | GPU Support | Notes |
|---|---|---|
| Power Mac G5 (PCIe, Late 2005) | AMD Radeon HD/R series | radeon/amdgpu drivers |
| Power Mac G5 (AGP) | ❌ Not supported | No PCIe slots |
| G4 systems | ❌ Not supported | No PCIe slots |
Note: NVIDIA proprietary drivers do NOT support big-endian PowerPC. However, G5 CPUs are bi-endian - see Endianness Conversion below.
PowerPC CPUs (PPC970/G5, POWER8/9) are bi-endian - they can run in either big-endian or little-endian mode!
| Mode | NVIDIA Support | AMD Support |
|---|---|---|
| ppc64le (little-endian) | ✅ Full | ✅ Full |
| ppc64 (big-endian) | ❌ None | ✅ radeon/nouveau |
# Check current mode
./scripts/endian-convert.sh check
# Output:
# Current endianness: little ← NVIDIA works!
# Current endianness: big ← Need conversion-
Install ppc64le Linux (Recommended)
- Void Linux, Gentoo, Ubuntu ppc64el
- See docs/ENDIAN_CONVERSION.md
-
Use nouveau on big-endian
- Apply
patches/nouveau-bigendian.patch - Limited but functional
- Apply
-
Use AMD GPUs
- radeon/amdgpu work on both BE and LE
# G5 Mac conversion guide
./scripts/endian-convert.sh g5-guide
# POWER8/9 conversion guide
./scripts/endian-convert.sh power-guide-
OCuLink Adapter Card - Generic PCIe x4 to SFF-8612
- ~$20-50 on Amazon/AliExpress
- Must be passive/transparent (no special chipset)
-
OCuLink Cable - SFF-8612 to SFF-8612
- Length: 0.5m - 1m recommended
- Shielded cables recommended for signal integrity
-
GPU - NVIDIA Tesla or AMD Radeon
- Must have external power connectors
- PCIe x16 GPUs work at x4 bandwidth (reduced but functional)
-
External Power - GPU PSU or ATX supply
- Tesla cards: 6-pin or 8-pin PCIe power
- Most Tesla cards need 150-300W
# Clone repo
git clone https://github.com/Scottcjn/oculink-gpu-bypass.git
cd oculink-gpu-bypass
# Install scripts
sudo mkdir -p /opt/oculink-gpu-bypass
sudo cp scripts/*.sh /opt/oculink-gpu-bypass/
sudo chmod +x /opt/oculink-gpu-bypass/*.sh
# Install systemd service (optional - auto-rescan on boot)
sudo cp scripts/oculink-gpu.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable oculink-gpu
# Connect GPU via OCuLink, then:
sudo /opt/oculink-gpu-bypass/oculink-gpu-rescan.sh# Download and install Tesla driver 440.64
sudo /opt/oculink-gpu-bypass/install-nvidia-power.sh install
# Optionally install CUDA 10.2
sudo /opt/oculink-gpu-bypass/install-nvidia-power.sh cuda# For AMD GPUs on G5 Macs running Linux
sudo /opt/oculink-gpu-bypass/oculink-powerpc-mac.sh# Full PCIe bus rescan
sudo /opt/oculink-gpu-bypass/oculink-gpu-rescan.sh
# Rescan specific slot
sudo /opt/oculink-gpu-bypass/oculink-gpu-rescan.sh --slot 0000:00:01.0If the GPU triggers EEH (Enhanced Error Handling) errors:
# Check for frozen PCIe endpoints
sudo /opt/oculink-gpu-bypass/eeh-recovery.sh check
# Attempt recovery
sudo /opt/oculink-gpu-bypass/eeh-recovery.sh recover
# View OPAL error messages
sudo /opt/oculink-gpu-bypass/eeh-recovery.sh monitor# Check PCIe devices
lspci | grep -i nvidia
lspci | grep -i amd
# NVIDIA status
nvidia-smi
# AMD status
cat /sys/class/drm/card0/device/gpu_busy_percent- Check cable connection - OCuLink cables must be fully seated
- Check GPU power - Tesla cards need external power
- Check dmesg -
dmesg | tail -50 | grep -i pci - Try manual enable -
setpci -s XX:XX.X COMMAND=0x0007
POWER systems may freeze the PCIe slot on errors:
# Check EEH state
cat /proc/powerpc/eeh
# Disable EEH (risky, but may help)
# Add to kernel cmdline: eeh=off# Check kernel compatibility
uname -r
modinfo nvidia
# Rebuild DKMS
dkms autoinstall
# Check blacklist
cat /etc/modprobe.d/blacklist-nouveau.confAdd to GRUB cmdline for troubleshooting:
# Force PCIe reallocation
pci=realloc pci=assign-busses
# Disable EEH (POWER only - risky)
eeh=off
# Verbose PCIe debug
pci=debug
- OCuLink x4 provides ~4 GB/s bandwidth (PCIe 3.0 x4)
- Tesla compute workloads are less bandwidth-sensitive
- CUDA kernels run at full speed on the GPU
- Data transfer is bottlenecked vs native x16
Benchmark comparison (V100 via OCuLink x4 vs native x16):
| Workload | Native x16 | OCuLink x4 | Difference |
|---|---|---|---|
| GEMM (compute-bound) | 100% | 98% | -2% |
| Large batch inference | 100% | 95% | -5% |
| Memory-bound ops | 100% | 75% | -25% |
| System | GPU | Driver | Status |
|---|---|---|---|
| IBM POWER8 S824 | Tesla M40 | 440.64 | 🔄 Pending (OCuLink) |
| IBM POWER8 S824 | Tesla K80 | 440.64 | 🔄 Pending (OCuLink) |
| IBM POWER8 S824 | Tesla V100 | 440.64 | 🔄 Pending (OCuLink) |
| Power Mac G5 Dual 2.0 | AMD Radeon | radeon | 🔄 Pending |
Note: This project is in active development. Hardware testing pending OCuLink adapter installation.
MIT License - (c) 2025 Elyan Labs
Pull requests welcome! Please test on actual hardware before submitting.
- RustChain - PowerPC mining with antiquity bonuses
- PSE llama.cpp - POWER8 optimized LLM inference
- IBM POWER8 CUDA Guide (Redpaper)
- NVIDIA Tesla Driver Archive
- CUDA Toolkit Archive
- OCuLink SFF-8612 Specification