feat(gpu_fdinfo): support Intel integrated GPU metrics#2080
Open
JohnnySun wants to merge 4 commits into
Open
Conversation
c1070aa to
dcb3704
Compare
dcb3704 to
4271997
Compare
Use i915 system0 and xe gtt fdinfo memory when Intel integrated GPUs do not expose local or VRAM memory keys, so SteamOS mangoapp presets can display current-process shared GPU memory in the vram row. Treat missing fdinfo hwmon metrics as unavailable instead of rendering zero-valued temperature, power, fan, voltage, or memory clock readings.
When MANGOAPP_FRAME_FEED=1, export a rolling 2s frame summary (avg fps, p95 frame ms, spike count/worst) as atomic JSON at ~2Hz to $XDG_RUNTIME_DIR/steamos-intel-handheld/frame-feed.json (path override: MANGOAPP_FRAME_FEED_FILE) for the steamos-intel-handheld game power governor. Hooked on the gamescope msg frame path outside the overlay display guard, so the feed flows with the overlay hidden. Zero overhead when the env var is unset; I/O errors disable the feed for the session. Validated live on the MSI Claw 8 AI+ (2Hz cadence, sane values, daemon consumed it as a high-confidence frame source). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AJSepardSVWMwEuwBi9WTZ
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
uncoreenergy counter from/sys/class/powercapwhen no Intel DRM hwmon power or energy sensor is presenti915/xehwmon power and energy behavior preferred over the RAPL fallbackdrm-resident-system0oni915,drm-resident-gttonxe) when local or VRAM fdinfo memory is absentvramoverlay row so SteamOSmangoapppresets show useful memory usage without claiming total system VRAM support0values for temperature, power, fan, voltage, or memory clockmangoappWhy
Some Intel handheld systems using the
xedriver expose fdinfo load, GT frequency, throttling, and process-scoped shared memory, but do not expose a DRM hwmon power or temperature sensor. On the tested SteamOS 3.8.11 MSI Claw 8 AI+ system, GPU energy is exposed through the powercapuncoredomain and GPU memory is exposed in/proc/<pid>/fdinfoas nonzerodrm-resident-gttvalues.This keeps the existing Intel discrete path intact: if
i915orxeexposes local or VRAM fdinfo memory and hwmon power/energy sensors, those remain the selected sources. The fallback is only used for integrated Intel devices where the usual local or VRAM fdinfo memory key is missing.This PR does not synthesize GPU temperature. If the kernel does not expose a DRM hwmon temperature input, the HUD now leaves the unavailable temperature hidden instead of rendering
0 C.Verification
git diff --check upstream/master..HEADmangoapptarget from this branch in a SteamOS x86_64 build environment; produced BuildID056418c4c27aece7b226e5c24807ec33ca8810e4mangoappon a SteamOS 3.8.11 MSI Claw 8 AI+ by temporarily overriding the stockgamescope-mangoapp.service; verified the running process BuildID matched056418c4c27aece7b226e5c24807ec33ca8810e4