LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 10-21-2011, 11:13 PM   #1
the dsc
Member
 
Registered: May 2009
Distribution: Debian testing
Posts: 115
Blog Entries: 44

Rep: Reputation: 27
Question How to make cpufreqd (or acpi) read temperatures on a dual core?


It seems that cpufreqd is trying to get the cpu/cores temperature from acpi, which is installed and working at least for making a clean shutdown when pressing the power button once, but the cpu temperature isn't available for some reason. I get cpu temperature via ksysguard (perhaps just "[kde] system guard" these days) though. It does not get its readings from acpi, it seems, as acpinfo gives "Thermal info : <not available>".

The output of "sensors -u" gives something that seems what ksysguard gets its readings from, "coretemp isa":

Code:
coretemp-isa-0000
  temp2_input: 41.000
  temp2_max: 76.000
  temp2_crit: 100.000
  temp2_crit_alarm: 0.000
  temp3_input: 41.000
  temp3_max: 76.000
  temp3_crit: 100.000
  temp3_crit_alarm: 0.000
The pertinent part on cpufreqd.conf was like this on the original configuration file:

Code:
# CPU Too hot!
[Rule]
name=CPU Too Hot
acpi_temperature=7-100

I've found at this article a different version that looked very promising:

Code:
# CPU Too hot!
[Rule]
name=CPU Too Hot
sensor=coretemp:70-100


But it didn't work. I've also tried:

Code:
# CPU Too hot!
[Rule]
name=CPU Too Hot
sensor=temp2_input:70-100
And "coretemp-isa-0000", "coretemp-isa", but neither did work.

Instead cpufreqd keeps showing:

Code:
acpi_temperature_update  : called
acpi_temperature_update  : temperature for thermal_zone0 is 30.0C
acpi_temperature_update  : temperature average is 30.0C
And this seems to be some phoney reading that keeps stationary at 30C.
I also have the following section on the same config file:
Code:
[sensors_plugin]
sensors_conf=/etc/sensors3.conf
[/sensors_plugin]
Which seems to be correct from what I've been finding, which is not much though. And this file exists.



So, anyone knows the correct syntax to use in cpufreqd.conf for this situation, or how to make acpi_temperature work for real instead?

Thanks a lot!



update: I've tried the same variations on the stock kernel, just in case. Didn't work.

update 2: tried editing sensors3.conf, it turns out that my chip had only a single line on it, not evidently related with temperatures, so I just copied some lines from other chips. Didn't work, neither did using the original obscure item/label on cpufreqd.conf.

Code:
chip "it87-*" "it8712-*" "it8716-*" "it8718-*" "it8720-*"

    label in8 "Vbat"
    label temp1 "CPU0 Temp"
    label temp2 "CPU1 Temp"
The original single line is underlined, the other two are the ones I've added.

Last edited by the dsc; 10-22-2011 at 01:19 AM.
 
Old 10-23-2011, 02:14 PM   #2
gradinaruvasile
Member
 
Registered: Apr 2010
Location: Cluj, Romania
Distribution: Debian Testing
Posts: 477

Rep: Reputation: 100Reputation: 100
The temperature readings are not standardized at all. They really depend on the chiset and driver of the chipset.
Some chipsets supply information via acpi, some not.

And, some supply outright "wrong" information. For example i have an AMD Athlon II x2 250 CPU and i have 2 different readings from 2 sources - the acpi-supplied (atk0110-acpi-0) info shows the (probably) real temps (same as in BIOS at least), but the (supposedly) native Athlon II/Phenom II "k10temp" driver shows something entirely different, with ~15 degrees lower (sometimes lower than the ambient temp) - but the author himself said that these readings are used internally by the CPU/BIOS to determine the needed cooling and it is not always a real temperature.

To see what drivers are available for your chipset, run "sensors-detect" as root (or with sudo).
 
1 members found this post helpful.
Old 10-23-2011, 06:43 PM   #3
the dsc
Member
 
Registered: May 2009
Distribution: Debian testing
Posts: 115
Blog Entries: 44

Original Poster
Rep: Reputation: 27
It does not surprise me that temperature readings are not standardized, what I think it's a bit odd/frustrating is the difficulty to use a given available reading in some application that is using the wrong one for some reason. The reading is there but you can't use it, set on the configuration file of the application some other thing. Or maybe you can (it seems that you can), but it's rather obscure how you should do it. I think it's partly due to the coexistence of newer and modern systems, like /proc/acpi, hwmon, and /sys/class.

Anyway, I've run "sensors-detect", many times indeed. But I've run it once again just out of not having any other better choice, and I've noticed something I think I've missed before. "Coretemp" and these "it87" are two different things. I thought the "coretemp" was just a label, not a driver, but it's a driver really. But there's no "coretemp" section on "sensors3.conf". Gonna look more into it, thanks.
 
Old 10-23-2011, 07:28 PM   #4
the dsc
Member
 
Registered: May 2009
Distribution: Debian testing
Posts: 115
Blog Entries: 44

Original Poster
Rep: Reputation: 27
I got it working!

I've made a new config file for these sensors, more or less as shown in this thread on arch linux' forums, just adapting to a mere dual core, whereas the one in the thread seems to be a bazillion cores or something.

Code:
chip "coretemp-isa-0000"

    label temp2 "Core 0"
    label temp3 "Core 1"
Then with the correspondent change in cpufreqd.conf it was reading the correct temperature, albeit it won't let go of that bogus acpitz-virtual thing. But as long as it's not taken into consideration in any cpufreqd rule, it does not matter.

The cpufreqd.conf syntax is:

sensor=sensorlabel:##-###

in actual terms:

sensor=temp2:55-70

and my "sensor plugin" points directly to /etc/sensors.d/cores.conf, just in case.


There's still something a bit weird in the fact that it seems that these labels cannot be totally arbitrary. I tried core0 and core1 for "Core 0" and "Core 1" respectively, and I've also made the required changes on cpufreqd, but then the "sensors_get" part of the output wouldn't appear. I think they may need to be labelled "temp#". Weird.



And I thought I needed to compile the kernel. I still want to do it someday, but it would probably have no effect whatsoever.

Last edited by the dsc; 10-23-2011 at 07:34 PM.
 
  


Reply

Tags
acpi, cpufreqd, temperature


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
make-kpkg fails on amd64 dual core but works on single cpu robertkey Linux - General 1 01-03-2012 07:07 AM
dual core and single core temperatures. justwantin Slackware 7 10-07-2008 04:45 AM
Totally clueless in cpufreq, cpufreqd, acpi land. lumix Linux - Newbie 1 06-30-2007 05:58 PM
Dual Boot Fedora Core 6 & XP, How can I make the MBR start XP first? mdorries Fedora 3 05-18-2007 10:38 AM
No CPU temperatures with Gkrellm. ACPI? Can I check if it's in the kernel? hotuct23 Linux - Software 3 04-27-2004 10:31 PM


All times are GMT -5. The time now is 08:13 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration