5

I am trying to control the fan speed manually using the i8kctl package for dell laptops.

System - Ubuntu 16.04, 4.17.19-041719-generic Dell 7567 Inspiron

I followed the instructions in https://askubuntu.com/a/398635 answer, succesfully disabling the BIOS fan control.

However, when I do

ik8ctl fan 2 2

The output is -1 -1

I think this means that the fan speed setting was not successful.

ik8ctl fan returns 0 0 indicating that no fans are on, as the BIOS fan control has been disabled.

I have no issues turning BIOS control on, but I need the fan speed at max at times, which the BIOS is not doing due to some weird reasons.

Why is am8ctl not able to set the fan speeds?

UPDATE: Running as root

sudo ik8ctl fan 2 2

returns 0 0, rather than the earlier -1 -1. Still doesn't quite work as expected.

UPDATE2 Looking at this bug report solution (https://bugs.launchpad.net/i8kutils/+bug/1620580), I force loaded the modules

sudo rmmod dell-smm-hwmon
$ sudo modprobe dell-smm-hwmon restricted=0

The fan control works now for a limited time (1 second). Looks like the bias still takes control after for some reason.

  • 1
    I can't help you at the moment. I'm on a Vostro 5481 w. Ubuntu 19.10 and I have the same issue. I want to control my fan speeds but did not succeed yet. Whatever you find, let me / us know. Thanks!

    BTW: I verified that I actually CAN control the fan by using while true; do sudo ./i8kctl fan 0 1; done; - BIOS just grabs control every second

    – Marc Dix Apr 22 '20 at 18:50
  • I also tried with https://github.com/TomFreudenberg/dell-bios-fan-control and https://github.com/clopez/dellfan but no luck. :( – Marc Dix Apr 22 '20 at 19:28

2 Answers2

7

I found a solution for my Vostro 5481. It might work for you (and others) as well.

Required

git clone https://github.com/TomFreudenberg/dell-bios-fan-control.git
cd dell-bios-fan-control
make
sudo ./dell-bios-fan-control 0

If you get an error like this

ioperm:: Operation not permitted 
ioperm:: Operation not permitted [1] 
4701 segmentation fault

you need to go to your BIOS/UEFI and disable SECURE BOOT. Then run the command again. Output should now be BIOS CONTROL DISABLED.

Quick testing
You can now go and check solutions for controlling the fan that suite your needs. If you want to quickly test, you can use i8kutils:

git clone https://github.com/vitorafsr/i8kutils
cd i8kutils
make
sudo ./i8kctl fan 2 2

Your fan should now run at the highest possible settings without the BIOS/UEFI interfering.

Controlling the fan in day to day business
Now that your BIOS/UEFI is no longer controlling the fan, you have to take care of it on your own. I'd suggest https://linux.die.net/man/8/fancontrol for this. It can easily be configured using pwmonfig (which ships with it) and adds itself as a system service.

Big THANKS
Shoutout to Tom Freudenberg for creating dell-bios-fan-control and for pointing me to disabling SECURE_BOOT when I got the Operation not permitted error.

https://github.com/TomFreudenberg
https://askubuntu.com/users/293845/tom-freudenberg.

Marc Dix
  • 171
  • Thanks, disabling BIOS control helped me. Otherwise, it was slowing down the fan speed when the CPU temp was 70°. Does it also mean that BIOS will not spin the fan before the OS is loaded? – karser Jan 05 '22 at 12:57
  • I'm using i8kmon installed with apt-get. Is there any advantage of using fancontrol and pwmonfig over i8kmon? – karser Jan 05 '22 at 12:59
0

in my case dell-bios-fan-control didn't work initially, after struggling for a bit I realized for some reason sudo ./dell-bios-fan-control 0 works after running make manually, as opposed to sudo dell-bios-fan-control 0 (due to ioperm). not sure why (maybe in between I disabled idrac, that could have been the cause as well) but anyway, then I was able to set the fan speed permanently to 0, which caused my system to crash, in the end I did below which worked (Dell R415 poweredge, so pretty old server)

sudo apt-get install ipmitool   # install
sudo ipmitool sdr type fan      # check fan speed
sudo ipmitool raw 0x30 0x30 0x01 0x00       # disable automatic control
sudo ipmitool raw 0x30 0x30 0x02 0xff 0x00  # set fan speed to 0x00
ozgeneral
  • 165
  • 1
  • 7