Monitoring/Getting current temperature
The classic tool for this kind of monitoring under Linux is sensors
:
sudo apt-get install lm-sensors
sudo sensors-detect
Answer "y" to all questions and load any modules suggested by the last step using (sudo modprobe module_name
), make sure the settings are loaded and then then run sensors:
sensors
That should show you output similar to this:
$ sensors
coretemp-isa-0000
Adapter: ISA adapter
Core 0: +53.0°C (high = +95.0°C, crit = +105.0°C)
Core 2: +58.0°C (high = +95.0°C, crit = +105.0°C)
i8k-virtual-0
Adapter: Virtual device
Right Fan: 87690 RPM
CPU: +58.0°C
Depending on your system, there are various files that can contain this information. One of these should give you your temperature:
cat /sys/devices/platform/coretemp.0/temp?_input
or
cat /proc/acpi/thermal_zone/THM0/temperature
or
cat /sys/kernel/debug/ips/cpu_temp
or
cat /sys/devices/virtual/hwmon/hwmon1/temp1_input
or
cat cat /sys/bus/platform/devices/coretemp.0/temp2_input
Reducing CPU temperature.
Is your CPU always running at top speed? Try setting another scaling governor. Your options are:
- Performance keeps the CPU at the highest possible frequency
- Powersave keeps the CPU at the lowest possible frequency
- Userspace exports the available frequency information to the user level (through the /sys file system)
and permits user-space control of the CPU frequency
- Ondemand scales the CPU frequencies according to the CPU usage (like does the userspace frequency scaling
daemons, but in kernel)
- Conservative acts like the ondemand but increases frequency step by step
Personally, I use ondemand
and recommend it. The Ubuntu wiki warns of certain problems, but I have never had any trouble with it. To use the ondemand governor do:
sudo echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
If the above does not help, you might have a hardware issue. Since you have already checked the fan, the next most likely culprit is the thermal paste. If you've had your computer for a while, it is likely that the paste between the heat sink and the CPU has gotten old and you should change it:
- Open the machine, remove the fan and heatsink from the CPU.
- Remove the old thermal paste from both the CPU and the heatsink, ideally using a cotton swab with isopropyl alcohol. For the heatsink, you can also use a knife or similar to scrape off the paste before cleaning the rest with the alcohol. I don't recommend you try and scrape it off the CPU though, just use the cotton swab.
- Once you have cleaned the old paste away, apply a small amount to the center of the CPU and then re-attache the heatsink. Since the heatsink will be held down tightly against the CPU, it will also spread the paste around uniformly. Make sure you don't use a lot of paste since that might cause it to overflow around the edges of the heatsink.
For a (very) detailed tutorial on changing your thermal paste, see here.