feat(libSceAgcDriver): show the CPU temperature on the overlay #17652

Merged
MarcZX10 merged 7 commits from upstream-pr/17652 into main 2026-11-21 09:18:17 +00:00
MarcZX10 commented 2026-11-09 07:16:29 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-09T07:16:29Z.


What

Adds a CPU: <n> C line to the performance overlay's page 1, read once a second with the same sensors sceKernelGetCpuTemperature already uses on Linux. The VRAM line was already there, so this is the last part of the host readings. The line is not shown when no sensor reports a value.

To read the sensors from the overlay, the reader moved out of libkernel into its own static library, anyps5_thermal_reader, linked into both libkernel and libSceAgcDriver. The first commit is that move, with no behaviour change: the reader and its guest-facing functions are the same, and Plausible moved into the shared header.

Commits: the move, the test expectation (which does not compile before the feature commit, since the field does not exist yet), the test for the absent line, the feature, and the usage doc row.

Tested

Linux, built with agc_performance_overlay_statistics_tests, agc_performance_overlay_tests and guest_thermal_sensors_tests; ctest passes 3/3.

  • The overlay test checks the exact CPU: 54 C line when a reading is set, and checks that no CPU line appears without one.
  • Not run: a negative control of the feature by sabotage. The test commit before the feature does not compile, so it is not a logical failure.
  • Windows: not built. The reader on Windows returns no reading on /sys/class, so the line stays hidden there; the doc row says so.

GPUs tested: n/a, the change is a text line and a sensor read.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a, no AGC or shader change
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5220190502 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/17652). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-09T07:16:29Z. --- ### What Adds a `CPU: <n> C` line to the performance overlay's page 1, read once a second with the same sensors `sceKernelGetCpuTemperature` already uses on Linux. The VRAM line was already there, so this is the last part of the host readings. The line is not shown when no sensor reports a value. To read the sensors from the overlay, the reader moved out of libkernel into its own static library, `anyps5_thermal_reader`, linked into both libkernel and libSceAgcDriver. The first commit is that move, with no behaviour change: the reader and its guest-facing functions are the same, and `Plausible` moved into the shared header. Commits: the move, the test expectation (which does not compile before the feature commit, since the field does not exist yet), the test for the absent line, the feature, and the usage doc row. ### Tested Linux, built with `agc_performance_overlay_statistics_tests`, `agc_performance_overlay_tests` and `guest_thermal_sensors_tests`; ctest passes 3/3. - The overlay test checks the exact `CPU: 54 C` line when a reading is set, and checks that no `CPU` line appears without one. - Not run: a negative control of the feature by sabotage. The test commit before the feature does not compile, so it is not a logical failure. - Windows: not built. The reader on Windows returns no reading on `/sys/class`, so the line stays hidden there; the doc row says so. GPUs tested: n/a, the change is a text line and a sensor read. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a, no AGC or shader change - [x] AI-assisted: yes
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!17652
No description provided.