HyperCPU H3 — GPU and sysctl telemetry handback
Completed 2026-09-23 on rdmsm4x in the isolated handoff clone. Root:
/Users/richh/dev/_handoff/hypercpu-gpu-sysctl-20260923-codex/apps/HyperCPU
Branch: codex/gpu-sysctl-20260923; base:
106b689b80ce97a4645adfd08badfa16289c4e27. Production / App
Store bound. Contract: LANES-H.md H3 and DEC-HYPERCPU-20260923-01. No
push, installation, helper activation, canonical source changes, or
Intel-host writes.
Separate deliverable commits
| Commit | Deliverable and reason |
|---|---|
2ec4cff |
Common IOAccelerator per-device GPU telemetry on both architectures;
additive optional gpus snapshot field and Apple Silicon
utilization tile replace the unavailable primary clock tile. |
970312c |
Binary sysctl system sampler at existing snapshot cadence in both
native and privileged providers; additive optional
systemStatistics; task/thread keys accurately labelled as
limits. |
370213d |
GPU and System chart tabs plus All integration; permanent series, full-opacity persistent legends, fixed 0–100 GPU utilization, window-retained growth-only memory/system axes, fixed first-observed maxfiles ceiling line, Space Blue palette. |
2aaa418 |
CFBundleVersion 3 in Support/Info.plist, Info.plist and project.yml to identify the new artifact. |
Evidence/documentation commit follows these four. All staging uses explicit paths.
Measurements and exact keys
Both architectures use public IOAccelerator
PerformanceStatistics. No IOReport fallback was necessary
for the requested GPU channels.
| Architecture | Utilization | Memory |
|---|---|---|
| Apple Silicon M4 Max / rdmsm4x | Device Utilization %,
Renderer Utilization %,
Tiler Utilization % |
In use system memory, Alloc system memory
(bytes; unified memory, not VRAM) |
| Intel + AMD Vega20 / rdmpw3275m | Device Utilization %; GPU Activity(%)
fallback |
inUseVidMemoryBytes is present and used for VRAM used.
Existing legacy discrete telemetry also uses vramFreeBytes
for total=used+free. Renderer/tiler and Apple unified-memory counters
remain unavailable. |
GPU Core Utilization remains a compatibility fallback
after the measured device/activity keys; it was not the source for these
host captures. Missing/invalid counters remain unavailable and produce
no zero/stale replacement samples. Real zero utilization is
retained.
Identity: the live backend walks IOService parents to the nearest
IOPCIDevice, grouping by its registry ID. Several services
on one PCI device yield one GPU, never a sum/average. Pick the most
complete PerformanceStatistics dictionary; break ties by accelerator
registry ID. Distinct physical cards with identical IOClass remain
distinct. AGX uses its accelerator registry ID when no PCI ancestor
exists. IOClass/name fallback exists only for older/injected backends
without registry identity.
AMD capture: eight current PerformanceStatistics records, four
distinct accelerator registry IDs. The earlier count of sixteen includes
PerformanceStatisticsAccum. Raw excerpts cannot establish parent PCI
IDs; synthetic fixtures test PCI deduplication, and live Intel traversal
remains unproven. Raw excerpts and recorded sysctl values:
Tests/PowerGadgetCoreTests/Fixtures/H3/.
Exact system keys on both architectures:
kern.num_filesvskern.maxfileskern.num_vnodesvskern.maxvnodeskern.num_tasks,kern.num_threadsvm.loadavg(1/5/15, Darwin fixed-point loadavg structure)vm.swapusage(total/used/free, Darwin xsw_usage structure)
The sampler uses sysctlbyname directly, not a subprocess, at each existing provider snapshot. No extra timer or entitlement. Read failures are unavailable with the OS error explanation. Integer width, missing/denied reads, invalid data, load scale, and recorded binary layouts are tested.
Semantic correction: XNU maps num_tasks to task_max and num_threads to thread_max. The chart says Task / Thread Limits; these are not current live counts. num_vnodes can exceed maxvnodes (the M4 capture does), so vnodes are not clamped. Source: https://github.com/apple-oss-distributions/xnu/blob/main/bsd/kern/kern_sysctl.c .
Validation
From the root above:
export CLANG_MODULE_CACHE_PATH=/private/tmp/hypercpu-h3/clang
export SWIFTPM_MODULECACHE_OVERRIDE=/private/tmp/hypercpu-h3/swiftpm
swift build && swift test
./scripts/build.shAll exit 0 outside the execution sandbox (SwiftPM manifest sandboxing requires this). 253 tests = 210 Swift Testing in 22 suites + 43 XCTest; zero failures. Baseline 237; added 5 GPU + 5 sysctl + 6 chart/compatibility tests. Existing 15 fade tests and 8 permanent-domain tests pass. No test removals. The pre-existing unused baselinePacketData test warning remains; release source compiles with warnings-as-errors.
Full logs: docs/evidence/h3/swift-build.log,
swift-test.log, release-build.log,
artifact-verification.txt. GPU fixture test log also
retained. Controls include real AMD VRAM, real Apple
renderer/tiler/memory, distinct same-class PCI cards, duplicate
services, real zeros, unavailable counters, malformed sysctls, history
expiry, nonshrinking envelope, fixed ceiling retention and old snapshot
decoding without the additive fields.
Built artifact
- App:
/Users/richh/dev/_handoff/hypercpu-gpu-sysctl-20260923-codex/apps/HyperCPU/dist/HyperCPU.app - ZIP: same directory,
dist/HyperCPU.zip. lipo -archs dist/HyperCPU.app/Contents/MacOS/HyperCPU: x86_64 arm64 (helper also Universal2).- Version: 1.0.0 (3); build script takes the bundle plist from Support/Info.plist.
- Authority: Apple Development: Richard Doty (S65Q255HA8) → Apple Worldwide Developer Relations Certification Authority → Apple Root CA.
- Team: ZU2882L4HT; hardened runtime; timestamp Sep 23 2026 22:58:21 EDT.
codesign --verify --deep --strict --verbose=2: valid on disk; satisfies its Designated Requirement, exit 0.- Executable SHA-256:
f300935564b528b37c1da8d49ec5f6caf68699d0a3ddc2c8f8a4a5c87f044b4e. - Existing build uses macOS 15.0 minimum in the Intel Mach-O slice; unchanged by this lane.
Sandboxed codesign initially reported unavailable authority/invalid signature; the same artifact verifies successfully outside that sandbox. Final verification file contains the successful command outputs and individual exit codes.
Boundaries / not proven
- No Intel executable ran or was installed; only authorized ioreg/sysctl OS measurements ran over SSH. Fixture coverage is not live Intel acceptance.
- No GUI launch, screenshot, sustained chart-performance test or visual acceptance; lead owns candidate installation and all-six-Mac QA.
- Default build.sh local Apple Development artifact; not a Developer ID notarized release or App Store sandboxed package. App Sandbox runtime access to these keys and App Store review acceptance remain unproven.
- The old unused Sources/App Xcode target was not migrated; build.sh builds Sources/PowerGadgetApp + PowerGadgetCore + PowerGadgetUI. Its legacy GPUReader is not used by this delivered artifact.
- GPU clock/residency remain unavailable where their own sources are unavailable. Utilization is never substituted into MHz or residency fields. Original four chart implementations/projections and menu bar strings retain their semantics.
- No claim of physical GPU count from a live parent traversal on AMD, only four distinct captured accelerator IDs.
Persistence and rollback
SESSION-STATE.md and local PROJECTS.md updated. Notes/archive publication is recorded separately below. Rollback before integration: discard this isolated branch/artifact. After integration, revert the four feature/build commits in reverse order; this lane never changed installed apps or user data. Source baseline remains in Git at 106b689.
Notes publication verified 2026-09-23 23:01 EDT: Notes / rdmsm4x / rdmsm4x-changelog-20260923-2301-HyperCPU-H3-GPU-and-system-telemetry. Archive copies saved under ~/dev/LLM/Claude/changelogs/ and ~/dev/LLM/Codex/changelogs/. No owner action is needed for persistence.
Exact implementation files touched
Info.plist
Package.swift
Sources/PowerGadgetCore/Coordinator/TelemetryDispatchCoordinator.swift
Sources/PowerGadgetCore/Intel/IOAcceleratorGPUReader.swift
Sources/PowerGadgetCore/Mocks/MockTelemetryProvider.swift
Sources/PowerGadgetCore/Models/GPUDeviceMetrics.swift
Sources/PowerGadgetCore/Models/HardwareTelemetrySnapshot.swift
Sources/PowerGadgetCore/Security/PrivilegedHelperTelemetryProvider.swift
Sources/PowerGadgetCore/System/SystemStatisticsSampler.swift
Sources/PowerGadgetUI/Cards/AppleSiliconCard.swift
Sources/PowerGadgetUI/Charts/GPUAndSystemCharts.swift
Sources/PowerGadgetUI/Charts/SeriesPresence.swift
Sources/PowerGadgetUI/Dashboard/DashboardView.swift
Sources/PowerGadgetUI/Models/ChartDataModels.swift
Support/Info.plist
Tests/PowerGadgetCoreTests/Fixtures/H3/rdmpw3275m-ioreg.txt
Tests/PowerGadgetCoreTests/Fixtures/H3/rdmpw3275m-sysctl.txt
Tests/PowerGadgetCoreTests/Fixtures/H3/rdmsm4x-ioreg.txt
Tests/PowerGadgetCoreTests/Fixtures/H3/rdmsm4x-sysctl.txt
Tests/PowerGadgetCoreTests/GPUDeviceTelemetryTests.swift
Tests/PowerGadgetCoreTests/H3ChartTests.swift
Tests/PowerGadgetCoreTests/SystemStatisticsTests.swift
project.yml
Documentation: HANDBACK.md, SESSION-STATE.md, PROJECTS.md, Tests/PowerGadgetCoreTests/Fixtures/H3/README.md and docs/evidence/h3/.