I partially solved the problem using i8kutils. Here's a guide about it:
Keenformatics - How to solve Dell laptops fan issues in Ubuntu
and a discussion here on askubuntu:
Dell Inspiron 5521 i7-3317U Fan CPU too Noisy
Here are the main steps as written on Keenformatics site (my blog).
How To solve Dell laptops fan issues in Ubuntu
First of all, let's download and install i8kutils. Open your terminal and write:
sudo apt-get install i8kutils
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.
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.
Now restart your computer, or run this code to make i8k run:
sudo modprobe i8k force=1
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
Now you should be able to run i8kmon from your terminal and see if (and how) it's working. Simply run:
i8kmon
Finished!
The 0-255 is simply a single byte. The power to the fan is either on or off. The speed of the fan is regulated by how long power is on vs off. Let's say a single period lasts one second, divide that second into 255. If your PWM is set to 64, that means that 64 out of 255 fractions of a second the power is on (~25%), and the other 191 the power is off (~75%). The on portion is called a duty cycle.
So a value of 255 would mean power is applied 100% of the time, 0 would be 0% of the time. How fast the fan is actually spinning is dependent on the fan itself. This is why pwmconfig
is trying to determine how fast the fan spins at the given pwm values. There are typically 25000 periods per second with fan controllers.
MINSTART is the minimum duty cycle required for the fan to break static friction and start moving. MINSTOP is similar, the minimum duty cycle required for kinetic friction to stop the fan. These are different values because static and kinetic friction are different.
For MINPWM if you want your fan spinning all the time, you would set it to something higher than the MINSTART, otherwise set it to 0. I always wondered where there would be a use case for MAXPWM, and you just might have it. In your example, if those fan speeds are to be believed, running at 100% on duty cycle is leaving your fans slower than they are capable of moving. You would set the MAXPWM to the fans fastest speed, around 210.
To me, this suggests a fan problem, it's very odd to see the power applied 80% of the cycle being faster than 100%. It could even be a loose/bad wire/connection, power supply issue, or the IO controller is bad. They do sell fan controllers you can plug into the USB connector on the motherboard like CORSAIR Commander if it came down to the IO controller, and there is a github project for controlling that in Linux.
Best Answer
It worth mentioning that the reporter has also fired a bug for this: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1125052
So it will be also tracked there...