There was an error in this gadget

+1

Sunday, March 20, 2011

Ubuntu Tips: Manage CPU temperature

Firstly, we have our facebook page now, you will find a link to like this page in the right column, please like this page and keep yourself updated about new post(s) on Linux on Desktop.

I started using computers way back in early 90's and I remember often people used to say that computers should always remain in cool, air conditioned , controlled environment, things might have changed over the years, computers might have become more robust,rigid, I am not sure, but one thing I am fairly certain of is, computers don't like overheating, this affects performance, reduces reliability and often leads to failure. Microprocessor is heart of computer, it consumes the maximum power as well as generates the maximum amount of heat and hence the fact that CPU temperature needs to be controlled becomes important.

I live in Ahmedabad, a city in Western India. In summers the temperature outsides goes to as high as 40-45 degrees, and in dorm rooms we do not have air-conditioning. Since, the ambient temperature is high, laptops usually boil, I have lots of respect for people who have designed these machines, the laptops usually get so hot that someone can make omelette's on these machines, still, I fear this might lead to failure and I wish I had way of finding out temperature of CPU to prevent potential failure.

A sensor is a device that converts physical phenomenon into electrical signals, your computer hardware has different sensors on-board, allowing you to find runtime information about present CPU temperature, fan speed, operating frequency etc and your operating system can inquire about these data values from sensor and thus allow you to monitor if you are reaching critical limit.

I will in this post show you different ways of keeping tab of temperature values on your Ubuntu box:

Finding temperature at command line -

Shoot up Terminal Window ( Applications -> Accessories -> Terminal ) and issue the following command to find out temperature of your system :

acpi -t

or for more complete information

acpi -v

However, if it shows acpi command not found, you can install by issuing the following command:

sudo apt-get install acpi


acpi showing CPU temperature, notice acpi -V gives lots of different parameters

(Note : Another possibility of showing CPU temperature is to look at file - /proc/acpi/thermal_zone/TZXX/temperature , TZXX check your system )


Additionally, there are other sensors on your system that you can find information about, lm-sensors or Linux Hardware Monitoring helps you find information about these.

To install lm-sensors issue the following command ( I have included applet as well to make it simpler for you to find information graphically ) in the terminal window:

sudo apt-get install lm-sensors sensors-applet

Now issue the following command to configure different sensors and load appropriate module ( it is in general safe to agree to question asked in the configuration )

sudo sensors-detect
Now once this completes, you can inquire about values of different sensors on your system by issuing following command in terminal window:

sensors
Alternatively, you can find information by adding applet to panel in gnome, to do so right click on panel at top and chose "Add to Panel"

Hardware Monitor Applet

Once, you add hardware monitor applet, you should get real-time information about present temperature of different core of your processor -


Additionally, if you want information about Hard Disk temperature you can do so by installing hddtemp and issuing hddtemp at command line with parameter as the drive whose tempreature sensor you want to access.

sudo apt-get install hddtemp
sudo hddtemp /dev/sda

Assuming, you want to access hardware sensor of drive /dev/sda.

Hard Disk temperature

Additionally, one can adjust frequency of operation of microprocessor i.e control scaling if the kernel supports it, the higher the frequency at your processor works the more heat it produces and thus if you can control the scaling you can to some extent control how much heat it produces.

There is a very useful applet called "CPU Frequency Scaling Monitor" that allows you to see the frequency at which you are presently operating and helps you tweak ass well, you can add it easily again by right clicking on panel above and right clicking, selecting "Add to Panel" and choosing "CPU Frequency Scaling Monitor".


Additionally if you click on the Applet,you will get option to pick CPU frequency or chose different profile.
You can easily switch between frequency,lower frequency means less heat.

additionally, if CPU temperature constantly remains high, try cleaning fan at the bottom of your laptop, with time it usually gets clogged with dust and removing dust can reduce heat significantly.


Article Written by : Ambuj Varshney (blogambuj@gmail.com)
For Linux on Desktop Blog , http://linuxondesktop.blogspot.com
(C) 2011 , Ambuj Varshney


3 comments:

Anonymous said...

Thank you, this was helpful! :)

adubue said...

Great post - thank you! This was really helpful, now I have one less reason to use Windows!

Tony Silva said...

Thanks

Post a Comment