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

Missing temperature on last 2 cores (rk3588) #1530

Closed
System64fumo opened this issue Aug 29, 2024 · 7 comments
Closed

Missing temperature on last 2 cores (rk3588) #1530

System64fumo opened this issue Aug 29, 2024 · 7 comments
Labels
bug 🐛 Something isn't working Linux 🐧 Linux related issues
Milestone

Comments

@System64fumo
Copy link

Hello, As of a few hours ago this issue has been solved and temperature finally shows up on rk3588. Woo!

However temperature is not shown for the last 2 cores.
screenshot

Context:
Orange Pi 5 plus 16gb
Armtix linux
Linux 6.11 rc1 (Mainline)

@BenBE BenBE added bug 🐛 Something isn't working Linux 🐧 Linux related issues labels Aug 30, 2024
@BenBE
Copy link
Member

BenBE commented Aug 30, 2024

Can you check if the code block added by the patch in #1411 is ran 3 times per temperature update cycle: Once for each of the sub-blocks?

@System64fumo
Copy link
Author

Nope
Seems like they run twice
From what i can see via sensors -u and mainline's device tree they do not have bigcore1_thermal, But have bigcore2_thermal instead.

I'm confused as to why that is the case?
Either way changing bigcore1_thermal to bigcore2_thermal in all instances solves this.

@BenBE
Copy link
Member

BenBE commented Aug 30, 2024

Any objections to the following patch proposal?

diff --git a/linux/LibSensors.c b/linux/LibSensors.c
index 8ac34980..7d6d17e9 100644
--- a/linux/LibSensors.c
+++ b/linux/LibSensors.c
@@ -233,7 +233,7 @@ void LibSensors_getCPUTemperatures(CPUData* cpus, unsigned int existingCPUs, uns
                coreTempCount += 2;
                continue;
             }
-            if (String_eq(chip->prefix, "bigcore1_thermal")) {
+            if (String_eq(chip->prefix, "bigcore1_thermal") || String_eq(chip->prefix, "bigcore2_thermal")) {
                data[7] = temp;
                data[8] = temp;
                coreTempCount += 2;

@BenBE BenBE added this to the 3.4.0 milestone Aug 30, 2024
@System64fumo
Copy link
Author

This would also need bigcore2_thermal to be added to line 145 to work but other than that looks good to me.

@BenBE
Copy link
Member

BenBE commented Aug 31, 2024

Okay, updated proposal:

diff --git a/linux/LibSensors.c b/linux/LibSensors.c
index 8ac34980..1b1753d3 100644
--- a/linux/LibSensors.c
+++ b/linux/LibSensors.c
@@ -142,6 +142,7 @@ static int tempDriverPriority(const sensors_chip_name* chip) {
       { "littlecore_thermal", 0 },
       { "bigcore0_thermal",   0 },
       { "bigcore1_thermal",   0 },
+      { "bigcore2_thermal",   0 },
       /* Low priority drivers */
       { "acpitz",             1 },
    };
@@ -233,7 +234,7 @@ void LibSensors_getCPUTemperatures(CPUData* cpus, unsigned int existingCPUs, uns
                coreTempCount += 2;
                continue;
             }
-            if (String_eq(chip->prefix, "bigcore1_thermal")) {
+            if (String_eq(chip->prefix, "bigcore1_thermal") || String_eq(chip->prefix, "bigcore2_thermal")) {
                data[7] = temp;
                data[8] = temp;
                coreTempCount += 2;

@System64fumo
Copy link
Author

LGTM 👍

@BenBE
Copy link
Member

BenBE commented Aug 31, 2024

Hopefully now fixed by 179182d

@BenBE BenBE closed this as completed Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working Linux 🐧 Linux related issues
Projects
None yet
Development

No branches or pull requests

2 participants