익명 18:50

How do I get fan control working?

How do I get fan control working?

I know there something called fancontrol, that enables you to control the speed of your system's ventilation. I'd like to let my fans spin a bit faster as my laptop is heating up very easilly. All tutorials and stuff I've found are for old versions of Ubuntu and don't seem to be working anymore.

Can anyone explain to me or give me a good link on how I can get it working on Ubuntu? Something different with the same effect is also fine.



Top Answer/Comment:

EDIT: for modern kernels, see the "EDIT:" block at the end.

You'll most likely be able to solve your problem with something else overriding your i8kctl fan commands by the method given in this answer. For completeness, I'll include some general notes on fan control on Dell laptops, and full instructions for i8kutils.

What probably won't work

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, as far as I know, lack pwm controllable fans (*2)

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

Use i8kutils

However, there's a 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. You suffer from that as well according to a previous comment.

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.)

  • 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 here: https://wiki.ubuntu.com/DebuggingACPI

*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

Note about smm

smm is no longer included in latest i8kutils. If your distribution already upgraded to the latest version, you'll have to fetch an older version manually. The version 1.41 contains smm, while 1.43 no longer contains it.

As of 1.42, smm is provided as a kernel module only.

You can obtain 1.41 on i8kutils launchpad page.


EDIT: 2026, Ubuntu 24.04 / kernel 6.8 (same E7440)

Revisited this after upgrading this laptop. Two notes for anyone landing here on a modern kernel.

  • still works: disabling the BIOS fan control with smm 30a3

  • broke: the old standalone i8k module is gone, replaced by the in-kernel dell_smm_hwmon, and i8kmon's way of setting the fan (the i8kctl/i8kfan SMM call) doesn't work

The fix

Drive the fan through the driver's PWM sysfs interface instead.

Make sure the module is loaded unrestricted: create a file /etc/modprobe.d/dell-smm-hwmon.conf with this line:

options dell_smm_hwmon restricted=0

Once that module is loaded, fancontrol of lm-sensors should drive the fan curve from the CPU temperature - I verified this is the case on my machine. Also, running sudo pwmconfig and enabling the fancontrol service might be needed.

Note: the PWM sysfs interface exposes the following, for trouble-shooting or manual fan control:

-rw-r--r--  /sys/class/hwmon/hwmon3/pwm1         # fan speed (0-255)
-r--r--r--  /sys/class/hwmon/hwmon3/fan1_input   # actual RPM (read-only)
--w-------  /sys/class/hwmon/hwmon3/pwm1_enable  # write-only, root only

(*/hwmon3/* in the path is an example; this may vary on each boot; might be */hwmon1/*, */hwmon2/*, ..)

I.e.: i8kmon/i8kutils isn't needed for the fan curve any more; but building smm from its source is still used to perform the smm 30a3 to disable BIOS fan control.

상단 광고의 [X] 버튼을 누르면 내용이 보입니다