Updating the bios did not fix my fan behavior.
It reduced performance on the processor permanently, though, and for some takes away the ability to undervolt.
Here is how to manually control your fans and set a custom fan curve, instead
I have a Dell G5 5590 with an i7-9750H and an RTX 2070MQ. I'm running Pop_OS 20.10, which is an ubuntu variant, and uses systemd.
As far as I can tell, updates to the bios (at least after 1.10, can't tell you about before that) were mostly to fix intel processor architecture security flaws. The 'fixes' required handicapping the processor in ways that permanently reduce performance, and downgrading is pretty difficult and risky (blocked by dell, requires generating your own fake bios payload to bypass, and may make fingerprint reader never work again). They also, from my experience going from 1.10 to 1.14 following the above answer and the comment on the answer above and other links, do not change the fan/thermal profile of this laptop.
Here is my temp curve, even at idle at 800mhz, on the latest bios 1.14:

As you can see at the bottom of the image, my temp just swings up and down. At the top of those swings the fan turns on to 'high'/full blast 4700rpm, at the bottom, the fan turns off to 0rpm. Extremely irritating. And identical to what I experienced on bios 1.10.
later update: on this laptop, my problem was using external monitors via the hdmi and miniDP port--doing this causes my temps to go literally 40+ degrees celsius higher, both in linux and windows, seemingly an nvidia driver issue. connecting my external monitors via a usb-c to dual hdmi hub instead allows my computer to sit at 47c with no fans on, at idle after a clean boot.
Dell handicaps the fans and only allows control to specific presets, but they can be accessed to whatever extent possible on your hardware by reading these links:
(update: dell seems to just not open source the fan control, and the reverse engineering work has had limited success; there seem to be more presets available to windows than I am able to access in linux.)
How to control fan speed?
https://www.cyberciti.biz/faq/controlling-dell-fan-speeds-temperature-on-ubuntu-debian-linux/
https://mijorus.medium.com/thermal-tweaks-on-dell-laptops-running-linux-769c8c80022e
https://wiki.archlinux.org/index.php/fan_speed_control#BIOS_overriding_fan_control
https://github.com/TomFreudenberg/dell-bios-fan-control
(Note that /etc/i8kutils/i8kmon.conf moved to /etc/i8kmon.conf in later versions, I think, and is what I see now in my filesystem and in the man page. There is also a provision in the man page to specify a conf file in your home directory.)
Step 1: install and setup
sudo apt install lm-sensors i8kutils -y
sudo modprobe i8k
if that doesn't work, which it did not for me, you may try:
# sudo modprobe i8k force=1
# (which seems to work for me?)
git clone https://github.com/TomFreudenberg/dell-bios-fan-control.git
cd dell-bios-fan-control
make
sudo mv dell-bios-fan-control /usr/bin/dell-bios-fan-control
If you're having problems with i8k not working, you may try this:
sudo -i
echo "options i8k force=1" > /etc/modprobe.d/i8k.conf
echo i8k >> /etc/modules
exit
You may see better results if you restart your computer, as well.
If you're still having problems, you might check the links referred to above and dig around more with modprobe. this link may also help guide you.
Step 2: See if it works
To actually make this go into effect, we're going to need to start the service, and disable the bios control of the fans, which is obviously very dangerous. A processor like this can fry itself beyond repair in 10 seconds of high temp activity, so BE EXTREMELY CAREFUL HERE.
My advice:
- open
psensor
or some other graphical temp application so you can keep an eye on temps, and be ready to act if you see temps rising higher than they should.
- test and make sure you can go back to bios control at a moment's notice by running
dell-bios-fan-control 1
(as per here).
- You can set an alarm on
psensor
to automatically run dell-bios-fan-control 1
when a certain temp is hit to be extra safe.
- if you see temps rising and don't hear the fans kick on when you run that command, be ready to kill the power fast. I've noticed on this laptop that a hard shutdown from holding the power button is extremely slow, so to be safe here, you should update your OS power button settings to 'shut down' instead of 'sleep'. (I think you're not going to want to run
shutdown now
because that won't kill load on the cpu fast enough, but I'm not sure.)
ctrl
+alt
+printscrn
/(sysreq) + b
might be the fastest way to get the kernel to just immediately hard reboot. There may be a better way.
That's probably all overkill, but... if you have an expensive laptop, just be prepared. (Don't be paranoid, though, as there are hardware safety switches that will shut off the laptop to protect itself from overheating.)
Now that you are ready,
sudo systemctl stop i8kmon.service
sudo systemctl status i8kmon.service
ok, we're going to disable the bios control now--fans should go quiet--and then immediately turn on the fans to 1
--we're going to test how many fan settings you actually have available to you and make sure this is working.
Run these commands 1 by 1 and pay attention to your system.
dell-bios-fan-control 0
# fans are now not being controlled by anything; are they quiet?
# how are temps? You can watch for a second if desired.
dell-bios-fan-control 1
# let's turn it back on to make sure our failsafe works. With that settled,
# let's turn it back off
dell-bios-fan-control 0
# and let's manually set the fans on with i8kctl
i8kctl fan 1 1
# did fans turn on? let's see what RPM we're at:
i8kctl
# you can spam this command a few times to get info.
# the 7th and 8th values (will be in the thousands if fan is running, otherwise 0)
# are the left and right fan RPM.
# Now let's try and see if you hear different rpm's at different levels.
sudo i8kctl fan 2 2
# hear a difference? we can check again:
i8kctl
sudo i8kctl fan 3 3
i8kctl
# did they all work? If not, not which ones did and didn't. For my G5 5590, I'm only seeing 0,1,2 work, which are 0rpm, 2200~ rpm, and 4740rpm.
Step 3: Setting Fan "Curve"
Now you'll need to set your fan curve. We do that by editing this file:
sudo nano /etc/i8kmon.conf
Now you're going to have to edit that file according to your computer's heat characteristics. See the man page and documentation as needed. The short version is that the lines in there that say this:
set config(0) {{0 0} -1 55 -1 60}
set config(1) {{1 1} 45 80 45 80}
set config(2) {{2 2} 70 90 70 90}
set config(3) {{3 3} 80 128 80 128}
You'll want to adjust these values according to your laptop's thermal characteristics. My particular machine cannot idle below 85, period, so the fans have to always be on, so my curve is adjusted accordingly. Once I repaste, I'll change it again probably to get a silent idle.
(note that the G5 5590 doesn't support power stage three, only up to powerstage 2--still, if you're going to not include that line, make sure you test it doesn't break anything, i8kutils is sensitive about things like that)
To interpret how to write these lines, they mean this:
# DO NOT COPY PASTE THESE LINES, ADDING COMMENTS AFTER BREAKS THIS CONFIG FILE
set config(0) {{0 0} -1 55 -1 60} # run fans at 0,0; above 55(ac) / 60(batt), move up to config(1)
set config(1) {{1 1} 50 65 55 70} # run fans at 1,1; at 50(ac),55(batt) drop down to config(0); at 65(ac),70(batt) move up to config(2)
set config(2) {{2 2} 60 75 65 80} # etc.
set config(3) {{2 2} 70 128 75 128} # etc.
NOTE: DO NOT ADD COMMENTS ON THE SAME LINES AS THESE COMMANDS, ADD COMMENTS ONLY ON/AFTER NEWLINES. Also, max/min temps set should overlap, preferably by at least 10 degrees or so--see man page if you don't understand why.
# set
# config(configuration-number)
# {
# {speed-of-fan-n1 speed-of-fan-n2}
# drop-down-temp-AC
# step-up-temp-AC
# drop-down-temp-battery
# step-up-temp-battery
# }
#
# https://mijorus.medium.com/thermal-tweaks-on-dell-laptops-running-linux-769c8c80022e
fans at 0,0
and fans at 1,1
corresponds to these lines:
set status(leftspeed) "0 1000 2000 3000"
# 0=0rpm, 1=1000rpm, etc.
set status(rightspeed) "0 1000 2000 3000"
# same for right fan
so 1,1 correponds to 1000rpm left fan,1000rpm right fan
(Note that, again, in the G5 (and I think not even in the precision lines, which is crazy), setting fan RPM manually isn't supported, but I think it is in the XPS and Alienware lines--however, that said, DO NOT OMIT THESE LINES. The program will run, but the fans will never spin up!)
which tell us what you see in the comments here. I presume the Alienware ones allow this feature, and the XPS appears to from what I briefly read--however, Dell artificially handicaps fans on everything that isn't their top-of-the-line premium machine--even their semi-premium Precision and G5 (not sure about G7?) lines don't allow rpm setting. nice one, Dell.
Step 4: Fans As A Service
Now, if you've paid attention to your temps in the past, you can try going into the config file and setting it to whatever levels you want, and turning on the systemd service for i8kmon.
sudo systemctl status i8kmon.service
sudo systemctl enable i8kmon.service
sudo systemctl start i8kmon.service
Now, we'll need to also add a systemd process to make sure that the bios doesn't take over again when we restart. Following this guide, we'll basically do this:
sudo nano /lib/systemd/system/dell-bios-fan-control.service
paste this in there:
[Unit]
Description=Turn off bios control of fans
[Service]
Type=simple
ExecStart=/usr/bin/dell-bios-fan-control 0
[Install]
WantedBy=multi-user.target
then
sudo cp /lib/systemd/system/dell-bios-fan-control.service /etc/systemd/system/dell-bios-fan-control.service
sudo systemctl enable dell-bios-fan-control
sudo systemctl start dell-bios-fan-control
You should be good to go. I'd go ahead and restart the computer, though, and make sure that it works as expected. watching psensor should tell you whether it's following your config values or not.
Let me know if anything here doesn't work, I'm writing this in a really out of order way after having figured it out through trial and error. I'm cleaning it up over time as I solidify my understanding of this.
A definite glaring problem is that, for safety, there should be error handling on the launch of the i8k service that turns bios control back on if it fails to start.
Even that wouldn't be a guarantee; I had commented out the 'fan rpm' lines, because the default file indicates they're unnecessary can be probed, presumably automatically, and that feature isn't support on my model (the G5 5590). The service seems to start fine, but will fail to ever actually activate the fans. As a result, I'd also recommend having another temperature failsafe in another application. If/when I get around to doing this, I'll try to update this guide.
Step 5: Shutdown Behavior / Dual Boot safety
If you're dual booting, you won't have any fans running in any other distro where you haven't added manual fan control in--so, you'd overheat and crash. To change that, you should add a reverse process to hand control back over to the bios on shutdown, like this:
sudo nano /lib/systemd/system/dell-bios-fan-control-reverse.service
[Unit]
Description=Turn fan control back over to bios at shutdown, in case of windows boot, or i8k >
[Service]
Type=oneshot
RemainAfterExit=true
ExecStop=/usr/bin/dell-bios-fan-control 1
[Install]
WantedBy=multi-user.target
then
sudo cp /lib/systemd/system/dell-bios-fan-control-reverse.service /etc/systemd/system/dell-bios-fan-control-reverse.service
sudo systemctl enable dell-bios-fan-control-reverse
sudo systemctl start dell-bios-fan-control-reverse