mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #5016] [GUI] Monitor: Apple Silicon GPU temperature and power without root or installing extra packages (opt-in) #2320
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2320
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @alexjyong on GitHub (Nov 2, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5016
Area
[GUI] (the desktop app)
What do you want to do?
powermetrics).STRATA_MACOS_SENSORS=1.Problem and result
On a Mac the Monitor's GPU temp and Power cards are a dash, and the note says both need root. The cards already draw whatever value they are given; nothing reads one. This is the need in #2942 / #2943 (the
macmonhelper, closed in the 0.2.0 tracker reset; thank you, @mjhagen). The IOKit reader from #2360 stays as it is.With
STRATA_MACOS_SENSORS=1the cards fill, without root and without a helper program. On an M5 Pro (macOS 26.4.1, Strata870aedd9):GPU Energychannel. Idle about 0.1 W; about 3 to 6 W at roughly 70 % GPU load while a Q2_0 model generated.GPU MTR Temp*, so Stats' HID rule would read nothing here. Stats reads this chip's GPU temperature fromAppleSMCkeys instead; 7 of the 8 keys its M5 table names answer on this Mac.Without the variable nothing changes. With it unset I compared the server's
now,historyandhardware_statickeys and theMonitor note with untouched upstream on this Mac [on the full branch; same code path], and they are identical.
Related discussion
#2942 / #2943 (closed in the tracker reset, no review), #2360 (the IOKit reader), and #3682 (Windows AMD sensors), which
edits the same two places in
serve/telemetry.py(gpu_readerand the module docstring). I will rebase on whichever lands first.Scope questions:
STRATA_MACOS_SENSORS=1, orSTRATA_MACOS_TELEMETRY=1as in #2943?Approach
serve/telemetry.py,serve/test_apple_sensors.pyand a short section indocs/MAC.md. Every symbol is looked up by name; a missing one leaves that reading empty and never raises. Power is IOReport'sGPU Energyover the time since the last read.The SMC keys differ by chip, so the temperature needs a table keyed by chip, as Stats has
(
values.swiftat032f4a5e4). A key does not keep its meaning:Tg0jis GPU 2 on an M2, GPU 7 on an M4 and GPU 5 on an M5; an M3's keys areTf..; the M4's base chip and its Pro/Max differ in two keys.docs/MAC.mdsay so.GPU MTR Temp*sensors, as Stats does (from its code; I have not seen it run).Validation
Passed (M5 Pro, fresh
870aedd9+ the PR):python -m unittest serve.test_apple_sensors serve.test_server.MacTelemetry: 19 tests, OK. They cover the lookup by chip (each generation, the M4 tiers, an unknown chip) but cannot show a row is right for a chip.None, old note.Failed: none observed.
Not run:
Limits
What do you do today instead?
Stats for the temperature and
sudo powermetrics --samplers gpu_power -i 1000for power. Neither shows next to tokens per second in Strata's Monitor.@github-actions[bot] commented on GitHub (Nov 2, 2026):
Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:
Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment
/reopen.Details: CONTRIBUTING.md
@github-actions[bot] commented on GitHub (Nov 2, 2026):
Thanks, this follows the format now.