Linux – Laptop fan is always ON using Linux Mint 14


I'm using Linux Mint 14 Cinnamon 64-bit. I have a problem with the laptop fan always staying on. Details of the laptop and readings taken:

Linux core-Inspiron-N7010 3.5.0-17-generic #28-Ubuntu SMP
    Tue Oct 9 19:31:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

    acpitz-virtual-0 Adapter: Virtual device
    temp1:        +26.8°C  (crit = +100.0°C)
    temp2:         +0.0°C  (crit = +100.0°C)

Adapter: PCI adapter
temp1:        +75.5°C 

Adapter: ISA adapter
Core 0:       +54.0°C  (high = +95.0°C, crit = +105.0°C)
Core 2:       +52.0°C  (high = +95.0°C, crit = +105.0°C)

inxi -Fc 0

System:    Host: core-Inspiron-N7010 
Kernel: 3.5.0-17-generic x86_64 (64 bit)
Desktop: Gnome Distro: Linux Mint 14 Nadia
    Mobo: Dell model: 0PJTXT version: A11 serial: .24XCSN1.CN486430B30123.
    Bios: Dell version: A11 date: 03/31/2011
    Dual core Intel Core i5 CPU M 460 (-HT-MCP-)
    cache: 3072 KB
    flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx)
       Clock Speeds: 
           1: 1199.00 MHz 2: 1199.00 MHz 
           3: 1199.00 MHz 4: 1199.00 MHz
           Card: Advanced Micro Devices [AMD] nee ATI Manhattan 
               [Mobility Radeon HD 5400 Series]
  1.13.0 drivers: ati,radeon (unloaded: fbdev,vesa)
                tty size: 197x48 Advanced Data: N/A for root
           Card-1: Intel 5 Series/3400 Series Chipset
                 High Definition Audio driver: snd_hda_intel 
                 Sound: ALSA ver: 1.0.25
           Card-2: Advanced Micro Devices [AMD] nee ATI Cedar HDMI Audio 
                [Radeon HD 5400/6300 Series] driver: snd_hda_intel
           Card-1: Atheros AR8152 v1.1 Fast Ethernet 
               driver: atl1c
               IF: eth0 state: down mac: f0:4d:a2:57:71:f4
           Card-2: Broadcom BCM4313 802.11b/g/n Wireless LAN Controller
               driver: bcma-pci-bridge
               IF: wlan0 state: up mac: 1c:65:9d:7c:e8:5e
       Drives:    HDD Total Size: 128.0GB (3.2% used) 1: 
           id: /dev/sda model: SAMSUNG_SSD_830 size: 128.0GB
                   ID: / size: 110G used: 3.8G (4%) fs: ext4 
                   ID: swap-1 size: 8.44GB used: 0.00GB (0%) fs: swap
       RAID:      No RAID devices detected - 
           /proc/mdstat and md_mod kernel raid module present
       Sensors:   System Temperatures: cpu: 26.8C mobo: 0.0C gpu: 76.0
       Fan Speeds (in rpm): cpu: N/A
       Info:      Processes: 162 Uptime: 17 min 
           Memory: 915.1/7847.5MB Client: Shell inxi: 1.8.4

Best Answer

I see you're on a Dell Inspiron laptop.

You'll most likely be able to solve your problem with running i8kutils (as already suggested by at least one answerer) along with a trick to disable BIOS fan control. For completeness, I'll include some general notes on fan control on Dell laptops, and full instructions for i8kutils.

(dellfand is older than i8kutils, which is still maintained and well-documented, hence ì8kutils is my suggestion.)

What probably won't work on Dell laptops

Two common and straight-forward means of controlling the fan on laptops are through ACPI and through PWM pins, however, unfortunately:

  • Dell laptops lacks ACPI fan control capability (*1)

    • as a consequence, trying with ACPI boot parameters and the like will fail
  • Dell Latitude laptops, and possibly also the Inspiron, as far as I know lack pwm controllable fans (*2)

    • as a consequence, the fancontrol/pwmconfig program won't work

Use i8kutils

The package called i8kutils that is written to control the fan on Dell Inspiron laptops through SMM BIOS. Several users report success on their Dell Laitude laptops as well (I'm one of them, on a Dell Latitude E7440) - however, a trick is often needed to get rid of interfering BIOS fan control.

Install i8kutils:

$ sudo apt-get install i8kutils

Try it:

$ i8kfan 2 2     # set to max speed
$ i8kfan 0 0     # set to 0 speed

...and listen to see if it works.

Disable BIOS fan control

If it works, but somewthing else is fighting back on the setted speed (reported by many users on Dell Latitude laptops), this is due to scheduled SMM sessions setting the fan speed back. Luckily there is a way to disable BIOS fan control by writing to SMM registers.

Warning: see the warning in top of smm.c. This method will write to SMM registers. However, I've seen no user reports on this causing trouble. Also, all reports on trying this have indicated success in disabling the BIOS fan control.

i8kutils includes the source of a program smm but the i8kutils package does not include the compiled binary. What we'll do is to download the source code of i8kutils, compile the program smm, and run it with an apropriate argument to disable BIOS fan control by writing to SMM registers.

Download packages needed for building:

$ sudo apt-get build-dep i8kutils

Download i8kutils source code, extract and enter directory (exact names depending on i8k version):

$ apt-get source i8kutils
$ tar xvf i8kutils_1.33.tar.gz
$ cd i8kutils-1.33/

Compile smm if on a 32-bit system:

$ make

(Above will execute gcc -g -O2 -Wall -I. -o smm smm.c.)

Compile smm if on a 64-bit system:

$ gcc -g -O2 -Wall -I. -o smm -m32 smm.c

Run smm with argument 30a3 to disable SMM fan control:

$ sudo ./smm 30a3

Now, BIOS fan control should be disabled. Try by setting speeds with i8kctl, listen for the fan and make sure the speed persists.

Note: This is a setting that will persist reboots and power-off's. BIOS fan control can be enabled again with $ sudo ./smm 31a3.

*1: I've seen an official source on this, can't find it right now. If you want to verify that your hardware lacks it, follow instructions 'DebuggingACPI' on Ubuntu Wiki (I'm not allowed to provide the link).

*2: for verifying this, run pwmconfig: sudo apt-get install fancontrol, sudo pwm-config will tell if a pwm-capable fan is present or not