You are not logged in.

#1 2009-02-24 19:50:11

yasou
Member
Registered: 2009-02-24
Posts: 4

shutdown when cpu critically hot / use of cpufreqd with libsensors3

hello

I am new to Archlinux, and already I have learned more than what I learned from ubuntu over months big_smile

Anyway the major problem that I had with Arch on my Laptop was that after extensive use the laptptop shuts down because a critical temperature has been reached (97 degrees C). After one or two days I was able to solve it but not using any of the methods mentioned in the Archwiki and in fact not using software from pacman.

Generally, with cpufreqd one can scale the frequence of the cpu with the help of cpufrequtils depending on data about temperature, battery-level, etc., which is collected from acpi or in this case libsensors. The problem is that on my installation of Archlinux (and this seems to be a general cpufreqd problem, not arch specific) cpufreqd reads the temperature incorrectly from acpi or tau, even when the requried acpid is running. (it constantly reads average temperature of 0 )

Also cpufreqd from pacman cannot read from lm-sensors 3 because it is not compatible with libsensors4 (which is part lm-sensors 3), but needs lm-sensors 2 and libsensors3. (the numbers are very much confusing, as libsensors is always a version higher than its package lm-sensors)

The focus of course here is on using cpufreqd to check on the temperature. This is especially important for some laptops that become very hot, which without a kind of similar tool are very hard to use effectively.

My question now is whether or not the arch maintainers in general and those of the mentioned packages are interested in changing or providing extra packages required to use this method to control the cpu frequency. Also I want to ask if any other person has experience with this issue, and what other methods there are to solve it.

If there is interest in this issue, I can provide the exact instructions and an example of the config files of everything involved, and I would be ready to contribute to a Wiki article. (as I am generally lazy but currently quite busy, a Wiki contribution completely by my own would be very much breaking all arch-norms (e.g. sensors and cpufreqd run from /usr/local, the cpufreqd daemon is loaded from /etc/rc.local smile )

I would also like to here general ideas and opinions on this issue. I consider it quite important, as it can be very annoying, also for experienced users due to little documentation. Also has anyone else experienced the problem that cpufreqd reads the temeprature incorrectly from acpid?


regards

Offline

#2 2009-02-24 20:16:03

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: shutdown when cpu critically hot / use of cpufreqd with libsensors3

I have seen my laptop shutdown because critical temperature was reached maybe 3-4 times. But it was quite some time back and its been a while since it has happened.

But I would still be interested in finding out what was happening behind the scenes.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#3 2009-02-24 23:23:07

yasou
Member
Registered: 2009-02-24
Posts: 4

Re: shutdown when cpu critically hot / use of cpufreqd with libsensors3

To see how far this problem is applicable to your computer, I recommend trying to use the cpu as much as possible (e.g. several flash movies at youtube smile ) simulatenously, and see how the temperature develops. e.g. by looking at /proc/acpi/thermal_zone/ or installing lm-sensors. Best is to use an applett or any x-gui to acpi or lm-sensors so you can monitor the temperature quickly and effectively.

Also try to look at how far it raches the critical temperature. The critical temperature can be seen in my computer by looking at "sensors -u"  or "cat /proc/acpi/thermal_zone/TZ01/trip_points" (replace TZ01 by whatever you have there)

in case your cpu doesn't get too hot, then I think you shouldn't bother with cpufreqd as it might limit performance.

Offline

#4 2009-02-24 23:44:33

dr_relling
Member
From: Norway
Registered: 2009-02-24
Posts: 6

Re: shutdown when cpu critically hot / use of cpufreqd with libsensors3

I had this problem on my ThinkPad r51p which would suddenly say critical temperature reached and shut down. It was the same with different linux distros and FreeBSD as well.
I found no other solution to the problem but writing a small script that I always had running in the background:

#!/usr/local/bin/php
<?php
$slow = FALSE;
while(1) {
    $temperatur = `cat /proc/acpi/thermal_zone/THM0/temperature | grep temperature | awk ' { print $2 } ' `;
    if((int)$temperatur > 85 && !$slow) {
        // print "Slowing down".$temperatur." C";
        system("echo -n 600000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq");   $slow = TRUE;
    } elseif((int)$temperatur < 80 && $slow) {
        //  print "Speeding up".$temperatur." C";
        system("echo -n 1700000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq");  $slow = FALSE;
    }
    sleep(3);
 }
?>

But most likely there is a more elegant solution to it than this.
And, btw, Do NOT try this script unless you know exactly what your doing and the settings are right for your CPU

Last edited by dr_relling (2009-02-24 23:48:09)

Offline

#5 2009-02-24 23:52:12

yasou
Member
Registered: 2009-02-24
Posts: 4

Re: shutdown when cpu critically hot / use of cpufreqd with libsensors3

basically this is what cpufreqd does, only it should support more features and should theoretically be more comfortable. smile

I think there should be a Howto or a wikipage dedicated to this issue, that allows the user to control the cpu frequency easily but at the same time professionally (by that I mean running one daemon that checks everything from temperature to  batterylevel and that can be customized easily and allow profiles and stuff. This is actually all provided by cpufreqd, but minor problems are just preventing it from working effectively.)

Offline

#6 2009-02-25 07:44:02

signor_rossi
Member
Registered: 2007-08-24
Posts: 257

Re: shutdown when cpu critically hot / use of cpufreqd with libsensors3

Yasou, are you sure your laptop is not faulty? Mine would produce much heat on the highest frequency even when idle, after a motherboard change it runs at least 10°C less now in that situation. Does your laptop still overheat when you limit the highest possible frequency from the start? You can do that with cpufreq-utils.

SignorRossi.

Offline

#7 2009-02-25 11:58:49

yasou
Member
Registered: 2009-02-24
Posts: 4

Re: shutdown when cpu critically hot / use of cpufreqd with libsensors3

I am most certain and 100% sure that my laptop is totally faulty smile


Probably there is some dust blocking the fan, but when I tried to open my laptop I broke a part of the cover, so I decided to put it all together and tried to forget what has happened neutral


But actually my laptop used to get really hot when I bought it. When I run on the lowest frequency temperature is about 60 degrees, which is almost 60% of the critical temperature (100 degrees C). The overheating did not occur on Ubuntu and does not occur on Windows. Also I have noticed that the average temperature on Windows is 83 degrees, which I can maintain by using cpufreqd.

Also I have noticed from running the opensuse live-cd that opensuse also has a similar daemon like cpufreqd pre-installed, as the cpu frequency was automatically set to lowest when not needed (another feature that comes with cpufreqd), and I did not have overheat problems.

yasou

Offline

Board footer

Powered by FluxBB