daknetworks.com

You are here: Blog Linux Laptop Power Management | Linux Laptop Too Hot | Linux Laptop Fan Speed

Linux Laptop Power Management | Linux Laptop Too Hot | Linux Laptop Fan Speed

First step is diagnostics; find out how hot it is running. There is a package called lm_sensors.

Installation

lm_sensors is installed by default in Centos. If not, you can install:
yum install lm_sensors

Detect The Sensors

lm_sensors needs to know what sensors are available. To do this:
sensors-detect
answer YES to all the questions / accept all the defaults

Show the Temp

lm_sensors will show the temperature in C by:
sensors

Or will show the temperature in F by:
sensors -f

Or to see a continuous monitor of temp by:
watch -n 2 sensors
watch -n 2 sensors -f
watch -d sensors

How Hot?

A normal temperature is 45C/100F.

A high temperature is 87C/189F.

A critical temperature is 105C/225F.

Fans should kick in around 60C/140F.

Why Hot? CPU

The burning question (ba-dom-tiss), why is it hot.

One reason could be the CPU. The CPU will have different speeds that it can run. So a 2700 CPU may only be running at 1200. This is called "governors".

To see your max speed and current running speed:
grep -E '^model name|^cpu MHz' /proc/cpuinfo

Not all cpus will have the same options. To see your available governors:
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors

To see your set governor:
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

Or:
service cpuspeed status

And if that doesn't work, try:
/etc/init.d/cpuspeed status

To set your governor:
echo ondemand > /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

Why Hot? Graphics Chip

A second reason is the graphic chip or graphic drivers. In laptops, secondary graphics cards can be installed along with the built-in graphics card. The idea is that the secondary card takes over when the built-in card needs it. This is called discrete graphics card or Nvidia’s Optimus graphics-switching technology. The idea is to save power and to make the battery last longer. There are all sorts of problems this happening in real life.

To see if the discrete graphics card is on:
grep -i switcheroo /boot/config-*

To change, edit the file manually and change "CONFIG_VGA_SWITCHEROO=n" to "CONFIG_VGA_SWITCHEROO=y":
vi /boot/config-2.6.32-696.20.1.el6.x86_64
(of course, change the config number file that you select when you boot the laptop)

Then reboot:
signal-event reboot

Why Hot? Fans

For me, the laptop isn't hot. It is just that the fan are running at full speed all the time.

Typically, fan control is done through a service called: acpid (this is the same service that provides shutdown control when you press a power button). But, in some cases, Dell laptops lacks ACPI fan control capability. Also, Dell laptops lack pwm-capable sensor for the fans/pwm controllable fans. So lm_sensors from above will not find a sensor for the fans. Consequently, the following typical solutions will not work:

trying with ACPI boot parameters.
fancontrol/pwmconfig program.

/**************************************
SIDEBAR

Some have had luck editing the /etc/grub.conf file and editing ACPI boot parameters by either reporting to the BIOS as Linux or reporting as not Windows 2012. When Linux boots, it reports to the BIOS as Windows. Reporting as Linux may allow it more control.

In the same fashion, reporting as Linux doesn't work but reporting as not Windows 2012 does work.

vi /etc/grub.conf
you will see a list of kernels with numbers. Ususally the highest number is the newest release and the one being used.
find the line that starts with: kernel
at the end, simply add: acpi_osi=Linux
or at the end, simply add: acpi_osi='!Windows 2012'

You can also test this before making the changes permanent:

reboot
wait till the list of kernels show
use the up/down arrow keys to move the highlighted kernel
select the kernel (again, usually the highest number).
press 'e' (for edit)
selec the line that starts with 'kernel'
press 'e' again (for edit)
go all the way to the right (it usually puts you at the end of the line)
at the end, simply add: acpi_osi=Linux
at the end, simply add: acpi_osi='!Windows 2012'
at the end, simply add: acpi_enforce_resources=lax
press enter (to accept the edit)
press 'b' to boot

For example, my normal line looks like:

kernel /vmlinuz-2.6.32-696.20.1.el6.x86_64 ro rd_NO_PLYMOUTH root=/dev/mapper/main-root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=main/root nodmraid rd_LVM_LV=main/swap SYSFONT=latarcyrheb-sun16 rd_MD_UUID=701062e5:0b13b844:9523e658:0c4b0c3d  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet crashkernel=auto

My modified line looks like:

kernel /vmlinuz-2.6.32-696.20.1.el6.x86_64 ro rd_NO_PLYMOUTH root=/dev/mapper/main-root rd_NO_LUKS LANG=en_US.UTF-8 rd_LVM_LV=main/root nodmraid rd_LVM_LV=main/swap SYSFONT=latarcyrheb-sun16 rd_MD_UUID=701062e5:0b13b844:9523e658:0c4b0c3d  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet crashkernel=auto acpi_osi=Linux

**************************************/

Try typing:
pwmconfig

You will get a standard message stating:
There are no pwm-capable sensor modules installed

Load i8kutils

So to workaround this, you have to install i8kutils package

First, you have to load a kernel module:

modprobe -v i8k

You can see the loaded modules by:

lsmod

In there, you should see: i8k

Great! Now that i8k is loaded, we need the i8kutils package.

 

Contact Dak Networks

Please contact us at the following.