The Temperature Monitor in lxpanel (I'm using Lubuntu 12.10) is automatically detecting one of my sensors but I would like to give it an alternate one.
Here is the output of sensors:
Adapter: Virtual device
temp1: +26.8°C (crit = +100.0°C)
temp2: +0.0°C (crit = +100.0°C)
coretemp-isa-0000
Adapter: ISA adapter
Core 0: +58.0°C (high = +80.0°C, crit = +90.0°C)
Core 2: +55.0°C (high = +80.0°C, crit = +90.0°C)
It looks like the Temperature Monitor is picking up temp1 automatically but I would like to set it to Core 0 or Core 2. It has a string for "Sensor" but I'm not sure what that would be.
I've tried "Core 0", "coretemp-isa-0000" and "/sys/devices/platform/coretemp.0/temp2_input" but none seem to work.
Any thoughts?
I have the similar problem (my default sensor always shows 40.0°C) and i can't change this sensor in original lxpanel's Temperature Monitor. But there is another solution: lm-sensors LXDE lxpanel plugin.
https://github.com/danamlund/sensors-lxpanel-plugin
It is simple to compile (in lubuntu 16.04 i also used debian install instructions) and simple to use:
Simple solution
1) Run this command to list types of available thermal_zone devices:
ls -1 /sys/class/thermal/thermal_zone*/type | xargs -I % sh -c "echo % ; cat %"
You should get output similar to this:
2) Find out which one you need, for CPU it should have type similar to
x86_pkg_temp
. In my example, if I want to usex86_pkg_temp
I will pick/sys/class/thermal/thermal_zone2/
.3) Specify it in "Temperature Monitor" settings, make sure it is slash-terminated (enclosed with "/" at the end, just like in my example):
Done, it should work as intended now.
More details and alternative solution
Started using LUbuntu desktop today and found myself looking on same problem.
After poking around and cracking open source code of
/plugins/thermal/thermal.c
I found some solutions. First of all, parameter "Sensor" in options refers to location of it as directory. Looking on sources it can detect 3 types of sensor directories in automatic mode, and looks for them in/proc/acpi/thermal_zone/
,/sys/class/thermal/
and/sys/class/hwmon/hwmon[i]/
, functions to look for those are called here:Now, looking on what happens when you set config, we see this:
From what I understood,
th->sensor
is set to what you specify in "Sensor" input field in options.First there is check if
auto_sensor
is set, and if it is not, it will do series of other checks.Breaking down this part, if your sensor path does not inlude
/sys/
in it, it will useproc_get
functions, which is outdated acpi type sensor that is not used in new versions of Ubuntu. Otherwise, if your path includes/sys/class/hwmon
it will usehwmon
functions, and finally if it is other type of/sys/*
, it will usesysfs
type of sensor.Based on that we can conclude that easiest way would be to specify sensor located in
/sys/class/thermal/
, for example/sys/class/thermal/thermal_zone1
. If we would go with/sys/class/hwmon/
, it would not pick right sensor anyway, because there is no way to specify exacttemp[i]_input
to be used, and if we would use non/sys/
directory, it would assume we using outdatedacpi/thermal_zone
, which is not ideal as well. You could create script that will create fake sensor directory in your home folder with 2 files,trip_points
andtemperature
. trip_points would look like this and does not matter much:temperature would be one to be read for current temperature and should look like this:
Finally, you would need script to update those files from actual sensor you want to use and schedule it to run each N seconds. This solution would allow using
/sys/class/hwmon/hwmon1
kind of sensors and manually read value to be used by LXpanel thermal indicator. You could also use this method to make this thermal indicator display other kind of indicators, but that seems like waste of effort, considering you could just use another indicator instead. I will update with sample script to do it later, if it will be required\I will make one for myself.