The website has moved

Note: the website moved to www.keenformatics.com. You're being redirected.

Saturday, June 15, 2013

How to solve Dell laptops fan issues in Ubuntu

When I finally bought my new Dell Inspiron laptop, I decided to take a look at the brand new Windows 8 OEM installation which I (forcedly) paid for. About 20 seconds later, I was installing the latest Ubuntu distribution. I didn't knew what I would have found, but I was happy as well.
How to solve Dell laptops fan issues in Ubuntu
Sarah Klockars-Clauser for openphoto.net


One of the main problems I faced has been that of the incredibly loud fan noise which came from my new laptop, so I began my online quest until I found i8kutils, a (partial) solution to my problem. I'm saying "partial" because we shouldn't confuse the cause and the effect: i8kutils won't solve your overheating issues, but it will help you to configure your fans in order to overwrite their exasperated and irritating default behaviour. But be warned: if your fans are running it's probably because they're trying to manage your overheating problems for you, so don't set i8kutils just to make your fans definitively shut up (unless you know what you're doing).


The steps!

1) First of all, let's download and install i8kutils. Open your terminal and write:
sudo apt-get install i8kutils
2) Now you've got to add i8k to your modules. Open the modules file:
sudo gedit /etc/modules
and add the string "i8k" (without quotes) to the file. Save and exit.

3) Create an i8k.conf file
sudo vim /etc/modprobe.d/i8k.conf
and fill it with this code:
options i8k force=1

Note: Some older guides will tell you to create a /modprobe.d/options file. The "options" file isn't used anymore on Ubuntu. What does matter is that you create a file with a .conf extension (the filename isn't important, but I decided to name it i8k.conf for clarity). So beware of older i8kmon configuration guides.

4) Now restart your computer, or run this code to make i8k run:
sudo modprobe i8k force=1
5) We will now create a i8kmon.conf file which will tell the i8kmon utility how to behave.
sudo gedit /etc/i8kmon.conf
Paste the following code in it:
# Run as daemon, override with --daemon option
set config(daemon)      0

# Automatic fan control, override with --auto option
set config(auto)        1

# Report status on stdout, override with --verbose option
set config(verbose) 1

# Status check timeout (seconds), override with --timeout option
set config(timeout) 20

# Temperature thresholds: {fan_speeds low_ac high_ac low_batt high_batt}
set config(0)   {{-1 0}  -1  40  -1  40}
set config(1)   {{-1 1}  30  60  30  60}
set config(2)   {{-1 2}  53  128  53  128}

# For computer with 2 fans, use a variant of this instead:
# Temperature thresholds: {fan_speeds low_ac high_ac low_batt high_batt}
# set config(0) {{-1 0}  -1  52  -1  65}
# set config(1) {{-1 1}  41  66  55  75}
# set config(2) {{-1 1}  55  80  65  85}
# set config(3) {{-1 2}  70 128  75 128}

# end of file

This has been edited to match my Dell Inspiron 15r 5521 fan configuration (and I hope I did it well). If you want more informations take a look at the documentation on Ubuntu Manuals: http://manpages.ubuntu.com/manpages/gutsy/man1/i8kmon.1.html

6) Now you should be able to run i8kmon from your terminal and see if (and how) it's working. Simply run:
i8kmon

Finished!

But wait...what if you want i8kmon to automatically start at boot? I'll simply copy-paste what's been written in the official documentation:
Under Debian GNU/Linux it is possible to start the daemon automatically by creating an /etc/default/i8kmon configfile containing the line "set config(daemon) 1". Note the the /etc/default/i8kmon configfile is not installed by the i8kutils package because the program is designed to be run by normal users. If you want to use it as daemon you must create the config file yourself. In this case, the --nouserconfig option can sometimes also help by limiting it to sourcing /etc/i8kmon (and not ~/.i8kmon).
Doubts: I wonder why I don't have the ~/.i8kmon file on my system, while the docs refer to it.
If you take a look in your /usr/bin/i8k you'll find that ~/.i8kmon is considered as a user configuration, while /etc/i8kmon.conf (the file we edited before) is treated as a system configuration.
If something in your configuration goes wrong (e.g. if you can't make your temperature limits work) it would be worthwhile checking if you've got this ~/.i8kmon file on your system and try to edit it, because it could be perfidiously overwriting your system configuration. If you discover something about it, please let me know.

I hope this article has been useful to you. If so, please click here and there on social buttons to make it more visible. If not, I'm waiting for your constructive comments ;)