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

Temperature not registering on RPi4 #218

Open
Ryland0 opened this issue Dec 19, 2020 · 12 comments
Open

Temperature not registering on RPi4 #218

Ryland0 opened this issue Dec 19, 2020 · 12 comments

Comments

@Ryland0
Copy link

Ryland0 commented Dec 19, 2020

Not sure if this is a thing (supported), but I have eOS running on a Pi 4 with Monitor and everything works except for the temperature. I can provide any information requested if there is even an interest in this.

@stsdc
Copy link
Sponsor Member

stsdc commented Dec 19, 2020

Well, RPi 4 is not my priority (and I don't have one), however I'm open to PRs.

Roadmap:

  1. Find a file that provides temperature info
  2. Look at the code that parses temperature
  3. Basically add another if statement

P.S. I'm amazed that it compiles and runs!

@Ryland0
Copy link
Author

Ryland0 commented Dec 20, 2020

Testament to your coding I suppose. Not a single hiccup compiling.

I'm not terribly familiar with gihub and PRs, so please let me know if this is helpful. And again, if its not worth your time that's cool. I appreciate your response.

ryan@elementary-pi:/sys/class/hwmon$ ls
hwmon0 hwmon1
ryan@elementary-pi:/sys/class/hwmon$ ls hwmon0
device name power subsystem temp1_input uevent
ryan@elementary-pi:/sys/class/hwmon$ ls hwmon1
device in0_lcrit_alarm name power subsystem uevent
ryan@elementary-pi:/sys/class/hwmon$ cat hwmon0/temp1_input
53069

@stsdc
Copy link
Sponsor Member

stsdc commented Dec 20, 2020

Please, cat /sys/class/hwmon/hwmon0/name. Need what's inside the name file.

@Ryland0
Copy link
Author

Ryland0 commented Dec 20, 2020 via email

@stsdc
Copy link
Sponsor Member

stsdc commented Dec 25, 2020

@Ryland0 please check the dev branch. Let me know if 52ee3f9 commit did the work.

@Ryland0
Copy link
Author

Ryland0 commented Dec 26, 2020

I hope I did this correctly.

Cloned the project again.
Modified the vala file.
Rebuilt.

No errors, but also no change. Not sure if it matters, but during ninja, I got this reference a few times.
Installing ... to /usr/lib/aarch64-linux-gnu

Is that right?

@stsdc
Copy link
Sponsor Member

stsdc commented Dec 26, 2020

Did you checkout to dev branch?
What did You modified?

@Ryland0
Copy link
Author

Ryland0 commented Dec 26, 2020

git clone https://github.com/stsdc/monitor
cd monitor
nano /src/Resource/TemperatureSensor.vala
added entries for //Raspberry Pi 4 from 52ee3f9 exactly as shown
meson build --prefix=/usr
cd build
sudo ninja install

@stsdc stsdc closed this as completed Dec 26, 2020
@stsdc
Copy link
Sponsor Member

stsdc commented Dec 26, 2020

Why to do this when You can just git checkout dev all the changes will be there. No need to copy manually.

What shows up when you run in debug mode G_MESSAGES_DEBUG=all ./com.github.stsdc.monitor ?

@stsdc stsdc reopened this Dec 26, 2020
@Ryland0
Copy link
Author

Ryland0 commented Dec 26, 2020

Honestly, I'm not familiar with the ins and outs of github. It's not just pull requests. Sorry.

From the debug, I get this at the start and the WARNING line repeats itself over and over later on.

** (com.github.stsdc.monitor:23405): DEBUG: 16:53:19.970: TemperatureSensor.vala:69: Found temp. sensor: cpu_thermal
** (com.github.stsdc.monitor:23405): WARNING **: 16:53:19.971: TemperatureSensor.vala:93: Failed to open file “/sys/class/hwmon/hwmon0/tempn_input”: No such file or directory
** (com.github.stsdc.monitor:23405): DEBUG: 16:53:19.971: TemperatureSensor.vala:74: 
** (com.github.stsdc.monitor:23405): DEBUG: 16:53:19.971: TemperatureSensor.vala:79: Found temp. sensor: rpi_volt

@stsdc
Copy link
Sponsor Member

stsdc commented Dec 27, 2020

Interesting...
https://github.com/stsdc/monitor/blob/52ee3f9c8ff2c12223d23c7862587ec1e8abd031/src/Resources/TemperatureSensor.vala#L71-L72

hwmonx_prop[4] should be "1" and it is "n"

I did recreate an exact path on my PC and managed to get a test value. You have to figure out why is there a "n" instead of number. Or wait for me to buy a Raspbery Pi 😉, but I don't know when it will happen

@Ryland0
Copy link
Author

Ryland0 commented Dec 30, 2020 via email

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

No branches or pull requests

2 participants