# notebook overheats can't emerge

## lmcogs

Hi

I have a ajp 2200c pentium 111 (copermine) which supports acpi 1.0b.  I  have kernel 2.6.11-r3 installed.  When I try to emerge anything large i.e mozilla the system shuts down because of overheating.  I have emerged acpi, started acpid etc and followed 'power management guide' (gentoo documentation) but the cpufreq-info can't find the driver for this machine so I guess it is not supported.  

The only other suggestion which I have not tried yet is to buy and external household fan and place it near the vents.

Pity I can't run Gentoo on this laptop since the desktop system is great.

Wellcome any help

lmcogs

----------

## cyberb0b

Can it idle for a few days without shutting down?

If so, reduce the cpu load.  Try PORTAGE_NICENESS, as in this post.

Or, stop the emerge before it overheats, then resume the emerge later.  Pause it with ctrl+Z, resume with fg.  Or kill with ctrl+C, resume with emerge --resume.

----------

## JRV

This little dirty script can help for cases of emerging C/C++ based emerges. It just checks the CPU temperature regularly and SIGSTOPs cc1 and cc1plus processes when $high_temp is reached. It then waits until the system cools down to $low_temp and continues the stopped processes.

In my case, I'm getting the CPU temp from /sys/bus/i2c/devices/1-0290/temp3_input. You have to insert something appropriate for your system there, e.g. /proc/acpi/thermal_zone/... and only extract the temperature number without the "°C".

```
#!/usr/bin/perl -w

$high_temp = 62000;

$low_temp = 46000;

$critical_temp = 70000;

$paused = 0;

while(1)

{

    chomp ($temp = `cat /sys/bus/i2c/devices/1-0290/temp3_input`);

    print "Current temperature:\t$temp\t\tPaused:\t$paused\n";

    print "High temperature:\t$high_temp\n";

    print "Low temperature:\t$low_temp\n";

    print "Paused: $paused\n\n";

    if ($temp >= $high_temp && !$paused)

    {

        print "Pausing emerge process!\n";

        `killall -19 cc1`;

        `killall -19 cc1plus`;

        $paused = 1;

    }

    if ($temp <= $low_temp && $paused)

    {

        print "Resuming emerge process!\n";

        `killall -18 cc1`;

        `killall -18 cc1plus`;

        $paused = 0;

    }

    if ($temp >= $critical_temp)

    {

        print "Critical temperature reached! Halting system!\n";

        `/sbin/halt`;

    }

    sleep 10;

}
```

Btw. I don't think changing PORTAGE_NICENESS really helps. You could just set portage's priority lower than any other process, but if nothing else wants to run, portage will still consume your CPU time. So you won't really significantly affect the total system load with that.

The script could be improved if you could find a way to just SIGSTOP the whole "emerge" process group from a script (like pressing Ctrl-Z in the corresponding terminal). I asked that question once, but noone seemed to know an answer.

Greets,

  Julius

----------

## fredgt

You can put it into the freezer while emerging. Just kidding, don't try it , you could kill it because of condenstation when cooling down. 

changing PORTAGE_NICENES won't help as this only changes priority while compiling so the cpu will work just as fast and much. It will only run smoother when using the computer while it's emerging.

If it stops when emergeing there could be some problems with the system, i don't know how hot a PIII is supposed to get but it's not realy heatly. Check that all the fans are functioning. On the other hand if the cooling on you're laptop is only just enough for you're system in combination with hot temperatures the system could just overheat when running full load for al long period.

Normally frequency scaling will help you but if you can't get frequency scaling to work there might be some other things that could help.

- Look in the bios of you're computer and see if you can edit the multiplier. This number multiplied with the external-cpu-freqency (usualy you're fsb) gives you the cpu freqency. (Not all motherbord and cpu's allow you to do this)

- You can lower the fsb. By doing this the cpu will run at a lower speed, this will also affect the speed you're ram is working at

Also try to put you're laptop in the coldest room you have and if possible put it on a cold (stone,...) floor. This should help you're notebook a little.

----------

## drefo

Definitely check that the fans are working and that the heatsink/fans are clean.

Dust can easily build up in the cooling system. You can clean it out with some

compressed air if that's the case. If the airflow, or the contact of the heatsink

fans with the air is impeded by dust that can be a problem.

You could also try using arctic silver between your PIII and the heatsink,

if you don't mind opening up the system and getting your hands dirty. This helped

considerably on my P4 laptop, which used to run the fans all the time on low, and

always put the fans on high when doing big compiles. Here's instructions for the PIII:

http://www.arcticsilver.com/arctic_silver_instructions_small.htm

----------

## PbHead

I too have a P4 laptop that can overheat while doing a gentoo install. To do the original install, I emerged distcc as soon as possible and used the other computers in my house to do all the compiling. If you have even one other gentoo box (or any linux for that matter), you can ask distcc to compile everything on the remote machine and nothing on the laptop. This will add to your total install time, but its better than failure. Good Luck.

PbHead

----------

## lmcogs

Thanks all

I do have a desktop running nicely and will try distcc. That would take a bit of time to learn.   At the moment I bought a cheap household fan and am trying that.  I did open the notebook up and all seems clean enough.  I am willing to try all suggestions

Lmcogs

----------

## JRV

 *PbHead wrote:*   

> you can ask distcc to compile everything on the remote machine and nothing on the laptop.

 

I just wanted to try this, but I can't seem to get "localhost" out of my host list:

```

$ distcc-config --set-hosts 10.0.0.4

$ distcc-config --get-hosts

localhost 10.0.0.4

```

Any ideas?

/etc/distcc/hosts also only lists 10.0.0.4, but is it still used by default?

Julius

----------

## bassvandijk

For extra info about high temperature you might want to look at this topic.

----------

## lmcogs

Hi 

Been running emerge -uDa world for the last 3-4 hours now on the notebook mentioned above with external fan and seems cools enough.  Without the fan the machine would have shutdown after an hour or less.

The machine's fine but I'm cold|

lmcogs

----------

## drefo

 *PbHead wrote:*   

> To do the original install, I emerged distcc as soon as possible and used the other computers in my house to do all the compiling. If you have even one other gentoo box (or any linux for that matter), you can ask distcc to compile everything on the remote machine and nothing on the laptop.
> 
> 

 

Good idea about using distcc ... thanks for pointing that out.

----------

## Seyton

It might be better to use distcc and to activate acpid on your install 

I had the same problem and solved it by:

```

#modprobe thermal

#modprobe fan

#/etc/init.d/acpid start

```

This made it so the fan started up like it should and my laptop did not overheat.

Also using distcc is always a good idea!

----------

## yoshi252

I also experienced lockups of my notebook at big emerges because of heat.

I wrote a small daemon that keeps track of the temperature of the CPU and enables throttling if temperature goes too high. It uses the ACPI interface to do so. Using this daemon I didn't have a lockup since  :Smile: 

you can get the daemon here: http://yoshi252.dyndns.org/index.php?page=thermald&type=auto&lang=en

Unfortunately this is not yet in portage  :Wink: 

----------

