elementary / monitor

Manage processes and monitor system resources.
GNU General Public License v3.0
321 stars 44 forks source link

Temperature not registering on RPi4 #218

Open Ryland0 opened 3 years ago

Ryland0 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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

Ryland0 commented 3 years ago

ryan@elementary-pi:~$ cat /sys/class/hwmon/hwmon0/name cpu_thermal

On Sun, Dec 20, 2020 at 1:15 PM Stanisław notifications@github.com wrote:

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/stsdc/monitor/issues/218#issuecomment-748641788, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIVA5O2RD2VMY533ZPQVI4LSVY5K7ANCNFSM4VCANI2Q .

stsdc commented 3 years ago

@Ryland0 please check the dev branch. Let me know if https://github.com/stsdc/monitor/commit/52ee3f9c8ff2c12223d23c7862587ec1e8abd031 commit did the work.

Ryland0 commented 3 years ago

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 commented 3 years ago

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

Ryland0 commented 3 years ago

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 commented 3 years ago

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 ?

Ryland0 commented 3 years ago

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 commented 3 years ago

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 :wink:, but I don't know when it will happen

Ryland0 commented 3 years ago

That's cool. I really do appreciate you looking into it.

On Sun, Dec 27, 2020 at 8:58 AM Stanisław notifications@github.com wrote:

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/stsdc/monitor/issues/218#issuecomment-751470923, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIVA5O6CIPLWXYUGCYFLZ33SW44PVANCNFSM4VCANI2Q .