Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[REQUEST] Write to EC /manual fan control on Dell XPS laptops

I wonder if it would be possible to implement a write to / dump EC register mechanism into HwInfo? I am actually trying to find a way to deactivate EC fan control and let HwInfo control the fans, for the Dell XPS 15 9570. Sending values to the fans works with HwInfo, but the EC overwrites them immediately again. Found some information on the web, that there is a way to set a register at least for 9550/9560 deactivating the EC fan control

#define DISABLE_BIOS_METHOD2 0x34a3
#define ENABLE_BIOS_METHOD2 0x35a3

I found these two implementations, one SMM Windows driver port, which is based on the Linux i8k driver or something I think? But it fails to load for the 9570

and this one which basically also uses the same registers

Would this be possible ti implement in HwInfo? How far implemented is the EC/SMM driver for Dell Laptops in HwInfo?
Sorry, but allowing users to send any commands using this interface would be very dangerous. There would be a risk of serious damage to systems is sending inappropriate commands.
I'm aware of those functions to disable/enable default fan control, but haven't implemented them yet. Will have to think about that..
Hey Martin

I see the concerns about having a direct access EC write option in GUI, though it could be disabled via two time warning obviously. Anyway, I would give anything to have a Dell EC auto fan control off option build into HwInfo. I am actually really frustrated, because there seems to be a working way under Linux, and not just one, but several tools, and NONE working for Windows, because all these skilled ASM programmers just use Linux, and have no interest in porting their work to Windows.

They all seem to use the same ASM code and same registers, same as the 3year old ported Windows driver:

But the above doesnt work for me on the XPS 9570, it just doesnt load. people claim though it works fine under Linux, if you use the force=1 overwrite under Linux for i8k/dell-smm-hwmon ( )

I would be happy to experiment with something and test, I am really annoyed by the automatic faulty Dell fan control under Windows... and I dont want to switch because of it to Linux.
OK, I see.
There's also another problem with this. There are 2 methods that can be used to disable/enable automatic EC fan control - 0x30a3 or 0x34a3 to disable. But I don't know which of those to use on which systems. So I'm worried if I'd use a wrong method on some system, it could cause troubles.
Update: I have included these functions now (though still not sure which of those methods 1/2 to use) and can give you a test version, here you go:
Please let me know the results.
O M G... it seems to work... youre a hero Heart . When does this test version load/set the registers in this test build? The moment you start the exe, or at what point? As far as I can say, it WORKS... it would be awesome if you could now just make it toggleable, maybe implement an auto detection for Dell laptops (find out which models work, then show the toggle option, but the XPS 9570 (bios 1.6.0) seems to work with this), then give a checkbox on/off for EC control, I think there is a register to write to to enable it again too. did you write both registers method1/2 with this test build?
Disabling of BIOS/EC automatic fan control is automatically done in HWiNFO at each command to set a new fan speed (if it wasn't done before). Automatic BIOS/EC fan control is restored if you click the System Auto button. Adding a separate control for this is not needed and the current implementation allows automatic disabling for users that use fan control automatically after HWiNFO startup.
Currently both methods are used since I don't know which of them works on which model. I assume that if one method works, the other doesn't do anything, so it might be safe.. But this will need to be test more...
So you implemented the two register both (with a Dell laptop detection) already into this test version, the moment you open the fan window or at what part does it write method1/2? I think I read here and there, that one register works for different Dell models than the other.

Could you maybe please also implement a "quick and dirty" or if you have more time (: "smart fan control" mechanism? It doesnt make much sense in its current state, because it toggles the fans off with a hard cut off temperature value, and then it toggles on/off/on/off around the one temperature value.

There are a couple of ways to work around this, with some kind of "smart fan control", maybe just implement a value you can set in the fan window, how long the fans should still spin, after the last value fell under. Example: fans activate at 65°C. Then it goes under 65°C, but then let them still spin for x seconds. Or even better, first activation temperature, then spin until a "turn off" value is reached. Lets say first activation at 70°C (at least x mseconds over it), then spin until a turn off value is reached.

And also an option for some kind of "seconds need to be over one temperature" option. For example, it has to stay at least x mseconds over temperature y until activated (first activation).

A bug: when you click system auto it deletes the values of custom auto (in the current window), which should stay saved obviously (there is some weird toggle bug where it resets somehow). Also clicking the fan icon activates it again it seems, which isnt maybe a good solution to this. 

Another good change would be an AND/OR selection for temp1 temp2 source. Then also add a systray entry to toggle fan (auto/custom) for quick access.

It seems the "system auto" register write also works and EC begins to take control again afterward.
As I said above, disabling of BIOS/EC automatic mode is done at the first set fan speed command.
I will have a look at some hysteresis for spin-down. Since DELL machines allow only a few pre-defined fan levels, a smooth fan control is not possible.
Yes I know it just supports 3 states, no PWM control. The current fan control is a bit problematic, because it cuts off (on/off) the fans with discrete values. This is problematic. Example: First value to turn on fans is 65°C. Temps rise slowly to 65°c. Then fans spin on at 65°c and then spin off a second later already because it falls to 64°C then rises to 65° a second later and then fans go on off on off on off. I gave three separate solutions to this, would be nice to see both and then chose the one you like more:

- delay if fall back under first value, let them spin for x seconds (you can define the seconds)
- specific turn off value which has to be reached, after fans got a no 0RPM value, for example run until 60°C reached again, but 60°C is not a turn on value (this would be most usefule one, maybe put a checkbox to each line if this value i)
- delay in seconds going over one value (the first/lowest in the temperature list), example, if 65°c is the first one, the temperature has to stay x seconds over it to activate the fans

Then also would be nice to have a SysTray entry in the HwInfo icon for fan auto/custom.

Then there is a bug in the fan window, if you click system control, then custom again, it opens an empty setting list (settings get deleted).

Another question about this test build, is it problematic that I now have two kernel drivers loaded?

How do I get rid of them or just use the latest one? Is it bad if it is set up or causes issues, or doesnt that matter, and the driver is just accessed when HwInfo is running?

For the Method1/2 maybe add an toggle option in the boot setting window, if you wish to use Method1/2 or both.

Thank you again so much for this... seriously, you made my day with this implementation. You have no idea how awesome this is, and mostly for a LOT of other Dell Windows laptop users.  Heart I am testing since yesterday and so far the switch between manual and auto EC mode seems to wrok great, on my XPS 9570.
I added a new setting that allows you to specify time required for the fan to remain below threshold to spin-down.
I have also fixed the bug with losing custom auto settings after switching to system auto mode.
Here's the new update:

There are currently no plans for adding a tray option for fan control.

Regarding the old driver, it's a remain from a quite old version that is not active. Try to go into main settings of HWiNFO / Driver Management and from there do an Install/Uninstall, that should delete the old one.
Awesome! The uninstall/install removed the old driver it seems!

Found a bug with the spin-down after, it seems it just resets fan1, fan2 keeps spinning, where manual overwrite works then of course. This already helps a lot, would also be awesome maybe have a spin-down temperature value too next to seconds. And a "tolerance in ms" which has to stay over a value, like a little delay. This would be helpful for short Intel Turbo Boost jumps, where the core temperature jumps for just a brief second to maybe 70°C and then back to 44°C again after 1-2 seconds.
Sorry, I'm not sure if I understand that bug.. Can you describe more precisely?
The XPS 9570 has two fans, Fan1 Fan2. I have set both to get activated in HwInfo at the same time, like this: fan1 custom auto button fan2 custom auto button

I have set a 20 second spin-down.

I let the temp rise to 65°C. Both fans turn on correctly. Temp is now below 65°C. I wait 20 seconds. Now just fan1 turns off, fan2 spins on. Clicking a set manual 0 RPM for fan2 turns it off though.

An AND/OR option would also be nice for temp1/temp2. So it turns on for example if CPU core is >=65°C OR GPU core >= x.
Thanks, I see the bug now. This should fix it:
Awesome! Seems to work now Smile Could you also maybe implement an auto turn on for custom auto when starting HwInfo and also an option to reset / set EC to default, when HwInfo closes, though nor forced, but with a toggle option maybe. This could be useful, for shutting down Windows, and be sure, the EC control is on again. I am not 100% sure if restarting the laptop resets the EC registers, but maybe just a full power cycle.
See here how to automatically start fan control:
Will think about the other option...
Thank you so much!! Youre totally a hero Smile Not sure how hard or time intensive it would be to implement, but an OR conjunction would be awesome for Sensor1+Sensor2. If CPU >= x OR dGPU >= x (that makes the spin-down timer a "bit" more complicated because it has to consider then two values, but not really that much more complicated), that way I could totally get what I want, make the fans also run in games 100%, and stay off otherwise where I want it. Then maybe also a kind of threshold in s/ms for the first entry in the lookup table. If first value non zero RPM is related to 65°C, for example, just activate if sensor value is x seconds at least over it.

Would it be a problem if one of the sensor sources is dGPU temp and the dGPU is deactivated (Optimus switch) while the logic is on? Maybe consider that too, that it is ignored then in the AND/OR logic if used two sensor sources.
Found another bug today, where fan control wasnt working anymore and also spin down didnt work anymore, I dont know so far for sure what is causing it. I have a suspicion, that if you click the X for the fan window, it breaks the custom fan control (deactivates it I guess?), which could be dangerous. This isnt 100% clear to the user actually. There are a few flaws in the fan control window which should be changed:

- clicking X shouldnt break current fan control, I guess it deactivtes it, and if the fan window isnt shown, it is off (should then maybe always turned back to system control), or remove the X button if you want this behavior that if window present=custom on, or give a warning, are you sure you want to disable/closing this window will revert to system control
- minimize all button is confusing, there should be an ok button instead (or no button at all)
- clicking the fan button shouldnt turn on custom mode automatically always
- there should be a status text/light (and also in systray) as an information indicator if fan control is on/off/system/custom, there is no current information right now, if it is on or off
Fan control is available only when the fan control window is active. If you close it, it cannot work anymore.
For that reason, in latest Beta version (6.01-3640), when the user closes fan control, besides deactivating custom fan control it will also automatically activate system auto fan control back.
Perhaps I should display a warning when the users closes fan control and custom fan mode is active.

Forum Jump:

Users browsing this thread: 1 Guest(s)