Wer-Wolf / i8kutils

Fan control for some Dell laptops
https://launchpad.net/i8kutils
GNU General Public License v3.0
17 stars 0 forks source link

Fans cycling on XPS 15 9550 #2

Open ruhatch opened 1 year ago

ruhatch commented 1 year ago

Hi @Wer-Wolf,

Thank you for creating this fork of i8kutils!

I'm trying to use in on my XPS 15 9550 and I've got everything installed. I want to make sure it was working by using a config that should have the fans running on full power at all times. This doesn't seem to be working though, and instead cycles between high and nothing. I'm guessing that it's because the BIOS is still controlling the fans. I am running 'dell-bios-fan-control 0' before running the service, but I'm not using this line ExecStartPre=/usr/bin/i8kctl mode1 manual, because it didn't work on my system.

The config is:

          set config(0)   {{0 0}  -1  0  -1  0}
          set config(1)   {{0 1}  2  2  2 2}
          set config(2)   {{1 1}  3  3  3  3}
          set config(3)   {{2 2}  4 4 4 4}

Any ideas?

Wer-Wolf commented 1 year ago

What happens if you execute i8kctl fan1 2 manually?

ruhatch commented 1 year ago

It tries to ramp up the fan then drops back down

Wer-Wolf commented 1 year ago

Does dellfan work?

ruhatch commented 1 year ago

It doesn't seem like even the SET_FAN and GET_FAN codes are working on there, because when I run dellfan 2 it just says:

sudo dellfan 2
Setting speed to: 2
Speed is now at: 163

It doesn't seem to affect the current speed and is reporting inaccurately.

Any ideas how I might be able to adjust the codes? I was trying the probecodes() function, but that's only searching for the disable method and relies on the set and get working already!

Wer-Wolf commented 1 year ago

You have to execute dellfan 2 1.

Wer-Wolf commented 1 year ago

Also, could you send me the output of acpidump on your machine?

ruhatch commented 1 year ago

sudo dellfan 2 1 has the same results

Here is the acpidump.

Thank you for the help

Wer-Wolf commented 1 year ago

Ok, it seems dellfan is somehow broken. Does dell-bios-fan-control print any error messages or does it work? Because according to the arch wiki entry, dell-bios-fan-control should enable manual fan control on your machine.

Did you make sure to disable secure boot before running dell-bios-fan-control? Maybe a BIOS update (if available) could help.

ruhatch commented 1 year ago

dell-bios-fan-control doesn't give any errors, so claims to be succeeding, but the results suggest otherwise. I've looked through the code of both and dell-bios-fan-control is basically a simplified version of dellfan anyway, so I don't see how dell-bios-fan-control could work while dellfan doesn't.

Yes, I'm secure booted. I'll try a BIOS update and let you know. In the meantime, do you have an hints on debugging why the BIOS call might not be getting through?

Wer-Wolf commented 1 year ago

Secure boot will prevent both tools from working, try to disable secure boot and test if one of the two works.

ruhatch commented 1 year ago

Sorry, I meant I've disabled secure boot

Wer-Wolf commented 1 year ago

Are you running a 32 bit or a 64 bit operating system? Because both tools will likely not work when compiled as 32 bit programs (if they compile at all).

ruhatch commented 1 year ago

I'm on a 64bit system.

I upgraded the BIOS and reset it to factory and still no luck. Can you think of a simple test to see if any of the BIOS codes in dellfan are working? Are there any known codes that I can test it with? How likely is it that the assembly code for sending the BIOS calls is broken or outdated?

Wer-Wolf commented 1 year ago

Can you send me the output of dmidecode on your machine? I can then give you a modified version of the dell-smm-hwmon driver which would whitelist your machine for disabling BIOS fan control. If the driver itself cannot do this, then nothing else can.

ruhatch commented 1 year ago

Here is the dmidecode

Wer-Wolf commented 1 year ago

Can you build the kernel module inside dell-smm-hwmon.zip with make and load it with sudo insmod dell-smm-hwmon.ko (unload dell-smm-hwmon first)? Are you now able to control the fans after executing i8kctl mode1 manual?

Wer-Wolf commented 1 year ago

Any progress?