The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.

[Guide] How to control fans on Dell Laptops under Windows

Discussion in 'Dell' started by valuxin, May 27, 2017.

?

Does this solution work for you?

  1. Yep :)

    19 vote(s)
    51.4%
  2. Nope T_T

    7 vote(s)
    18.9%
  3. Scared to try :c

    11 vote(s)
    29.7%
  1. Aaron44126

    Aaron44126 Notebook Prophet

    Reputations:
    879
    Messages:
    5,549
    Likes Received:
    2,066
    Trophy Points:
    331
    You might be referring to this work which is different, it mostly mitigates the performance hit taken after applying Intel's microcode fix. It will go live with Windows 10 19H1 (dropping in April, probably).

    https://mspoweruser.com/windows-10-19h1-will-reduce-the-impact-of-spectre-mitigation-to-noise-level/
    https://techcommunity.microsoft.com...riant-2-with-Retpoline-on-Windows/ba-p/295618
     
  2. Aaron44126

    Aaron44126 Notebook Prophet

    Reputations:
    879
    Messages:
    5,549
    Likes Received:
    2,066
    Trophy Points:
    331
    The driver doesn't actually hang around, it just exists to send commands to the EC. When you fire up the app, the driver loads. When you click the "disable control" button, the driver tells the EC to stop controlling the fans. (A one-time command.) Then when you close the app, the driver is unloaded.

    The "command" to tell the EC to let go of the fans seems to stick until the EC is reset, which is why this survives a "warm reboot".

    Note, I have to make sure that the "override" radio option is selected before clicking the "disable control" button or it doesn't seem to work. That's a little confusing. (Oh, and you have to be running elevated / as admin.)

    And yes, it is sort of annoying that there is no confirmation to tell you if the process worked or not. If you are not able to take control of the fans with the sliders afterwards then it probably just doesn't work on your system.

    [Edit]
    If you do want to tell if the driver is "running" then run this command from an elevated command prompt:
    sc query BZHDELLSMMIO

    You should see this output:
    Code:
    SERVICE_NAME: BZHDELLSMMIO
            TYPE               : 1  KERNEL_DRIVER
            STATE              : 4  RUNNING
                                    (STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
            WIN32_EXIT_CODE    : 0  (0x0)
            SERVICE_EXIT_CODE  : 0  (0x0)
            CHECKPOINT         : 0x0
            WAIT_HINT          : 0x0
    Again it only runs while the app is open. I'm not sure how well the app is at detecting errors, it appears to attempt to make sure that the driver started properly; if it is not in the "running" state then it may be an issue with signature checking or whatever.
     
    Last edited: Jan 17, 2019
    Maleko48 and maffle like this.
  3. Aaron44126

    Aaron44126 Notebook Prophet

    Reputations:
    879
    Messages:
    5,549
    Likes Received:
    2,066
    Trophy Points:
    331
    Status —
    Starting to understand the code well enough. To produce a standalone .exe file that does not require Qt DLL's, I have to do a full build of Qt (the GUI toolkit used for the GUI app); he also uses Qt for threading and other stuff in the app so I'm not going to try to strip it out for a command-line version. Qt requires a few hours to build, and I've had to restart it a couple of times while I learn my way around some errors. Bottom line, no console app until I get a full Qt build done and I'm not sure how many attempts it will take.

    Some takeaways from reviewing the code:
    * It is possible to enable EC control of the fans (in addition to disabling it), this functionality is just not exposed in the app. (Still not sure about probing for the current status, I'll have to experiment with it.)
    * There are two different commands listed to disable the fans (he seems to borrow code from a Linux tool that I linked in an earlier post for this); the app only attempts one of them, it is possible that the alternate one will help on some other systems?
     
    Last edited: Jan 17, 2019
    Maleko48 likes this.
  4. Aaron44126

    Aaron44126 Notebook Prophet

    Reputations:
    879
    Messages:
    5,549
    Likes Received:
    2,066
    Trophy Points:
    331
    Not done for the day though. See attached: signed Dell SMM IO driver .sys files.
    I haven't tested them yet in "regular" Windows mode. They work in "disable driver signature checking" mode. (I can't reboot yet to check, the Qt build is running...)

    To attempt: simply replace your existing .sys files next to dell_fan_utility.exe and try to run it (without "disable driver signature checking" or "test signing mode" turned on).

    [Edit]
    It works!

    [Edit 2]
    Teaser... I'll try to finish it up tomorrow.
    [​IMG]
     

    Attached Files:

    Last edited: Jan 17, 2019
    Maleko48 likes this.
  5. MikeR_Va

    MikeR_Va Notebook Enthusiast

    Reputations:
    1
    Messages:
    21
    Likes Received:
    5
    Trophy Points:
    6
    Aaron:

    Congrats. Looks like you're pretty much there (of course if I knew how to do what you're up to, we wouldn't need to have this conversation, so what do I know?). Thanks for the hard work on this, and no real objection to your taking the rest of the night off at almost 11pm!

    Don't want to interrupt you while you're working on this, but when you're done, there are a couple of things I'm curious about. Recording them now lest I forget, but don't bother with these until you're done with the utility (or ever if you don't care to).

    1. Why do all these solutions set the fans to 100%, and if they do that, why don't the fans then spin up to 100%? The post- 'fan utility' behavior prior to Speedfan starting (I have that for a 30 sec delay at logon so that I can click around the fan utility to get control) is no fan, not full fan. So all these solutions seem almost backwards. It's not hard to think 100% would be the safe default, but the fans don't spin. That's the behavior we want in this instance, but the logic escapes me.

    2. Are you familiar at all with the Dell Cmd | Control software? Because, once you get beyond this brilliant little command line, the only thing that might be better than your proposed service would be access to a hidden Dell BIOS setting that makes all of this completely unnecessary. There might be something to look at there before you start on the more involved project with the service.

    Best of luck finishing up the project. If I get time today, I'll dig back into the BIOS/Spectre/Modern Sleep issues. If your solution survives hibernation, I'll turn that back on for long gaps. But I'd still rather S3 than "modern" sleep, which just seems horrid beyond description so far. Lot's of complaining on the web, but Redmond seems determined to keep it. There may be solutions to that issue too, but so far my solution it shutting down -- which actually isn't so bad now that we have wickedly fast SSDs.

    Look forward to your next.

    Mike
     
  6. Aaron44126

    Aaron44126 Notebook Prophet

    Reputations:
    879
    Messages:
    5,549
    Likes Received:
    2,066
    Trophy Points:
    331
    1. The "Dell fan utility" in-code behavior is, after disabling EC fan control, to set "fan 1" to 50% and not make any adjustments to "fan 2" (so it will be at 0%). The console app that I am working on does properly set the fans to 100% after disabling EC fan control (at least that is what happens on my M6700).
    2. I'm not familiar with Dell Cmd|Control, in fact I have very little Dell software installed on my machines. However having spent a couple of days looking at different solutions to this now, the only ones that I am aware of working (Linux i8k module, Linux dellfan tool, and this Windows GUI tool) all use the same mechanism to tell the EC to let go of fan control. It seems to bypass the BIOS and issues the command to the SMM controller directly. I don't plan to investigate Dell Cmd|Control but you are welcome to do it and of course let us know if you find anything interesting.

    I'm shying away from the service idea because I'm thinking it won't really be necessary. This is how I envision a setup working...

    * You have both the command line tool and SpeedFan installed. Create a scheduled task or script that runs at login. This script will fire up SpeedFan, wait some seconds for SpeedFan to initialize, and then fire the command line app and have it tell the EC to let go of fan control. SpeedFan should take over fan control immediately if it is already running.
    * Another scheduled task can be set up to run at logout to return fan control to the EC. (That way the fans are managed while SpeedFan is not running; for example during Windows Update or the full hour+ Windows upgrades which now happen twice per year, or if you want to boot another OS for whatever reason.)
    * Finally, another scheduled task can be set up to fire on a certain event to tell the EC to let go of the fans after resume from hibernate.

    I'll have examples of all of these after I finish getting everything set up on my system. I might make a whole new thread for it.


    Also, I tried this on my Precision 7530 this morning (this is the latest model Precision with 8th-gen CPU) and the SMM IO driver will not even load on this system, so it is not possible to send a command asking the EC to let go of fan control. However, I noticed that I am able to adjust the fan speeds with SpeedFan anyway. Any changes that I make are immediately taken away by the system. (If I set a fan to 100%, it spins up and then it spins right back down.) This doesn't bother me because I don't have a complaint about the fan behavior on this system, it already behaves basically as I would like it to, I was just curious if the same thing would work. (The 7530 also seems to have several more granular fan levels rather than just 3.) Anyway, bottom line, new systems have a different fan management mechanism in place and that might be also why @maffle can't get the GUI tool to work.
     
    Last edited: Jan 18, 2019
    Maleko48 and maffle like this.
  7. Aaron44126

    Aaron44126 Notebook Prophet

    Reputations:
    879
    Messages:
    5,549
    Likes Received:
    2,066
    Trophy Points:
    331
    I'm attaching the command-line app.

    Notes:
    * Must be run elevated / "as administrator", or loading the SMM IO driver will fail (if running with Task Scheduler you must check the box for "Run with highest privileges")
    * 64-bit OS support only
    * Working directory should be the same directory where DellFanCmd.exe and bzh_dell_smm_io_x64.sys are
    * Can be used without "test signing mode" enabled or "disable driver signature enforcement" enabled

    * A Visual C++ 2017 runtime might be required. If this is the case and you don't have it, you'll get some sort of missing DLL message when you try to run the app. Let me know what happens. If you do have a problem, try installing this: https://aka.ms/vs/15/release/vc_redist.x64.exe

    Disclaimer:
    * I've only tested this on a Precision M6700. I'm not responsible if anything bad happens to your system. (Shouldn't be any more dangerous than the "Dell fan utility" GUI app, though.)

    Just run: DellFanCmd [command]
    where [command] is one of:

    ec-disable: disable EC control of the fans (fans are now controlled manually, use SpeedFan)
    ec-enable: enable EC control of the fans (fans are now controlled automatically)
    ec-disable-alt: alternate method to disable EC fan control
    ec-enable-alt: alternate method to enable EC fan control

    I'm not sure what the alternate method does but it might help someone if the regular method doesn't work.

    I will be publishing the source code and additional setup suggestions ... Once I have time to do some writing and testing.

    P.S. If it works well for you, and you want to throw me a few bucks to help cover the cost of purchasing the driver signing certificate, send a PM... :p

    [Edit] Binary removed, see https://github.com/AaronKelley/DellFanCmd/releases
     
    Last edited: Jan 21, 2019
    ja14000, Maleko48 and maffle like this.
  8. maffle

    maffle Notebook Evangelist

    Reputations:
    179
    Messages:
    545
    Likes Received:
    506
    Trophy Points:
    106
    That is what I experienced too, with them spinning up/down immediately. So I guess the driver doesnt even load or not properly on the 9570. That is why I asked, if there was a way to see, if it was loaded correctly. I actually asked the developer of the driver, if there was a chance to modify it making it work for the 9570. And he answered in this "typical arrogant developer tone", moody, cocky, bored... and said if I want it to work, I am "free to modify the driver"... Unfortunatly low level driver or ASM programming is way beyond my skills.
     
  9. Aaron44126

    Aaron44126 Notebook Prophet

    Reputations:
    879
    Messages:
    5,549
    Likes Received:
    2,066
    Trophy Points:
    331
    If you try the command line tool that I posted, it will spit out an error if the driver does not load correctly. (Other than the additional information I don't think that it would bring any value to you, it's not going to work if the GUI app did not.)

    Even if you could get the driver to load I am not hopeful that it would solve the problem; there are other differences in the fan behavior so I suspect that they have more or less completely changed how it works. (I.e. on the Precision M6700, disabling the EC fan control is required before SpeedFan can do *anything* about the fan speed, but on the 8th-gen 7530 SpeedFan is able to make changes that are just overwritten immediately.) So, more than likely the EC command to let go of fan control would not work and someone is going to have to figure out a different way to do it (if it is even possible).
     
    Maleko48 and maffle like this.
  10. maffle

    maffle Notebook Evangelist

    Reputations:
    179
    Messages:
    545
    Likes Received:
    506
    Trophy Points:
    106
    @Aaron44126 I actually know, that under Linux you can easily modify the fan curve and literally alter the fan just how you want it to work, even for the 9570. So it is possible, and the driver already exists in open-source form for Linux. If the driver exists for Linux, it should be possible to port it to Windows too, no? I actually asked about it before on the Linux Dell thermal github, but no one answered me on there back...
     
Loading...

Share This Page