fix: correctly map amd zen cpu core temps#1583
Open
unlimitedsola wants to merge 1 commit intoaristocratos:mainfrom
Open
fix: correctly map amd zen cpu core temps#1583unlimitedsola wants to merge 1 commit intoaristocratos:mainfrom
unlimitedsola wants to merge 1 commit intoaristocratos:mainfrom
Conversation
On AMD multi-CCD CPUs (e.g. Ryzen 5950X), btop++ incorrectly maps per-CCD temperature sensors to CPU cores. `Tccd1` is shown for even-numbered cores (0, 2, 4, 6, ...) and `Tccd2` for odd-numbered cores (1, 3, 5, 7, ...), when the correct mapping is `Tccd1` → cores 0–7 (and their SMT siblings 16–23) and `Tccd2` → cores 8–15 (and their SMT siblings 24–31).
Owner
|
And how does this fair on non AMD cpus? |
Author
@aristocratos I'm expecting this won't change the behavior of CPUs that reports I'm not aware of CPUs that alternates the core temps, would be happy to know if that's an actual case that we need to support. |
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.
Fixes: #1582, more detail in the linked issue.
Note: original code generated by AI, all code has been reviewed, vetted, and tested by me.
The approach is to divide core ids evenly by sensor count, taken from
htop.Before (incorrect temp on the core with load):

After:
