Polybar temp measurement tool


#1

Hey guys,
With AL installs on other laptops using the default polybar in OpenBox, my temp reading in the bar would vary between about 45C-65C depending on how much i was taxing the system. I like that.

I now have yet another “new” laptop where the default temp remains at a constant 25C. Left clicking on the temp shows only one 25C reading, which is apparently my default measurement:
acpitz-virtual-0
Adapter: Virtual device
templ: +25.0C (crit= +107.0C)

Is there a reason for the change? Is there a way to set it so that the default temp visible is as it used to be? I suspect it was measuring Package id 0, the highest temp of the 2 cores?

Thanks for any info!


#2

In your ~/.config/polybar/modules.conf you will find a section titled [module/temperature]. In there you can set the thermal-zone variable to the desired value.

That being said, I myself have experienced weird behaviour by the temperature read as sometimes in polybar it shows me the ambient temperature and sometimes the core temperature all the while the thermal-zone is set to the same value… not sure what the issue is but couldn’t be bothered to look into it more, yet.
If you find anything, make sure to let me know!

cheers


#3

@billd do you have lm_sensors installed (I believe that it a standard install with AL, could be wrong)? If you do, would you do this:
sudo sensors-detect

The sensors-detect is a stand-alone program for detecting installed hardware and recommending specific modules to load. The “safe” answers are the defaults, so just hit to ENTER the accept the default values. It won’t cause any problems. This will create the /etc/conf.d/lm_sensors configuration file which is used by lm_sensors.service to automatically load kernel modules on boot.
Now, type the following command to view the CPU temperature information:

sensors

To monitor the CPU temperature in real time, you can use ‘watch’ command like below.

watch sensors

And let’s see what real values are. Then we can probably proceed from there.


#4

@sxme i think i am experiencing a bit of what you refer to. I recently received laptop #3 (for our purposes). #1 is an Asus i3 2nd gen upgraded to i5. The temp posted in polybar seemed very reasonable, varying as expected with workload. #2 is a Dell i5 4th gen i5-4310m upgraded to i7 “measured” the same thing but the temp shown remained at 25C no matter what i did or did not do, before and after cpu upgrade. I am now on an HP 3rd gen that shows temps varying with workload as expected. This one shows less info when i click on the temp setting, but does seem to work.

Any chance the accuracy of measurements vary with the architecture of different laptop brands and/or cpu generations?