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

Dual CPU Support #2

Open
BadCo-NZ opened this issue Jan 31, 2022 · 9 comments
Open

Dual CPU Support #2

BadCo-NZ opened this issue Jan 31, 2022 · 9 comments
Labels
enhancement New feature or request

Comments

@BadCo-NZ
Copy link

Hello again,

Is it possible to enable dual CPU support and change fan speed based on the hottest one?

Current path:

/sys/devices/platform/coretemp.0/hwmon/hwmon*/temp1_input

Additional path:

/sys/devices/platform/coretemp.1/hwmon/hwmon*/temp1_input

Thanks!

@petersulyok
Copy link
Owner

Hi,

This value here represents the temperature of the CPU package, not a single core. I assume it represents all of them.
Here is an real-life example from my machine:

coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +32.0°C  (high = +74.0°C, crit = +82.0°C)
Core 0:        +29.0°C  (high = +74.0°C, crit = +82.0°C)
Core 1:        +31.0°C  (high = +74.0°C, crit = +82.0°C)
Core 2:        +31.0°C  (high = +74.0°C, crit = +82.0°C)
Core 3:        +31.0°C  (high = +74.0°C, crit = +82.0°C)

Cheers,

Peter

@BadCo-NZ
Copy link
Author

Hi Peter,

Yeah I noticed it was the package temperature, however I have two packages and want to base the fan speed on the hottest one, usually the rear CPU is hotter then the front CPU due to front-to-back airflow.

coretemp-isa-0000
Adapter: ISA adapter
Package id 0:  +57.0°C  (high = +75.0°C, crit = +85.0°C)
Core 0:        +50.0°C  (high = +75.0°C, crit = +85.0°C)
Core 1:        +48.0°C  (high = +75.0°C, crit = +85.0°C)
Core 2:        +47.0°C  (high = +75.0°C, crit = +85.0°C)
Core 3:        +50.0°C  (high = +75.0°C, crit = +85.0°C)
Core 4:        +49.0°C  (high = +75.0°C, crit = +85.0°C)
Core 5:        +51.0°C  (high = +75.0°C, crit = +85.0°C)

coretemp-isa-0001
Adapter: ISA adapter
Package id 1:  +48.0°C  (high = +75.0°C, crit = +85.0°C)
Core 0:        +45.0°C  (high = +75.0°C, crit = +85.0°C)
Core 1:        +39.0°C  (high = +75.0°C, crit = +85.0°C)
Core 2:        +41.0°C  (high = +75.0°C, crit = +85.0°C)
Core 3:        +42.0°C  (high = +75.0°C, crit = +85.0°C)
Core 4:        +42.0°C  (high = +75.0°C, crit = +85.0°C)
Core 5:        +42.0°C  (high = +75.0°C, crit = +85.0°C)

@petersulyok
Copy link
Owner

I see. We need to support multiple CPUs here.

@petersulyok
Copy link
Owner

Please take a look into this commit. It implements multiple CPU support.

@petersulyok
Copy link
Owner

This feature request has been implemented in release v1.1.0.

@BadCo-NZ
Copy link
Author

Nice work @petersulyok, unfortunately I haven't had a chance to test it yet, but will report back when I do.

@petersulyok petersulyok added the enhancement New feature or request label Aug 14, 2022
@petersulyok petersulyok reopened this Oct 29, 2024
@petersulyok
Copy link
Owner

petersulyok commented Oct 29, 2024

Hi @BadCo-NZ, I'm working on a pyudev based hardware recognition code and I would need your help, since you have multiple Intel CPUs on your motherboard. Would you be so kind as to run the following command on your computer?

udevadm info --export-db

and check these kind of sections for all CPUs in the output:

P: /devices/platform/coretemp.0
M: coretemp.0
R: 0
U: platform
E: DEVPATH=/devices/platform/coretemp.0
E: MODALIAS=platform:coretemp
E: USEC_INITIALIZED=2837283
E: ID_PATH=platform-coretemp.0
E: ID_PATH_TAG=platform-coretemp_0

I would like to know if the values of MODALIAS= variable would be the same for all CPUs.
Please let me know if I wasn't clear on this request.

@BadCo-NZ
Copy link
Author

Here you go! Looks like MODALIAS is 1 instead of 0 for the second CPU.

P: /devices/platform/coretemp.0
M: coretemp.0
R: 0
U: platform
E: DEVPATH=/devices/platform/coretemp.0
E: SUBSYSTEM=platform
E: MODALIAS=platform:coretemp
E: USEC_INITIALIZED=8370938
E: ID_PATH=platform-coretemp.0
E: ID_PATH_TAG=platform-coretemp_0

P: /devices/platform/coretemp.0/hwmon/hwmon6
M: hwmon6
R: 6
U: hwmon
E: DEVPATH=/devices/platform/coretemp.0/hwmon/hwmon6
E: SUBSYSTEM=hwmon

P: /devices/platform/coretemp.1
M: coretemp.1
R: 1
U: platform
E: DEVPATH=/devices/platform/coretemp.1
E: SUBSYSTEM=platform
E: MODALIAS=platform:coretemp
E: USEC_INITIALIZED=8370956
E: ID_PATH=platform-coretemp.1
E: ID_PATH_TAG=platform-coretemp_1

P: /devices/platform/coretemp.1/hwmon/hwmon7
M: hwmon7
R: 7
U: hwmon
E: DEVPATH=/devices/platform/coretemp.1/hwmon/hwmon7
E: SUBSYSTEM=hwmon

@petersulyok
Copy link
Owner

Thanks, this helped a lot.
Based on the MODALIAS=platform:coretemp attribute all CPUs (belonging to the coretemp module) can be queried and in a second step the proper HWMON path can be also read. Looks promising.

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