LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-25-2007, 04:35 AM   #1
[KIA]aze
Member
 
Registered: Jun 2006
Distribution: Debian, Ubuntu, Windows XP
Posts: 146

Rep: Reputation: 16
How can I increase the maximum CPU temperature before forced shutdown?


How can I increase the maximum CPU temperature before forced shutdown?

I have a Compaq laptop with a pentium 4 and I'm having serious overheating problems.
Everytime the CPU temperature reaches 73 C (which happens everytime I make a system update for example), the PC suddenly shuts down with a message saying something like "critical temperature reached, shutting down".

Or is there a way to replace the shutdown with an Xorg kill instead so that I don't have to reboot all the time?

I am currently using the ondemand frequency scaling governor.

Last edited by [KIA]aze; 05-25-2007 at 04:40 AM.
 
Old 05-25-2007, 06:09 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
Hi,

It could be that the shutdown temp is done by the hardware itself, it that case you cannot change it.

You probably do not want to change the temp setting, but want to address the underlying problem: Why is your laptop overheating?

I had the same problem with an Asus laptop: After trying to change the temp setting, which did not work (the shutdown was done by the hardware itself, not by linux), I opened up the laptop and found out that most openings where blocked by dust and other 'stuff'. After cleaning the problem was gone.

Be aware that opening your laptop could void the warranty that could be on it!!

Hope this helps.
 
Old 05-25-2007, 06:19 AM   #3
[KIA]aze
Member
 
Registered: Jun 2006
Distribution: Debian, Ubuntu, Windows XP
Posts: 146

Original Poster
Rep: Reputation: 16
The warranty is already void anyway. (laptop is 4 years old)
As soon as I can put my hand on an appropriate screwdriver I'll do that.

The shutdowns also happen in Windows when playing 3D games. So it could indeed be hardware related.

For now, I have created a script checking the temp every second and then killing the most CPU intensive app.
However, it can't kill Xorg because of permissions. ^^

I could maybe also use the manual cpu frequency scaling to keep a constant frequency, but I prefer having an adaptive performance.

I heard that sometimes the temp readings can be wrong, that's why I wanted to try the limit change.
For now I am using gkrellm to watch the temp.
I haven't been able to get the "sensors" command to work.

edit:
Here's the script I currently use if anybody is interested or has suggestions for improvements:
Code:
#! /bin/bash
# Check if all parameters are present
# If no, exit
if [ $# -ne 1 ]
then
        echo
        echo "usage :"
        echo "$0 max_temp"
	echo "This shellscript will kill the most CPU-intensive process if the temperature goes above max_temp"
        echo
        exit 0
fi

while true
do
	sleep 1
	temp=$(cat /proc/acpi/thermal_zone/THRM/temperature | sed -e 's/[^0-9]//g')
	if test $temp -ge $1
	then
		USAGE=`ps -eo pcpu,pid -o comm= | sort -k1 -n -r | head -1 | awk '{ print $1 } '`
		PID=`ps -eo pcpu,pid -o comm= | sort -k1 -n -r | head -1 | awk '{print $2 }'`
		PNAME=`ps -eo pcpu,pid -o comm= | sort -k1 -n -r | head -1 | awk '{print $3 }'`
		echo "too hot: $temp C" >>tempwatch.log
		echo $USAGE >>tempwatch.log
		echo $PID >>tempwatch.log
		echo $PNAME >>tempwatch.log
		killall $PNAME >>tempwatch.log 2>&1
	fi
done

Last edited by [KIA]aze; 05-25-2007 at 06:31 AM.
 
Old 05-25-2007, 06:50 AM   #4
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by [KIA]aze
For now, I have created a script checking the temp every second and then killing the most CPU intensive app.
However, it can't kill Xorg because of permissions. ^^
If you run the script as root then you should be able to kill Xorg. But make very sure your script does what you want it to before turning it loose as root. But generally Xorg is only acting at the behest of other programs, so if no other program is doing much, Xorg shouldn't be doing much either.
 
Old 05-25-2007, 08:03 AM   #5
stealth_banana
Member
 
Registered: Mar 2004
Location: Scotland
Distribution: Debian Sid / Kubuntu
Posts: 170

Rep: Reputation: 30
Before you open up and possibly break stuff, I would recommend getting your vacuum cleaner hose attachment and using it to try and suck stuff out of every vent on the machine. You may also be able to loosen stuff with a small jewellers screwdriver or needle.

Just be careful if you have any loose keys on the keyboard though.
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Run command on forced shutdown LinuxBlackBox Linux - Software 3 10-10-2006 08:50 PM
Deactivating forced shutdown because of high temperature? Thora Linux - Kernel 8 05-20-2006 09:05 AM
How to Increase the Maximum Volume ? LinToWinWin Linux - Hardware 4 05-12-2006 06:13 PM
CPU temperature Sc0pE Linux - Software 2 05-22-2005 06:10 PM
cpu temperature alaios Linux - Hardware 4 09-21-2004 05:30 PM


All times are GMT -5. The time now is 04:34 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration