Tutorial details | |
---|---|
Difficulty | Intermediate (rss) |
Root privileges | Yes |
Requirements | i8k driver |
Time | 5m |
- Cpu temperature
- Left or right fan status
- Left or right fan speed
- Ac power status
- Fn buttons status
Say hello to i8k driver to control Dell laptop fan
You need to load a driver called i8k. It is used for accessing SMM BIOS on Dell laptops. It is well supported on business class Dell laptop modules such as Latitude, Inspiron, Vostro, Precision mobile workstations and so on. This module is included with Linux kernel version 3.0 or above.
How do I load the driver?
Type the following modprobe command to load the i8k driver:
$ sudo modprobe -v i8k
OR
# modprobe -v i8k
Sample outputs:
insmod /lib/modules/3.5.0-30-generic/kernel/drivers/char/i8k.ko
Install i8kutils package on Debian / Ubuntu
Open a terminal and then type the apt command/apt-get command:
$ sudo apt-get install i8kutils
Outputs:
[sudo] password for vivek: Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: acpi tcl tcl8.6 Suggested packages: tcl-tclreadline The following NEW packages will be installed: acpi i8kutils tcl tcl8.6 0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. Need to get 51.8 kB of archives. After this operation, 181 kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://archive.ubuntu.com/ubuntu focal/universe amd64 acpi amd64 1.7-1.1 [12.9 kB] Get:2 http://archive.ubuntu.com/ubuntu focal/main amd64 tcl8.6 amd64 8.6.10+dfsg-1 [14.8 kB] Get:3 http://archive.ubuntu.com/ubuntu focal/universe amd64 tcl amd64 8.6.9+1 [5,112 B] Get:4 http://archive.ubuntu.com/ubuntu focal/universe amd64 i8kutils amd64 1.43 [19.0 kB] Fetched 51.8 kB in 2s (31.4 kB/s) Selecting previously unselected package acpi. (Reading database ... 293832 files and directories currently installed.) Preparing to unpack .../acpi_1.7-1.1_amd64.deb ... Unpacking acpi (1.7-1.1) ... Selecting previously unselected package tcl8.6. Preparing to unpack .../tcl8.6_8.6.10+dfsg-1_amd64.deb ... Unpacking tcl8.6 (8.6.10+dfsg-1) ... Selecting previously unselected package tcl. Preparing to unpack .../archives/tcl_8.6.9+1_amd64.deb ... Unpacking tcl (8.6.9+1) ... Selecting previously unselected package i8kutils. Preparing to unpack .../i8kutils_1.43_amd64.deb ... Unpacking i8kutils (1.43) ... Setting up tcl8.6 (8.6.10+dfsg-1) ... Setting up acpi (1.7-1.1) ... Setting up tcl (8.6.9+1) ... Setting up i8kutils (1.43) ... Created symlink /etc/systemd/system/multi-user.target.wants/i8kmon.service → /lib/systemd/system/i8kmon.service. Processing triggers for man-db (2.9.1-1) ... Processing triggers for systemd (245.4-4ubuntu3.2) ...
Older Linux distro config (pre systemd)
Edit the file /etc/default/i8kbuttons and /etc/default/i8kmon and set ENABLED to 1:
ENABLED=1
Alternatively, use the sed command to do all your dirty work:
sed -i.bak 's/ENABLED=0/ENABLED=1/' /etc/default/{i8kmon,i8kbuttons}
Start the service (this is equivalent of running the modprobe -v i8k command):
# /etc/init.d/i8kmon start
Sample outputs:
* Starting Dell Inspiron fan/cpu-temperature monitor i8kmon [ OK ]
Newer Linux distro with systemd
You need to edit and check for the /etc/i8kmon.conf file using the vim command or cat command:
$ cat /etc/i8kmon.conf
Default config file:
# Sample i8kmon configuration file (/etc/i8kmon.conf, ~/.i8kmon). # External program to control the fans set config(i8kfan) /usr/bin/i8kfan # Report status on stdout, override with --verbose option set config(verbose) 0 # Status check timeout (seconds), override with --timeout option set config(timeout) 2 # Temperature threshold at which the temperature is displayed in red set config(t_high) 80 # Temperature thresholds: {fan_speeds low_ac high_ac low_batt high_batt} # These were tested on the I8000. If you have a different Dell laptop model # you should check the BIOS temperature monitoring and set the appropriate # thresholds here. In doubt start with low values and gradually rise them # until the fans are not always on when the cpu is idle. set config(0) {{0 0} -1 55 -1 60} set config(1) {{1 1} 50 65 55 70} set config(2) {{2 2} 60 75 65 80} set config(3) {{2 2} 70 128 75 128} # Speed values are set here to avoid i8kmon probe them at every time it starts. set status(leftspeed) "0 1000 2000 3000" set status(rightspeed) "0 1000 2000 3000" # end of file
Use the systemctl command to start/stop/restart the service:
$ sudo systemctl start i8kmon.service
$ sudo systemctl stop i8kmon.service
$ sudo systemctl restart i8kmon.service
$ sudo systemctl status i8kmon.service
How do I see the current status?
Type the following command
$ i8kctl
Here is what i see from my Dell laptop:
1.0 (null) XYZABC123 43 1 1 77130 78120 0 -1
Where,
- 1.0 i8k format version
- (null) bios version
- XYZABC123 machine id (Dell serial number)
- 43 cpu temperature
- 1 left fan status
- 1 right fan status
- 7713 left fan speed
- 7812 right fan speed
- 0 ac power status
- -1 : fn buttons status
Just print the CPU temp, enter:
$ i8kctl temp
Sample outputs:
52
Controlling fan speed on Dell laptop
First, just print the fan status info:
$ i8kctl fan
Sample outputs:
1 1
The fan command can accept two optional parameters which specify the new fan state for left and right fans. The state parameter can be:
Where,
- 0 : turn the fan off (not recommended)
- 1 : set low speed
- 2 : set high speed
- - : don’t change the state of this fan
For example, the following command sets the left fan (usually used by CPU) to high speed and leaves the right unchanged:
$ i8kctl fan 2 -
In this example, sets the left fan (usually used by CPU) to high speed and leaves the left unchanged:
$ i8kctl fan - 2
The following will set both fans to low speed:
$ i8kctl fan 1 1
This is equivalent of running the following commands:
## the syntax is ## i8kfan leftFan rightFan # Set left fan on high and leaves the right unchanged i8kfan 2 - # Set right fan on high and leaves the left unchanged i8kfan - 2 # Set both fans to low i8kfan 1 1
Please note that the service /etc/init.d/i8kmon starts i8kmon in daemon mode. So setting the speed with i8kfan is pointless since the daemon will override the speed with its own value on fly as per system temperature.
Using sensors command
First, install and configure lm_sensors package as described here and type the following command to see information about your FAN and cpu core temperature:
$ sensors
Sample outputs:
I also suggest that you use the acpi -V command to see the current battery status and thermal temperature under Linux operating systems.
See also
- Linux: Monitor hard disks temperature with hddtemp command.
- Linux Laptop: Display battery status and thermal temperature from command line.
- FreeBSD: Get / Read hard disk temperature using smartd.
- Monitoring hard disk health with smartd under Linux or UNIX operating systems.
🐧 40 comments so far... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
How this would work for Dell XPS variants?
It should work as Ubuntu 12.04 LTS is official supported on many XPS variants. Why not try it out the commands and let us know the result?
HTH.
Great article indeed. Would you please correct the following line?
The start argument was missing.
The faq has been updated. I appreciate your post.
Great Article. FYI, I always had stress with this on my Dell Studio 1735. systems locks etc…
Is there any module for ASUS Laptops ??
Please check the following wiki page and search for Asus:
http://www.lm-sensors.org/wiki/Devices
Try installing lm_sensors package.
HTH
I use fedora and I got a dell laptop yesterday. Not using the dedicated graphics seems to do the trick, but the simple fact of the matter is that i cannot spend all of my time checking the temperature and changing the fan speeds all the time. Seriously, didn’t anyone at Dell think about these scenarios? or did they even bother to test it a bit, at least with the most common distros (hint: ubuntu/debian/suse/fedora)?
It’s great thanks , but I had a question .. the first parameter of the fan option is always “-1 ” what does that mean ?
there is the out put of “i8kctl fan” it is “-1 1”
and thanks a lot :)
> there is the out put of “i8kctl fan” it is “-1 1″
obviously your system does not have a left fan . . . ; -)
Hi,
I would like to have some auto control for my Dell M4600 fans in Ubuntu since they are much louder in that than with Windows.
Any suggestion?
Thx!
Hi,
I use ‘i8kmon’ from ‘i8kutils’ for fan auto control on my Dell, and that is running very nice.
How do you use this command to auto control the fan?
The command issued at init is
after installing and running the commands there are to things
1. fan turns on and of constantly =(
2. it looks like it is set to auto
set PROG_VERSION “v1.30 11/16/2013”
array set config {
sysconfig /etc/i8kmon.conf
userconfig ~/.i8kmon
i8kfan /usr/bin/i8kfan
acpi “acpi”
geometry {}
use_conf 1
auto 1
daemon 1
verbose 0
timeout 5
unit C
t_high 80
min_speed 2000
and last there is no /etc/default/i8kbuttons and /etc/default/i8kmon
e 6530 -linux mint
some ideas
thank you
Tried editing the files in the etc/default folder but I keep getting file permission erros, any work around to that?
Run command as root using su or sudo.
Thanks that worked for me :)
thanks for this. i have an old D620 with lubuntu on it which was getting mega hot because the fan wouldn’t come on. problem solved now.
Why enable i8kbuttons?
It seems it was used the old days. The manpage of i8kbuttons says
‘Monitor the status of Fn-buttons on Dell Inspiron laptops.’.
But now, perhaps it is not necessary. I can say that for me it is not!
One question, why don’t the good people of i8kmon put the ENABLED standard on 1?
I was struggling with permission hence the question. :-)
I love linux but the temperature was so high, I hesitated, then found this site.
It was a bit fiddly, but I love it. It just switched of automatically and now it started on speed 1 again. It is on 30 celsius now.
Thank you
I have a dell D610 kernel 3.13 on Rebecca, I installed i8kutils by means of the software manager but still can’t access/manipulate the fan speed. After I set i8kctl fan 2 0 the fan runs fast for 5 seconds and then I’m right back to square one again. -1 0. Am I missing something?
A bit lost here; the fan configuration for 1 and 1 as well as changing the etc file to enabled 1 works fine; how do I make the settings default? When I reboot the laptop, the fan speeds revert to normal which shows 1 and 3.
Thanks!
sed: impossible de lire /etc/default/i8kmon: No such file or directory exist
sed: impossible de lire /etc/default/i8kbuttons: No such file or directory exist
Followed this and worked fine…
But after a while the fan seemed to stop working all together…
Please help me to get this sorted out
Dell Latitude D810. Ubuntu 14.04.1 fully up to date.
Did install latest i8kutils.
Had following problems.
$ sudo modprobe -v i8k
gave no output for insmod
# sed -i.bak ‘s/ENABLED=0/ENABLED=1/’ /etc/default/{i8kmon,i8kbuttons}
sed: can’t read /etc/default/{18kmon,: No such file or directory
sed: can’t read i8kbuttons}: No such file or directory
# /etc/init.d/i8kmon start
* Starting Dell fan/cpu-temperature monitor i8kmon [fail]
Explain/help needed.
tia
The sed -1.bak command gives:
sed: can’t read /etc/default/i8kmon: No such file or directory exist
sed: can’t read /etc/default/i8kbuttons: No such file or directory exist
How to fix?
The command /etc/init.d/i8kmon start
shows [fail]
What did I miss
tia
Do not know what I did right or incorrectly but what I did above stands.
Before beginning the install process the temp was at 54c.
However yesterday when I powered up and left it on for a while and checked
the temp it was down to 36c I maaged to check the right side vent and found
the fan was in fact working.. I powered up again today and after 1 hour the
temp was 36c and after 2 hours was 37c. The room temp was 26c.
It would be nice if someone could resolve issues in my earlier post.
Thanks for the program.
1.0 (null) 9SX2LX1 51 -1 1 27660 144630 0 -1
This is result that I got, but I want to know why the fn is -1,and how to use fn function
Thanks
Can this software allow me to set the temperature level for when the cooling fan is started, currently is turns on at 32 or 34 degrees (see below), with is too low, can I change this to a higher level?
Thanks for this article, it’s been a lifesaver! Since I’ve been running this utility, both my left and right fans are acting erratically. They constantly switch on and off every few seconds. Your article mentioned that the daemon assumes control overriding any commands that you throw at it. Has anybody run into this issue?
Vintage machine help
machine:
Dell
Intel PII @ 397 Mhz
256Megs RAM
40 Gig HDD
Ubuntu 15.04 Vivid
Kernel 4.1.4-040104-gen
i get the same error on this machine. but i do question the age of the laptop. It is old! but that aside, I have tried the above method with no resolve. I do not how ever, have any fan speed issues.
Thanks for the article.
Linux!
It will work!
I have 1 vostro 1510 , i install ubuntu 15.10 , after i install i8kutils (1.60) 1 have problens (freezes) , for my solution is :
IN FILE : /etc/i8kmon.conf
# Run as daemon, override with –daemon option:
set config(daemon) 1
# Automatic fan control, override with –auto option
set config(auto) 0
# Status check timeout (seconds), override with –timeout option
set config(timeout) 2
# Report status on stdout, override with –verbose option
set config(verbose) 1
# Temperature thresholds: {fan_speeds low_ac high_ac low_batt high_batt}
set config(0) {{-1 0} -1 50 -1 50}
set config(1) {{-1 1} 50 70 50 70}
set config(3) {{-1 2} 70 128 70 128}
# end of file
AND IN FILE : /etc/init.d/i8kmon
I change line for : I8KMON_ARGS to :
I8KMON_ARGS=”–daemon –noauto –nouserconfig “
after have a flag –auto , for my causes freezes (i understain , automode try detect , but a moment to change values for fan , try change into fan 2 , and i no have 2 fan , i have 1 )
note : my notebook have 1 fan not 2 , i found others peoples inform same problem in autodiscovery for i8kmon
note 2 : if possible , try inform for this project to try create a check is possible fix auto detection for others models if have 1 fan .
thx
Changing
I8KMON_ARGS="–daemon –nouserconfig –auto"
to
I8KMON_ARGS="–daemon –nouserconfig –noauto"
in
“/etc/init.d/i8kmon”
Worked for my issues when fans would shut off and on to throttle temperature. Now constant on :)
Did not work on my DELL XPS 13 with ubuntu 14.04
gus@XPS:~$ sudo apt-get install i8kutils
It worked on my system but you need to update repo first:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install i8kutils
worked for my Dell Latitude E6510 – Thanks!
Glad it worked out. Thanks for the feedback.
I have an Dell XP 13 9280 and i follwed your guide but with no luck
i8kctl returns
1.0 1.1 (null) 34 0 0 0 0 -1 -1
i8kctl fan returns
0 0
Setting fan speed result with negative integer
i8kctl fan 2 -
sensors
ath10k_hwmon-pci-0200
Adapter: PCI adapter
temp1: +54.0°C
dell_smm-virtual-0
Adapter: Virtual device
fan1: 0 RPM