Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQUEST] Add support for zenpower or k10temp #48

Closed
Lutzy opened this issue Apr 27, 2020 · 15 comments
Closed

[REQUEST] Add support for zenpower or k10temp #48

Lutzy opened this issue Apr 27, 2020 · 15 comments
Assignees
Labels
enhancement New feature or request

Comments

@Lutzy
Copy link

Lutzy commented Apr 27, 2020

Is your feature request related to a problem? Please describe.
This is super slick, but it'd be cool if the sources for temperatures were expanded to support zenpower for newer Ryzen CPU's

Describe the solution you'd like
Here's the relevant section of sensors output for zenpower:

zenpower-pci-00c3
Adapter: PCI adapter
SVI2_Core: 1.40 V
SVI2_SoC: 1.08 V
Tdie: +65.6°C (high = +95.0°C)
Tctl: +65.6°C
Tccd1: +64.8°C
Tccd2: +50.2°C
SVI2_P_Core: 27.55 W
SVI2_P_SoC: 13.69 W
SVI2_C_Core: 20.42 A
SVI2_C_SoC: 12.65 A

Describe alternatives you've considered
If you're open to pull requests, I can work on adding support for this tomorrow. Just reply to this issue if you want me to take a stab at it.

Additional context
This is a wonderful project. I almost want to just run it in a plasma applet and have it be my background! Nice work!

@Lutzy Lutzy added the enhancement New feature or request label Apr 27, 2020
@aristocratos
Copy link
Owner

Sure, but I would need to know some more information. Like is the package temp named "Tdie" for all ryzen cpus, whats "Tctl" temp and how many cores do you have? Is "Tccd*" temp for physical cores. I don't have a ryzen cpu so can't really experiment with it.
So would have to rely on others to share sensors output from a couple of different ryzen variants.
Or scour through the lm-sensors source.

@Lutzy
Copy link
Author

Lutzy commented Apr 27, 2020

I have a 3950x which has 16 physical cores and 32 threads. I believe it's the same across all Ryzen, but perhaps others with Ryzen CPU's could comment on this issue thread over time if they see something different.

Later today I'll modprobe k10-temp, as I believe that is what comes by default with the kernel (though it's not as good as zenpower) and see what that outputs (as that's what most people would have).

@Lutzy
Copy link
Author

Lutzy commented Apr 27, 2020

Here's k10temp's output:

k10temp-pci-00c3
Adapter: PCI adapter
Vcore: 1.46 V
Vsoc: 1.08 V
Tdie: +48.0°C
Tctl: +48.0°C
Tccd1: +35.8°C
Tccd2: +34.8°C
Icore: 27.00 A
Isoc: 10.00 A

@aristocratos
Copy link
Owner

Ok, same sensors names anyway. But not sure what:

Tctl: +48.0°C
Tccd1: +35.8°C
Tccd2: +34.8°C

represents still.

@Lutzy
Copy link
Author

Lutzy commented Apr 27, 2020

I'm not entirely sure, but if you look at the architecture diagram:
2a13fac9-f38b-4eac-8076-b18152cd285b

I believe the Zen 2 architecture has separate CCD modules that they stuff cores into to increase yield. So a 3950x has 8 physical cores per CCD and 2 CCD's for 16 total physical cores and with SMT that gives 32 threads. A 3990x likely has 8 CCD's to give it its 64 physical cores and 128 threads.

@Lutzy
Copy link
Author

Lutzy commented Apr 27, 2020

This page has info on what tCtl is supposed to represent: https://www.guru3d.com/articles-pages/amd-ryzen-threadripper-2920x-review,8.html

It's in the "Temperature Reporting" section

@aristocratos
Copy link
Owner

Good researching! Will add to TODO and take a look at implementing when I have time.

@aristocratos
Copy link
Owner

You got any clue to how the cores are ordered? Like is Core1 a thread of Core0 and is Core0 - 15 in the first CCD module or is mixed.
Just so I can allocate the correct temp to the correct cores.

@Lutzy
Copy link
Author

Lutzy commented Apr 29, 2020

image

Yeah looks like 4 cores per CCX, 2 CCX per CCD, and ordered like you've said. (for my 3950x, first 8 physical cores (16 logical with SMT) in CCD1, next 8 physical cores (16 logical with SMT) in CCD2.

@aristocratos
Copy link
Owner

The output you posted from k10temp, was that complete? No "(high = +95.0°C)" value for tdie?

@Lutzy
Copy link
Author

Lutzy commented Apr 29, 2020

Yes, both were complete unfortunately. k10temp's support of Ryzen in general is relatively new and I think has only been moved into the kernel very recently (I'm not even sure if it's in 5.4).

But maybe my k10temp module is wonky, because from this kernel mailing list message, it looks like it should have a high value: https://lore.kernel.org/lkml/20200116141800.9828-1-linux@roeck-us.net/

@aristocratos
Copy link
Owner

Ok, I'm setting a fallback value of 85 for high for now, need something to compare against for colors and mini graph.

@aristocratos
Copy link
Owner

Added in v0.8.17

@Lutzy
Copy link
Author

Lutzy commented Apr 30, 2020

beautiful

Looks great. I've got bashtop essentially as my background in plasma running in the termoid applet and I love it! Thanks so much for your work. Fwiw, I write software for a living too, and I'm reasonably handy with the bash if you ever decide you want a bit of help. Otherwise I see you got the git sponsor going, could flip some coin your way for your great project!

@aristocratos
Copy link
Owner

aristocratos commented Apr 30, 2020

Thanks :)
I don't work as a developer so any sponsorship helps a lot. I you wanna contribute with coding that's also welcome :)
This started just as a fun project to do on the weekends, had no clue there would be this much interest in it from others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants