FINALLY got my fans working manually on Dell XPS 13 (9370)!

So back in November last year (2018) I made a thread about the fans on my 2018 Dell XPS 13 (9370):

And the conclusion was finding out myself the fans DID work.. however, after the CPU was at 80°C for about 30 seconds, then the fans would finally kick in and cool my laptop down.

However, tonight in all my excitement I am writing this thread to say that I finally got fans working manually even though it is kind of "rough" but I am happy I now have control over my fans from within the Terminal within Manjaro.

So I recently installed it again fresh on my laptop and now running Kernel 5.1 and running BIOS version 1.9.0 (Still need to update to 1.10.0 with fwupd)

Here is my inxi output:

System:    Host: dell-xps-13-9370 Kernel: 5.1.4-1-MANJARO x86_64 bits: 64 compiler: gcc v: 8.3.0 
           Desktop: Xfce 4.13.4git-2a9104 tk: Gtk 3.24.8 wm: xfwm4 dm: LightDM Distro: Manjaro Linux 
Machine:   Type: Laptop System: Dell product: XPS 13 9370 v: N/A serial: <root required> Chassis: type: 10 
           serial: <root required> 
           Mobo: Dell model: 0F6P3V v: A00 serial: <root required> UEFI: Dell v: 1.9.0 date: 03/12/2019 
Battery:   ID-1: BAT0 charge: 42.4 Wh condition: 52.0/52.0 Wh (100%) volts: 8.2/7.6 model: SMP DELL G8VCF6C serial: 1789 
           status: Discharging 
CPU:       Topology: Quad Core model: Intel Core i7-8550U bits: 64 type: MT MCP arch: Kaby Lake rev: A L2 cache: 8192 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 31880 
           Speed: 900 MHz min/max: 400/4000 MHz Core speeds (MHz): 1: 901 2: 900 3: 900 4: 900 5: 900 6: 900 7: 900 8: 900 
Graphics:  Device-1: Intel UHD Graphics 620 vendor: Dell driver: i915 v: kernel bus ID: 00:02.0 chip ID: 8086:5917 
           Display: x11 server: X.Org 1.20.4 driver: intel unloaded: modesetting alternate: fbdev,vesa tty: N/A 
           OpenGL: renderer: Mesa DRI Intel UHD Graphics 620 (Kabylake GT2) v: 4.5 Mesa 19.0.4 compat-v: 3.0 
           direct render: Yes 
Audio:     Device-1: Intel Sunrise Point-LP HD Audio vendor: Dell driver: snd_hda_intel v: kernel bus ID: 00:1f.3 
           chip ID: 8086:9d71 
           Sound Server: ALSA v: k5.1.4-1-MANJARO 
Network:   Device-1: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter 
           vendor: Bigfoot Networks Killer 1435 Wireless-AC driver: ath10k_pci v: kernel port: f040 bus ID: 02:00.0 
           chip ID: 168c:003e 
           IF: wlp2s0 state: up mac: 9c:b6:d0:8f:f5:d9 
Drives:    Local Storage: total: 476.94 GiB used: 28.62 GiB (6.0%) 
           ID-1: /dev/nvme0n1 vendor: Toshiba model: KXG50ZNV512G NVMe 512GB size: 476.94 GiB speed: 31.6 Gb/s lanes: 4 
           serial: 78DB76QCKAWP 
Partition: ID-1: / size: 468.16 GiB used: 28.62 GiB (6.1%) fs: ext4 dev: /dev/nvme0n1p2 
Sensors:   System Temperatures: cpu: 35.0 C mobo: 28.0 C sodimm: 29.0 C 
           Fan Speeds (RPM): cpu: 0 
Info:      Processes: 206 Uptime: 36m Memory: 15.37 GiB used: 2.29 GiB (14.9%) Init: systemd v: 242 Compilers: gcc: 8.3.0 
           clang: 8.0.0 Shell: bash v: 5.0.7 running in: terminator inxi: 3.0.34 

SO.. what I did last night was simply searching online again for 'fan control'. And I cam across this page on the AUR:

https://aur.archlinux.org/packages/dell-bios-fan-control-git

So I read the comments and I simply decided to follow it and read it on the creator page on GitHub and my conclusion is this:

Have dell-bios-fan-control-git and i8kutils installed through AUR.

Then run: dell-bios-fan-control 0 in the Terminal to disable SMBIOS control.

Then run: sudo modprobe i8k force=1

And then I did: i8kctl fan 1 1

1 1 = both fans, low speed
1 0 or 0 1 = controlling either the left or right fan respectively*
2 2 = both fans, high speed

*This also works of course with the 2 2 settings

...and finally after almost a year I got to manually turn on my fans on my laptop and it makes me feel more safe about using my laptop and all that I can turn on the fans whenever needed, even though I was I could make a tool that would bind the speeds of the fans which are either 1 1 or 2 2 to the temperature of the CPU so it can be as aggressive as they are in Windows 10 for example.

Still need to figure out as it says on the AUR page how to make it so that it all manually starts whenever I boot it up and it say to do this:

/etc/modprobe.d/i8k.conf ->editor input-> options i8k force=1

In /etc/modules-load.d/i8k.conf ->editor input-> i8k

Then i8kutils and dell-bios-fan-control service starts at boot.

So I will try this later :smile: but for now I am just very happy I got it to work as "rough" as it is or.. taking the "long road" but I don't care, it genuinely cools my laptop in s-tui and it even reads the fan speed now which maxes out at ~7000RPM.

I hope this may be of help to other Dell XPS 13 (9370 or other XPS models) owners! And maybe someone can write or create a tool for this or give advice on maybe how to do this myself or whatever :smile: !

4 Likes

Congratulations! ASUS still doesn't expose manual fan control for its ROG lineup. pwmcontrol can see it, as well as lm-sensors, but the value is always 0. In Windows there's also only fan boost, though, not completely manual anyway. However, I do find manual control to be kinda useless, as the fan itself is smart enough to know when to kick in, so having it automatic is good for me.

1 Like

To summarize all information to get fancontrol and undervolting CPU working here my info:

Here how to get fancontrol working with Dell XPS devices:

QUICK TUTORIAL:

1. AUR INSTALL (via Pamac or Octopi):
i8kutils
dell-bios-fan-control-git

MORE DETAILS:
BIOS overriding fan control
Some newer laptops have BIOS fan control in place which will override the OS level fan control. To test if this the case, run i8kmon with verbose mode in a command line, make sure the CPU is idle, then see if the fan is turned off or turned down accordingly.

If the BIOS fan control is in place, you can try using dell-bios-fan-control-git

Warning: turning off BIOS fan control could result in damage to your hardware. Make sure you have i8kmon properly set up beforehand, or leave the CPU idle while you test this program:
To enable BIOS fan control:
# dell-bios-fan-control 1
To disable BIOS fan control:
# dell-bios-fan-control 0

2. ACTIVATE MANUAL FAN CONTROL
**Open Terminal:
Disable BIOS control:
sudo dell-bios-fan-control 0
Force i8k:
sudo modprobe i8k force=1
Disable (both) fans manually (no temp control and not sticky on reboot):
i8kctl fan 0 0
or
i8kfan 0 0
Check rpm and temps every 2 seconds:
watch sensors
Now fan rpm should appear (value 0).

3. MAKE FANCONTROL WORK AFTER REBOOT AND LOAD FANCONTROL CONFIG:
To automatically enable BIOS fan control on boot via systemd:
systemctl enable dell-bios-fan-control
systemctl start dell-bios-fan-control
systemctl enable i8kmon
systemctl start i8kmon

VARIANT 1 (tried with KDE) ================
sudo nano /etc/modprobe.d/i8k.conf
PASTE IN FILE:

options i8k force=1

sudo nano /etc/modules-load.d/i8k.conf
PASTE IN FILE:

i8k

VARIANT 2 (XFCE) ==================

VARIANT 3 (if 1 or 2 doesn't work) ================

sudo nano /usr/local/sbin/rc.local
PASTE IN FILE:

#!/bin/bash
#
# /usr/local/sbin/rc.local: Local multi-user startup script.
sudo dell-bios-fan-control 0
sudo modprobe i8k force=1
echo 'ik8' | sudo tee -a /etc/modules
systemctl start i8kmon
sensors

4. CHECK AUTOSTART SCRIPT AFTER REBOOT:
Fancontrol status can be checked after reboot with:
systemctl status i8kmon
(no errors and service active)
This means the i8kmon config is loaded and fan rpms are set according CPU temperature.

5. SET CUSTOM FAN CONTROL CONFIG TEMPERATURE VALUES:
sudo nano /etc/i8kmon.conf

THIS IS MY SETTING WITHOUT INSTALLED BATTERY!
Fan is off (-1), starts at 81°C with lowest rpm, gets faster at 86°C and 90°C.
These settings will kill your battery if installed!
So try default or moderate fan control settings if battery is installed.

# Sample i8kmon configuration file (/etc/i8kutils/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  86  -1  86}
set config(1)   {{1 1}  81  90  81  90}
set config(2)   {{2 2}  86  95  86  95}
set config(3)   {{2 2}  90 128  90 128}

# Speed values are set here to avoid i8kmon probe them at every time it starts.
set status(leftspeed)	"0 1250 2000 3000"
set status(rightspeed)	"0 1250 2000 3000"

# end of file

Reboot
WORKS!

UNDERVOLTING CPU ON DELL XPS 13 (9350):

Install intel-undervolt (from AUR e.g. with Pamac)

TERMINAL:
sudo intel-undervolt read
sudo nano /etc/intel-undervolt.conf
sudo intel-undervolt apply
systemctl enable --now intel-undervolt.service

Custom voltage settings:
Lower voltage slowly to NOT get a system which cannot boot anymore! :pray:
Here my stable settings (CPU -100mV, GPU -60mV, GPU Cache -60mV)
intel-undervolt.conf:

# CPU Undervolting
# Usage: undervolt ${index} ${display_name} ${undervolt_value}
# Example: undervolt 2 'CPU Cache' -25.84

undervolt 0 'CPU' -100.00
undervolt 1 'GPU' -60.00
undervolt 2 'CPU Cache' -60.00
undervolt 3 'System Agent' 0
undervolt 4 'Analog I/O' 0

# Power Limits Alteration
# Usage: power ${domain} ${short_power_value} ${long_power_value}
# Power value: ${power}[/${time_window}][:enabled][:disabled]
# Supported domains: package
# Example: power package 45 35
# Example: power package 45/0.002 35/28
# Example: power package 45/0.002:disabled 35/28:enabled

# Critical Temperature Offset Alteration
# Usage: tjoffset ${temperature_offset}
# Example: tjoffset -20

# Daemon Update Interval
# Usage: interval ${interval_in_milliseconds}

interval 5000

DONE

1 Like

Yes yes, I see what you mean! As I said it does work haha and mine are also smart I assume but I simply don't like the values lf when it decides to kick in on Linux where as in Windows they are more agressive and I have never been someone who 'complains' about the fans being noisy or blowing because.. I WANT them to work and cool the system down for longevity :slight_smile:

And with ASUS ROG laptops, such as yours, does it have like dedicated buttons near the keyboard to 'boost' the system so the fans can blow hard like on current MSI Leopard (I only know this because a friend of mine has it) models?

And I don't assume you are able to use the same tools for overclocking or certain settings on Linux like you can on Windows?

Correct me if I am wrong :slight_smile:

Wow, your post is a treasure trove I wish I found first haha!

So my own journey has been step one and the services now do start automatically on my system so I can use i8kctl fans 2 2 from the get go when my system starts :slight_smile:

The very last option with the 'under voltage' it says it was tested on an Inspiron 8000.. that's an old system compared to mine haha so I might not go and try that out.. I probably will though haha

For now the next step is to find out how to get my system go beyond 2400MHz, because I have throttled installed which was a fix once for Lenovo laptops but also seemed to work for Dell laptops, however whenever I stress test my Dell laptop with s-tui it won't go pass the 2400MHz value and I know in theory the system can go to 3900 - 4000MHz, so gonna have a looksee into that.

I just want to know my system inside out and take the risks of finely tuning it and learn along the way, it's just so much fun and I love it! :smile:

Yes, it's there. Not useful on Linux, though. Fortunately at least xev recognizes it, I just don't map it anywhere as of now.

Overclocking? No, this is not a K CPU. But I can undervolt (and perhaps raising Power Limit, but I don't think it's necessary) as usual.

1 Like

before doing all this, had you considered reading the arch wiki for your laptop?
https://wiki.archlinux.org/index.php/Dell_XPS_13_(9370)#Thermal_Modes_/_Fan_profiles

theres also some dell specific modules that sometimes load too early/late.

~ >>> modinfo dell-laptop                                                                    
dell-laptop          dell-smbios          dell-wmi             dell-wmi-led       
dell-rbtn            dell-smm-hwmon       dell-wmi-aio                            
dell_rbu             dell-smo8800         dell-wmi-descriptor                     

dell-smm-hwmon is whats used to read fan speeds, if it doesnt load properly you end up with fan speeds reading as 0 rpm. unloading/loading module fixes that

sudo rmmod dell-smm-hwmon
sudo modprobe dell-smm-hwmon

you can use a simple startup script to issue those 2 commands and not need to disable bios fan control to get normal operation. just thought i would throw it out there, just a suggestion

1 Like

Oh wait yes! I did read those before, I haven't set it to performance to make it go above 2400MHz! Thanks for reminding me haha :smile:

Much appreciated!

i think doing so may nullify your undervolt settings. i keep my laptop in performance mode full time but i also dont care much about battery life and the cooling on this model (inspiron 15-7559) is also pretty decent. seeing as you already have thermal throttling issues you may want to make sure.

1 Like

It was on Performance before full time. Never had any errors or problems with those settings to be honest.
To me it was simply cooling it whenever I wanted it to and just making sure :slight_smile:

However my thermal throttling issues are resolved with throttled in AUR.

But I never set it to performance with the smbios-thermal-ctl --set-thermal-mode=THERMAL_MODE command, so I'll try that tonight with manual cooling and s-tui and then just working my way up :smile: it's fun to do so.

Thanks again! :smile:

2 Likes