Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
overheat auto-throttle
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
LordHugeMongus
n00b
n00b


Joined: 24 Aug 2003
Posts: 14
Location: Michigan

PostPosted: Fri Aug 29, 2003 11:47 pm    Post subject: overheat auto-throttle Reply with quote

This is a bit of a kludge, but if your cpu tends to get a bit too warm when compiling for 36 hours because you have to try out all the optimization settings and re-compile every week like me :) you may have a way out
you need acpi support in your kernel, and lm _sensors needs to be working..
if your system supports cpu throttling you can keep your system from boiling over.
this is a little script for my system, i load it from local.start in init..

#!/bin/bash
for ((1;1;1)); do ((if grep " 8" /proc/sys/dev/sensors/it87-isa-0290/temp2>/dev/null;then echo 0 > /proc/acpi/processor/CPU1/throttling;fi);(if grep " 9" /proc/sys/dev/sensors/it87-isa-0290/temp2>/dev/null;then echo 2 > /proc/acpi/processor/CPU1/throttling;fi));sleep 2;done

you'll need to modify it to read the right files, this just looks for " 9" and " 8" which will kick in when the temp goes above 89, or drops below 90, it throttles down the cpu to keep it under/at 90.. depending on your sensors setup, what temp's your cpu hits and what you want to keep it at, you'll have to make a few changes..
you need to make sure the min/max settings are not in the same range as this overly simple searching of the file will not know the difference.. at least for the it87 lm_sensors package for 2.4 kernels, each sensor has a file with the min/max/current all listed. I'm wayyyyy to lazy to make this more complicated, but it works for me.. if anyone wants to post a nicer script that actually does some sanity checking, and pulls just the data needed for a comparison, i'd love to have a better implementation...
Back to top
View user's profile Send private message
bonsaikitten
Apprentice
Apprentice


Joined: 01 Jan 2003
Posts: 213
Location: Shanghai, China

PostPosted: Sat Aug 30, 2003 12:41 pm    Post subject: Reply with quote

Excellent idea, but shouldn't your computer be adequately cooled in the first place?
Back to top
View user's profile Send private message
LordHugeMongus
n00b
n00b


Joined: 24 Aug 2003
Posts: 14
Location: Michigan

PostPosted: Sat Aug 30, 2003 2:21 pm    Post subject: yes Reply with quote

yes, it should be, but running the processor at 100% for days on end needs more cooling than alot of systems have, you can get errors compiling that you may not get playing games or other intensive processes. Compiling 2 to 4 gigabytes of code really taxes the whole system. I do have a decent fan/heatsink, but it didn't work out to be quite enough for that much heavy use of the CPU for days on end.. so this lets me keep my current set up working at the fastest speed it can handle, withouth having to buy a better setup to cool the system.. on my next computer i'll probably just look into a water cooling system of some kind.. or several extra case fans to get more air flow..
Back to top
View user's profile Send private message
LordHugeMongus
n00b
n00b


Joined: 24 Aug 2003
Posts: 14
Location: Michigan

PostPosted: Sat Aug 30, 2003 8:42 pm    Post subject: better script Reply with quote

this is a better script to do this...

Code:

#!/bin/sh
function getcurrent
{
        echo $3
}

function dothrottle
{
tempsensor="/proc/sys/dev/sensors/it87-isa-0290/temp2"
throttleset="/proc/acpi/processor/CPU1/throttling"

cputemp=`cat $tempsensor`
ctmp=`getcurrent $cputemp`

        if [[ $ctmp > '89.0' ]];then
                echo 2 > $throttleset
        else
                echo 0 > $throttleset
        fi
}

for ((1;1;1)); do dothrottle;sleep 2;done
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum