Ubuntu: Take actions when system temperature gets too high

6

3

One of the CPU fans on my Compaq Presario laptop running Ubuntu 9.10 seems to have bit the dust. The fan is deep within the case and I intend to replace the laptop in the next 6 months so it's not worth replacing it. I have the laptop on a cooling pad and most of the time the system is fine, CPU temps around 90°-110°F. Occasionally, however, I'm seeing random lockups which I believe is due to the system overheating. How can I configure the system to:

  1. Lower the CPU speed when the temperature reaches a certain level? (I.E. >110°F)
  2. Shutdown the system when the tempature reaches a critical level? (And what would that be? >130°?)

Josh

Posted 2010-03-07T23:24:29.993

Reputation: 7 540

(Better tag suggestions welcomed) – Josh – 2010-03-07T23:24:44.707

Answers

1

Use computertemp:

http://computertemp.berlios.de/

The last screenshot is exactly what you want (actions upon alarm):

http://computertemp.berlios.de/screenshots.php

As far as your goals:

(1) Adjusting CPU frequency: http://www.linux.it/~malattia/wiki/index.php/Cpufreqd (trigger this with a computertemp alarm)

(2) Clean shutdown at upper-limit temp: "shutdown -h now" as your triggered command

You might also need lm-sensors installed (or not, read the computertemp docs).

You can add it to your panel:

http://ubuntuforums.org/showthread.php?t=805702

Finally, I feel compelled to suggest buying a MacBook or MacBook Pro as your next laptop.

Alex

Posted 2010-03-07T23:24:29.993

Reputation: 2 094

@Alexander Burke: Believe me, I'd love to buy a MacBook. I use an iMac daily. However this laptop was a hand-me down, and I doubt I'll be buying a new one anytime soon :-( – Josh – 2010-03-11T22:33:10.653

I was going by "I intend to replace the laptop in the next 6 months". :)

If my solution solves your problem, please mark it as the answer! :D – Alex – 2010-03-12T07:52:23.823

True. That's my intention at least :-) I haven't tried your suggestion yet but I will soon, and I most certainly will accept it if it works! – Josh – 2010-03-12T16:55:51.723

I should have mentioned, I intended to buy myself a new laptop for Christmas, and that didn't work out too well! – Josh – 2010-03-12T16:56:26.043

0

I dont know for number 1 but for number 2 you can configure this in BIOS.

at.

Posted 2010-03-07T23:24:29.993

Reputation: 128

I don't see a shutdown temp in the BIOS. However even if it were there, I want the OS to cleanly shut down or suspend so I don't lose work. – Josh – 2010-03-08T12:58:30.580