[MinnowBoard] Problem reading CPU temp in linux (yocto build)

nb nb at dagami.org
Fri May 1 06:29:11 UTC 2015


Hi Gerard,

"CONFIG_SENSORS_CORETEMP=y" means it is included _into_ the kernel, so you can’t have it in modules too.
This is « normal », it’s one or the other.

I don’t know about which CONFIG_SENSORS_CORETEMP file you talk, and why we should have one.

He’s what contains my /sys/bus/platform/drivers/coretemp directory:

ls -Rl /sys/bus/platform/drivers/coretemp
/sys/bus/platform/drivers/coretemp:
total 0
--w------- 1 root root 4096 avril 30 19:15 bind
lrwxrwxrwx 1 root root    0 avril 30 19:15 coretemp.0 -> ../../../../devices/platform/coretemp.0
lrwxrwxrwx 1 root root    0 avril 30 19:15 module -> ../../../../module/coretemp
--w------- 1 root root 4096 avril 30 19:15 uevent
--w------- 1 root root 4096 avril 30 19:15 unbind

Regards


> Le 1 mai 2015 à 02:15, Gerard Bucas <gerard.b at tekmagic.net> a écrit :
> 
> Thanks Darren
> 
> Don't worry - managed to get to the bottom of it, thanks to this good
> article (in Japanese - which I can't read - but great pictures!):
> http://kronus9.sblo.jp/article/115370184.html 
> 
> It turns out this kernel config flag needed to be set:
> CONFIG_SENSORS_CORETEMP=m
> 
> Interesting to observe:
> that "zcat /proc/config.gz | grep CORETEMP" now returns
> "CONFIG_SENSORS_CORETEMP=y"
> 
> BUT lsmod shows no modules installed and I still don't have the
> CONFIG_SENSORS_CORETEMP file and I don't see "coreboot" anywhere on my
> target system!
> BUT "sensors" now works (after sensors-detect) as it shows the same "ISA
> adapter" values that nb listed. So I also now see:
> 
> acpitz-virtual-0
> Adapter: Virtual device
> temp1:        +26.8 C  (crit = +90.0 C)
> 
> coretemp-isa-0000
> Adapter: ISA adapter
> Core 0:       +68.0 C  (high = +127.0 C, crit = +127.0 C)
> Core 2:       +67.0 C  (high = +127.0 C, crit = +127.0 C)
> 
> Thanks for all your help.
> 
> Gerard
> 
> 
> -----Original Message-----
> From: Darren Hart [mailto:dvhart at linux.intel.com] 
> Sent: Thursday, April 30, 2015 4:12 PM
> To: gerard.b at tekmagic.net; MinnowBoard Development and Community Discussion;
> 'nb'
> Subject: Re: [MinnowBoard] Problem reading CPU temp in linux (yocto build)
> 
> You mentioned having core temp loaded, but also said you don't have the
> "CONFIG_SENSORS_CORETEMP" file (it's not a file, it's a kernel config option
> which should be listed in /proc/config.gz if you are using a linux-yocto
> kernel. Strange that you have the module loaded, but do not see the /sys
> entries - I don't know how to explain that.
> 
> I'm out of time today - I'll try to have another look on Monday if nobody
> else jumps in.
> 
> 
> 
> On 4/30/15, 10:10 AM, "Gerard Bucas" <gerard.b at tekmagic.net> wrote:
> 
>> Hi nb
>> 
>> Thanks for all your great feedback.
>> 
>> I don't have that CONFIG_SENSORS_CORETEMP file.
>> 
>> It seems I must be missing some key "part" of lmsensors...
>> 
>> I ran "sensors-detect" and then when I run "sensors" I only get:
>> 
>> acpitz-virtual-0
>> Adapter: Virtual device
>> temp1:        +26.8 C  (crit = +90.0 C)
>> 
>> Any ideas what else I need to do or install?
>> 
>> My yocto "local.conf" build file includes the following for adding
>> "lmsensors":
>> 
>> IMAGE_INSTALL_append = " \
>>   lmsensors-libsensors \
>>   lmsensors-sensors \
>>   lmsensors-sensord \
>>   lmsensors-fancontrol \
>>   lmsensors-sensorsdetect \
>>   lmsensors-sensorsconfconvert \
>>   lmsensors-pwmconfig \
>>   lmsensors-isatools \
>>   lmsensors-config-cgi \
>>   "
>> Would REALLY appreciate any help/pointers to get this working...
>> 
>> THANKS!
>> 
>> Gerad
>> 
>> -----Original Message-----
>> From: nb [mailto:nb at dagami.org]
>> Sent: Thursday, April 30, 2015 12:30 PM
>> To: MinnowBoard Development and Community Discussion
>> Cc: Gerard Bucas
>> Subject: Re: [MinnowBoard] Problem reading CPU temp in linux (yocto 
>> build)
>> 
>> CONFIG_SENSORS_CORETEMP=m
>> 
>> and in lsmod
>> 
>> coretemp               12820  0
>> 
>> 
>>> Le 30 avr. 2015 à 18:04, Darren Hart <dvhart at linux.intel.com> a écrit :
>>> 
>>> You will need the.... coretemp module loaded or built-in. You can 
>>> check if it's loaded with lsmod, and if it's configured in by looking 
>>> for CONFIG_SENSORS_CORETEMP in /proc/config.gz:
>>> 
>>> $ zcat /proc/config.gz | grep CORETEMP
>>> 
>>> Thanks,
>>> 
>>> Darren
>>> 
>>> On 4/30/15, 8:46 AM, "Gerard Bucas" <gerard.b at tekmagic.net> wrote:
>>> 
>>>> Hi Darren
>>>> 
>>>> For Some reason or other I can't find find ANY way to read the Core  
>>>> temperatures (I have multiple boards) as even LMSENSORS doesn't give  
>>>> me that 'ISA Adapter' related core temps that nb reported in this 
>>>> thread.
>>>> 
>>>> Not sure what I'm doing wrong - LMSENSORS seems to be working (went 
>>>> through the whole 'sensors-detect' sequence) but it (also) only 
>>>> finds that 'virtual temp' device which also always returns that 26800
> value.
>>>> 
>>>> I am using latest 0.79 firmware (will add to bug database).
>>>> 
>>>> Any ideas how else I can read core temps (yocto Linux build)?
>>>> 
>>>> Thanks
>>>> 
>>>> Gerard
>>>> 
>>>> 
>>>> 
>>>>> On Apr 30, 2015, at 11:07 AM, Darren Hart <dvhart at linux.intel.com>
>>>>> wrote:
>>>>> 
>>>>> The "core" temps appear to be correct, while the acpitz driver does  
>>>>> not appear to be providing updates. I will raise this with the 
>>>>> driver teams.
>>>>> Thank you for reporting.
>>>>> 
>>>>>> On 4/29/15, 2:46 PM, "nb" <nb at dagami.org> wrote:
>>>>>> 
>>>>>> Hi,
>>>>>> 
>>>>>> I always have same value (26.8°C), whatever the cpu does.
>>>>>> 
>>>>>> Regards
>>>>>> 
>>>>>> nb
>>>>>> 
>>>>>> 
>>>>>>> Le 29 avr. 2015 à 22:38, Gerard Bucas <gerard.b at tekmagic.net> a 
>>>>>>> écrit
>>>>>>> :
>>>>>>> 
>>>>>>> Hi nb
>>>>>>> 
>>>>>>> Thanks but I see that your  temp ALSO returns 26.8C (same as 
>>>>>>> mine!!).
>>>>>>> That is the 'problem', no matter what the chip temp is (could be  
>>>>>>> too hot to even touch under heavy load) - the temp returned is  
>>>>>>> ALWAYS 26.8C!!!
>>>>>>> 
>>>>>>> Have a look and let me know if that is also what you observe 
>>>>>>> (seems like it from what you wrote as it is too much of a 
>>>>>>> co-incidence that you get EXACTLY the same value as I do - hot or
>>>>>>> cold!!)
>>>>>>> 
>>>>>>> Thanks
>>>>>>> 
>>>>>>> Gerard
>>>>>>> 
>>>>>>> 
>>>>>>>> On Apr 29, 2015, at 4:24 PM, nb <nb at dagami.org> wrote:
>>>>>>>> 
>>>>>>>> Hi Gerard,
>>>>>>>> 
>>>>>>>> On my Debian:
>>>>>>>> 
>>>>>>>> sensors
>>>>>>>> acpitz-virtual-0
>>>>>>>> Adapter: Virtual device
>>>>>>>> temp1:        +26.8°C  (crit = +90.0°C)
>>>>>>>> 
>>>>>>>> coretemp-isa-0000
>>>>>>>> Adapter: ISA adapter
>>>>>>>> Core 0:       +50.0°C  (high = +110.0°C, crit = +110.0°C)
>>>>>>>> Core 2:       +51.0°C  (high = +110.0°C, crit = +110.0°C)
>>>>>>>> 
>>>>>>>> So it¹s the same (sensors is in lm-sensors package)
>>>>>>>> 
>>>>>>>> Regards
>>>>>>>> 
>>>>>>>> nb
>>>>>>>> 
>>>>>>>> 
>>>>>>>>> Le 29 avr. 2015 à 22:04, Gerard Bucas <gerard.b at tekmagic.net> a 
>>>>>>>>> écrit
>>>>>>>>> :
>>>>>>>>> 
>>>>>>>>> Hi Everyone,
>>>>>>>>> 
>>>>>>>>> We use linux (custom built with yocto project) on minnowBoard MAX.
>>>>>>>>> Works great!
>>>>>>>>> 
>>>>>>>>> However, I have a problem reading the CPU core temperature of 
>>>>>>>>> the E3825.
>>>>>>>>> When I use this command line:
>>>>>>>>> 
>>>>>>>>> cat /sys/class/thermal/thermal_zone0/temp
>>>>>>>>> 
>>>>>>>>> It ALWAYS returns the value: 26800 (= 26.8C)
>>>>>>>>> 
>>>>>>>>> Linux kernel version: 3.19.2-yocto-standard
>>>>>>>>> 
>>>>>>>>> Build Configuration:
>>>>>>>>> BB_VERSION        = "1.27.0"
>>>>>>>>> BUILD_SYS         = "x86_64-linux"
>>>>>>>>> NATIVELSBSTRING   = "Ubuntu-14.04"
>>>>>>>>> TARGET_SYS        = "x86_64-poky-linux"
>>>>>>>>> MACHINE           = "intel-corei7-64" (recommended by Intel for
>>>>>>>>> Atom
>>>>>>>>> E38XX SoC & minnowBoard MAX)
>>>>>>>>> DISTRO            = "poky"
>>>>>>>>> DISTRO_VERSION    = "1.8+snapshot-20150429"
>>>>>>>>> 
>>>>>>>>> It looks like this value is hard-coded in the kernel! In 
>>>>>>>>> researching this on the internet it seems that many people have 
>>>>>>>>> this problem with a variety of Intel based CPU's/SoC's on a 
>>>>>>>>> variety of different linux distributions.
>>>>>>>>> 
>>>>>>>>> Has anyone else solved this problem or do you know of another 
>>>>>>>>> linux command line that would give me the CPU (chip) temperature?
>>>>>>>>> 
>>>>>>>>> I have tried to add the "lm-sensors" package but have had 
>>>>>>>>> problems adding it to my yocto build as I can't seem to find 
>>>>>>>>> the right "package group" that includes lm-sensors.
>>>>>>>>> Any ideas/help would be MUCH appreciated!
>>>>>>>>> 
>>>>>>>>> Thanks
>>>>>>>>> Gerard
>>>>>>>>> 
>>>>>>>>> _______________________________________________
>>>>>>>>> elinux-MinnowBoard mailing list 
>>>>>>>>> elinux-MinnowBoard at lists.elinux.org
>>>>>>>>> http://lists.elinux.org/mailman/listinfo/elinux-minnowboard
>>>>>> 
>>>>>> _______________________________________________
>>>>>> elinux-MinnowBoard mailing list
>>>>>> elinux-MinnowBoard at lists.elinux.org
>>>>>> http://lists.elinux.org/mailman/listinfo/elinux-minnowboard
>>>>> 
>>>>> 
>>>>> --
>>>>> Darren Hart
>>>>> Intel Open Source Technology Center
>>>>> 
>>>>> 
>>>>> 
>>>> 
>>> 
>>> 
>>> --
>>> Darren Hart
>>> Intel Open Source Technology Center
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> elinux-MinnowBoard mailing list
>>> elinux-MinnowBoard at lists.elinux.org
>>> http://lists.elinux.org/mailman/listinfo/elinux-minnowboard
>> 
>> 
>> _______________________________________________
>> elinux-MinnowBoard mailing list
>> elinux-MinnowBoard at lists.elinux.org
>> http://lists.elinux.org/mailman/listinfo/elinux-minnowboard
>> 
> 
> 
> --
> Darren Hart
> Intel Open Source Technology Center
> 
> 
> 
> 
> _______________________________________________
> elinux-MinnowBoard mailing list
> elinux-MinnowBoard at lists.elinux.org
> http://lists.elinux.org/mailman/listinfo/elinux-minnowboard



More information about the elinux-MinnowBoard mailing list