Thermal tweaks on DELL laptops running linux
A constant problem I had on my Dell laptop was with the fan noise. Now, I hate the noise of the fan, especially if I am surfing the web or just reading a PDF; on Windows 10, there Windows Update starts randomically while the system is in idle and forces the CPU to 100% for like 15 minutes triggering the fan. Fortunately, Manjaro is not Windows but there was some issues with the default configuration of the fan. However, make your very own configuration is easy enough but make sure to read the all article because you can really damage your machine if it is not properly set.
STEP #1 — install i8kmon
i8kmon is a program that let you take control the fan and monitor the CPU temperatures on Dell Laptops. You can install it with the following commands
## Debian (Ubuntu) ##
sudo apt install i8kutils -y
## Arch users — search on AUR or git clone the PGKBUILD ##
STEP #2 — install dell-bios-fan-control
On some Dell laptops the fan speed is controlled by the BIOS; to disable this behavior we can install a simple C program. If you are an Arch, you are luckier since is it available on the AUR. However I had some issues with the installation getting stuck while installing some dependencies. To avoid that, we will simply git clone the PGKBUILD for the AUR website.
## Arch ##
git clone https://aur.archlinux.org/dell-bios-fan-control-git.git
cd dell-bios-fan-control-git
makepkg -si## Ubuntu ##
git clone https://github.com/TomFreudenberg/dell-bios-fan-control.git
cd dell-bios-fan-control
make
(you will now have an executable file)
PAY ATTENTION HERE!
do not disable the BIOS fan control before you have set up the i8kmon service, or your system could overheat.
STEP #3 — Configure i8kmon
Type:
➤ sudo nano /etc/i8kutils/i8kmon.conf
the part we are interested in for now is this one
set config(0) {{0 0} -1 75 -1 75}
set config(1) {{1 1} 70 85 70 85}
set config(2) {{2 2} 75 90 75 90}
set config(3) {{3 3} 80 128 80 128}
this is the configuration for the fan speed. Let’s see how this works:
we have 3 different fan speed (your mileage may vary depending on your machine): 0 1 2 3, with 0 being the lowest ofc, when the fan is off, and 3 is on full speed. If you read below we also have:
set status(leftspeed) “0 1000 2000 3000”
set status(rightspeed) “0 1000 2000 3000”
You should read this stuff in this way:
set config(0) {{0 0} -1 75 -1 75} →configuration #1..2..3…
set config(configuration-number) {{speed-of-fan-n1 speed-of-fan-n2} lowest-temp-on-AC highest-temp-on-AC lowest-on-battery highest-on-battery}
There is space for two fans: right and left(or bigger and smaller, for XPS series).
IF THE LAPTOP ONLY HAS ONE, THE OTHER WILL BE IGNORED BUT THE CONFIGURATION CAN STAY THERE.
Then there is an array of numbers: they should set the fan speed based on the AC power, however, this could not be available the moment when you run this daemon (I’ll come to this at the end). Then there is this:
set status(leftspeed) “0 1000 2000 3000”
set status(rightspeed) “0 1000 2000 3000”
those are the RPMs of the fan; you can configure them independently. Every time you see a space, it is another fan speed. In this default case for example:
0 = 0rpm
1 = 1000rpm
2 = 2000rpm…. you get the idea. However if you configure it like:
set config(0) {{0 0} -1 75 -1 75}
set config(1) {{1 1} 70 85 70 85}
set config(2) {{2 2} 75 90 75 90}
set config(3) {{3 3} 85 128 85 128}
now the fan will go up to speed 3 when you reach 90 *C ….why?
Each configuration applies in its range of temperature. For example, config(0) will be triggered when the temperature goes from -1 (so the lowest values as possible) up to 75, then config(1) will be applied, which will trigger the fans to level 1 of speed till the CPU will reach 70 *C; at that point, config(0) will be called again. You got the idea.
HOW TO CONFIGURE YOUR FAN? Well, everybody has their preferences, me personally, I wanted a quiet laptop when surfing the internet, so I just checked how hot it became while using chrome and configured the file accordingly.
NOTE: although it’s possible to manually configure the fan speed on three different levels, not every laptop is compatible; on my Inspiron laptop for example I can only set two different speeds and I can’t tweak the rpms. On my newer XPS 13 however those settings work perfectly. You can test how many fan speeds your laptop supports by executing i8kfan. Go like:
i8kfan speed-of-fan-n1 speed-of-fan-n2
ex.
i8kfan 1 1
NOTE: if it doesn’t run, read step #5
It will return two numbers that represents the current real speed of the fan; if a value returns - 1 it means that the fan does not exist on the system or it is unable to read it, while if it returns a lower number it means that your laptop does not support more speed levels. For example if I type 3 3 and it returns to 2 2 now I know that my laptop only supports two fan speeds.
STEP #5 — DISABLE BIOS FAN CONTROL
Run
dell-bios-fan-control 0
This will disable the control of the fan by the BIOS, so know i8kmon has the full control on the fan. You can set the configuration file as you wish and enable the daemon at the end, to make it run on boot:
sudo systemctl enable i8kmon
sudo systemctl start i8kmon
[OPTIONAL] STEP #6 UNDERVOLT
This could be very dangerous, it is not really needed if you really need stability or you can’t find any information on your processor online about how far you can push the undervolt, however some users are claiming around 10–15% improved thermals. The utility is called intel-undervolt and you can find it on github. It is also available on AUR
git clone https://github.com/kitsunyan/intel-undervolt.git
cd intel-undervolt
./configure && make
## if you are on Ubuntu I suggest checkinstall at this point ##
checkinstall
(or)
sudo make install
to edit the config file
sudo nano /etc/intel-undervolt.conf
this is what you will see
apply 0 'CPU' 0
apply 1 'GPU' 0
apply 2 'CPU Cache' 0
apply 3 'System Agent' 0
apply 4 'Analog I/O' 0
replace 0 with the value you want to undervolt in mV, for example -50 for -50mV, -100 for -100mV
ex:
apply 0 ‘CPU’ -50
apply 1 ‘GPU’ -50
apply the settings with
intel-undervolt apply
## to check current applied settings enter##
intel-undervolt read
enable the daemon to start it at boot, but first MAKE SURE your configuration is stable, look online for previous testings or suggestions
sudo systemctl enable intel-undervolt.service
sudo systemctl start intel-undervolt.service
DONE! enjoy your custom thermal config on your DELL.