Skip to content

Add Apple M5 Max support (unified M-cluster architecture)#92

Open
ProducerGuy wants to merge 2 commits into
tlkh:mainfrom
ProducerGuy:main
Open

Add Apple M5 Max support (unified M-cluster architecture)#92
ProducerGuy wants to merge 2 commits into
tlkh:mainfrom
ProducerGuy:main

Conversation

@ProducerGuy
Copy link
Copy Markdown

Summary

asitop crashes on Apple M5 Max with KeyError: 'E0-Cluster_active'. The M5 uses a unified M0-Cluster architecture instead of the E-Cluster/P-Cluster naming used by M1-M4.

Changes:

  • parsers.py: Detect M-prefixed clusters and handle missing E/P cluster aggregates gracefully. M-cluster data maps to the P-CPU display; E-CPU shows 0% (M5 has no efficiency cores)
  • utils.py: Add M5 Max TDP (45W CPU, 75W GPU) and memory bandwidth (546 GB/s)

Root Cause

parse_cpu_metrics() assumes all chips have E-Cluster and P-Cluster entries from powermetrics. When E-Cluster_active is missing, it unconditionally tries E0-Cluster_active (M1 Ultra path), which also doesn't exist on M5. Same issue for P-Cluster aggregation.

The M5 Max reports a single M0-Cluster containing all 18 CPU cores (6 Super + 12 Performance). The cluster name starts with M, not E or P.

Testing

Tested on Apple M5 Max (128GB, macOS 26.3.1). asitop displays live dashboard correctly:

  • GPU Usage, frequency, and power tracking works
  • P-CPU shows M0-Cluster utilization and frequency
  • E-CPU shows 0% (correct — no efficiency cores)
  • Power charts (CPU/GPU/ANE) all functional
  • RAM and swap reporting works

Before (crash)

KeyError: 'E0-Cluster_active'
  File "asitop/parsers.py", line 100, in parse_cpu_metrics

After (working)

Live dashboard showing Apple M5 Max (cores: 12E+6P+40GPU) with all metrics functional.

Producer Guy added 2 commits May 16, 2026 14:39
M5+ uses M0-Cluster naming instead of E-Cluster/P-Cluster. The parser
crashed with KeyError on E0-Cluster_active. Fix handles missing E/P
clusters by detecting M-prefixed clusters and mapping them to the
existing P-Cluster display. E-Cluster shows 0% (no efficiency cores
on M5). Adds M5 Max TDP (45W CPU, 75W GPU) and bandwidth (546 GB/s).
Rewrite README for the M5-supporting fork: installation from fork,
supported hardware table, M5 fix explanation. Add llms.txt for
AI agent discoverability.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant