Repository navigation
Report the Apple silicon GPU under Asahi Linux - #116
Open
nadalbatle wants to merge 1 commit into
Open
nadalbatle wants to merge 1 commit into
nadalbatle wants to merge 1 commit into
Conversation
The GPU probe skipped every DRM device that is not on PCI, so the Apple GPU on Asahi (a platform device with no gpu_busy_percent) was never reported. Add probe_agx: it reads cumulative busy time from agx_stats and turns the delta since the previous call into a utilization, and reads resident and limit memory from gpu_memory. Temperature stays 0, as the SMC exposes no GPU temperature. Co-Authored-By: Claude Opus 5.5 <[email protected]>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On Apple silicon running Asahi Linux, the GPU telemetry shows no GPU. The Apple GPU is a DRM platform device (
/sys/class/drm/card0/device -> /sys/devices/platform/soc/206400000.gpu), soprobe_drmdrops it at the PCI-slot check. It also has nogpu_busy_percent. Instead it exposes:agx_stats, with cumulativebusy_ns(plusjobs,pstate,power_mw)gpu_memory, withuser_resident,kernel_residentandlimitin bytesThis PR adds
probe_agxtohancore.shibumi.cpu/scripts/shibumi-gpu-probe:busy_nsdelta divided by the wall-clock delta since the previous call. The previous sample is kept in a per-card state file in$XDG_RUNTIME_DIR, overridable withSHIBUMI_GPU_STATE_DIR, andSHIBUMI_GPU_NOW_NSmakes it testable. The first call reads 0.user_resident + kernel_resident, total islimit, both in MiB.platform:<device>, for exampleplatform:206400000.gpu, and the name isApple GPU. The existing records, and NVIDIA/PCI DRM devices, are unchanged.Affected plugins
hancore.shibumi.cpu(GPU probe helper), whichhancore.shibumi.gpuandhancore.shibumi.telemetryconsumeChecks
tests/gpu-probe-regression.shpasses. It includes a new Apple GPU case: a platform device fixture, a first sample at 0 %, then a 50 % busy-time delta, memory 3072/8192 MiB, and the device reported once.aurora). Three samples at 1.5 s, the telemetry interval:OMARCHY_PATH=/usr/share/omarchy ./tests/contract-regression.shstops early on my machine withOmarchy baseline inventory count drift: shell expected 320, got 356. The cause is the host: I run the omarchy-dev (edge) package, not the pinned 4.5.0-3, so it is unrelated to this change. I could not run the full contract against the pinned baseline.Remaining gate
I have not checked the visible GPU card and panel on a live Shibumi session yet; that will follow once I have Shibumi installed on this machine. Nothing in QML changed.
GpuPanel.qmlalready falls back to showing the raw id for non-pci:ids.🤖 Generated with Claude Code