2

I'm using conky to show a status of my CPU temperatures, and overall I'm satisfied, except for one thing: Every time I reboot, the temperature status breaks!

Looking at conky's stderr I see this:

conky: can't open '/sys/bus/platform/devices/coretemp.0/hwmon/hwmon3/temp1_input': No such file or directory

"That's odd," I think, "this worked fine before I rebooted."

So then I go look in /sys/bus/platform/devices/coretemp.0/hwmon, and I discover that the folder that used to be called hwmon3 is now called hwmon4. "Okay," so I tweak my .conkyrc to refer to hwmon4 instead.

But then I reboot again and it's broken again!

Is there a way I can force that coretemp.0/hwmon device to always have the same folder hierarchy underneath it?

  • look at the middle of the accepted answer of this post .. stackoverflow.com/questions/2530096/… – jsotola Jan 27 at 1:54
  • 1
    There's a lot of things in /sys that are ordered based on the order devices respond to the kernel while it's initializing itself, and they're essentially random. But to my naive mind, /sys/devices/platform/coretemp.0 shouldn't be among those. CPU0 is basically a guarantee; if it didn't exist, you wouldn't get to the part of the bootup process where your computer discovers the BIOS. But I can confirm your finding. I'd be tempted to just dynamically update my .conkyrc based on what's in that directory in my login script. – Ed Grimm Jan 27 at 2:01
  • 1
    You might find the other hwmon devices listed in /sys/class/hwmon/, and in particular each name file will tell you what the device is. Perhaps they are discovered in a parallel way and so get assigned numbers depending on the speed at which they respond. – meuh Jan 27 at 17:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.