Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Denis Ahrens

macrumors newbie
Oct 10, 2014
27
10
Fan Control v2.0b6 64bit

Hi,

I updated the Fan Control a little because I'm a big fan of it myself.

changes:

1. 64bit
2. Refactored some deprecated code.
3. Added Ambient Temperature
4. Updated the project to use the modern stuff (LLVM)

Someone else needs to put it in the installer packager though

Denis

PS: did build it for yosemite, but should work with older OSX versions.
 

Attachments

  • FanControl64bit_2.0b6.zip
    91.1 KB · Views: 571

handheldgames

macrumors 68000
Apr 4, 2009
1,943
1,170
Pacific NW, USA
I've set up a public repository on Github with the initial v2 release from Concorde Rules to open up collaboration on the project:

https://github.com/thomaslfessler/osxFanControl

It would be great to get your project update committed to the public repo.

Thx,
Thomas


*** A BIG thanks to Concorde Rules for opening up the source.





Hi,

I updated the Fan Control a little because I'm a big fan of it myself.

changes:

1. 64bit
2. Refactored some deprecated code.
3. Added Ambient Temperature
4. Updated the project to use the modern stuff (LLVM)

Someone else needs to put it in the installer packager though

Denis

PS: did build it for yosemite, but should work with older OSX versions.
 

s-hatland

macrumors regular
Feb 4, 2014
150
98
thought i'd try out the new version. as far as installing, where does the fan control daemon file go?
 

Denis Ahrens

macrumors newbie
Oct 10, 2014
27
10
Hi

We need to make a bigger step here. The old way FanControl started itself with the help of /Library/StartupItems will no longer work in Yosemite. So I changed the way doing it like it was supposed to be since MacOSX 10.3 (launchd).

In the archive you will find a script called install.sh. This script will copy the binary to /usr/local/libexec and a plist to /Library/LaunchDaemons.

With these files in place launchd will start the FanControlDaemon on every restart. It will even restart it if it crashes. The plist will make sure that only MacPro4,1 and MacPro5,1 will start this Daemon.

Since the normal user is not allowed to write to these places you need to start the script with sudo like this "sudo ./install.sh" if you are inside the directory.

Denis

PS: make sure there is nothing evil inside the script or binary. you should not simply start anything from strangers with sudo!
 

Attachments

  • FanControlDaemon2.0b7.zip
    116.9 KB · Views: 790
Last edited:

h9826790

macrumors P6
Apr 3, 2014
16,656
8,587
Hong Kong
This new version works very well.

And I found that the CPU fan speed is still base on the CPU temperature, but the intake / exhaust fan speed is now base on the heatsink temperature.

Anyway, is there anyone can make another version that both fan speed base on the heatsink temperature? I prefer this is because it will allow me to run the CPU at a little bit higher temperature but little bit lower fan speed (and quieter).
 

texem

macrumors member
Aug 18, 2010
68
7
Thanks for the update ! Works on 10.10 as older version didn't.

I use that nice tool for presetting minimum fan speeds to SMC and during runtime I use "Macs Fan Control".

:)
 

h9826790

macrumors P6
Apr 3, 2014
16,656
8,587
Hong Kong
I updated the Fan Control a little because I'm a big fan of it myself.

changes:

1. 64bit
2. Refactored some deprecated code.
3. Added Ambient Temperature
4. Updated the project to use the modern stuff (LLVM)

Denis, million thanks for this update and allow me to use your source code. I can now tailor made the fan profile to exactly what I want. Make my Mac Pro now even quieter than stock fan setting (rely on the booster more in order to allow for reducing the noisy intake fan RPM), but also few degrees cooler than stock under max loading (78C vs 85C) :D

New Max Loading.jpg

Just in case anyone interested in it. This is the V2.0b8.

View attachment FanControl64bit_V2.0b8.zip

changes:

1. The minimum fan speed is now for the Exhaust fan, and the Intake fan is always 100RPM more than Exhaust fan to avoid possible beat frequency.

2. Introduced "Delta Northbridge" to allow the booster auto spin up also base on Northbridge temperature (Lower Threshold + Delta Northbridge"). e.g. In my setting, the booster will spin up either CPU core reach 68C or Northbridge reach 78C (68+10).

3. Intake Fan speed limited to 1100, Exhaust Fan speed limited to 1000, and Booster speed limited to 2000 to reduce noise.

4. Slider scale was modified.

5. Fans spin up 3 times faster than V2.0b7 to compensate for the relatively low target RPM and possible high Lower Threshold.

P.S. This build is not intended to replace the V2.0b7, but basically another version for those who prefer the CPU run just few degrees cooler and less noise.

Here is the installer for simple installation, please only use it if you can't install the software by the terminal method.
 
Last edited:

Ronchande

macrumors member
Jan 7, 2009
31
0
Hi. I am always getting completely weird numbers which make no sense (negative temperatures or 4-5 digit rpm numbers). What have I done wrong?

I have a Mac Pro Quad 4.1, flashed to 5.1...

Thanks, Ron
 

h9826790

macrumors P6
Apr 3, 2014
16,656
8,587
Hong Kong
Install procedure:

1) Open terminal

2) Type "cd " (with a space)

3) Drag the folder that contain "install.sh" into terminal

4) Press enter in terminal

5) Type "sudo ./install.sh"

6) Press enter again

7) Enter password if required (there will be no display for the password, which is normal)

8) Now double click the "fancontrol.prefpane"

Finished.
 
Last edited:

Ronchande

macrumors member
Jan 7, 2009
31
0
Works, thanks so much!! Finally the humming noise disappeared :) :)

Just a final question: The PCIe and PSU fans are not affected by this software, right? They are still (automatically) controlled by the OS?

Ron
 
Last edited:

h9826790

macrumors P6
Apr 3, 2014
16,656
8,587
Hong Kong
Just a final question: The PCIe and PSU fans are not affected by this software, right? They are still (automatically) controlled by the OS?

Correct, PCIe and PSU fan is fully automatically controlled by the system.

In fact, my understanding is that the system can still control the Booster and Intake / Exhaust fan if required (e.g. approaching overheat).

This software basically change the fan speed by modifying the "minimum fan speed". The system can still control the fan by setting a new "target fan speed" and make the fan spin faster if required. So, no matter what's your setting in this FanControl software, the system protection still there.
 

Marhowl

macrumors member
Apr 12, 2013
58
25
Prague
Installed the 2.0b7 after few failed attempts, but then used h9826790 guide above how to do it.

Would there be any point upgrading to the 2.0b8? I'd prefer it to run even quiter
 

h9826790

macrumors P6
Apr 3, 2014
16,656
8,587
Hong Kong
Installed the 2.0b7 after few failed attempts, but then used h9826790 guide above how to do it.

Would there be any point upgrading to the 2.0b8? I'd prefer it to run even quiter

It's up to you. You can try the 2.0b8, run the stress test and see if you like it or not.

If no, then re-install the 2.0b7 again with exactly the same method.

V2.0b7 is definitely more powerful in cooling, but V2.0b8 is more focus on reducing noise with only reasonable amount of cooling.
 

Marhowl

macrumors member
Apr 12, 2013
58
25
Prague
It's up to you. You can try the 2.0b8, run the stress test and see if you like it or not.

If no, then re-install the 2.0b7 again with exactly the same method.

V2.0b7 is definitely more powerful in cooling, but V2.0b8 is more focus on reducing noise with only reasonable amount of cooling.

Thanks!

So can I just run the installer? I tried that before installing the 2.0b7 using the terminal method and I got weird values just like Ronchande, so I have uninstalled.

So, how would I go about installing the 2.0b8 propely?

I don't stress my Mac Pro hardly at all. But I'm little obsessive about noise in general. I really like when things keep their mouth shut, especially in my car hahah. I can go mad over little clicking noises

Anyway, I'm now using 1% of the cpu and my PCI fan is at 800 (And as far as I'm aware I can do nothing about that, except perhaps disconnecting my idle GT 120 because it can get to 1300 for no reason at all), Intake + Exhaust at 570 and Boosters at 1060. Any chance I can go even lower than that?

Thanks!
 

h9826790

macrumors P6
Apr 3, 2014
16,656
8,587
Hong Kong
So, how would I go about installing the 2.0b8 propely?

Anyway, I'm now using 1% of the cpu and my PCI fan is at 800 (And as far as I'm aware I can do nothing about that, except perhaps disconnecting my idle GT 120 because it can get to 1300 for no reason at all), Intake + Exhaust at 570 and Boosters at 1060. Any chance I can go even lower than that?

If you don't mind, you may try the installer first, and let me know the result. There may be some permission problem in that installer of 2.0b7 (the updated version is here now View attachment FanControl V2.0b7.zip ). And the installer for 2.0b8 also tested, should work as expected.

Anyway, if that doesn't work, please download this one

View attachment 528328

and then use the terminal method to install it. You can simply install the new one to cover the old version (no matter upgrade or downgrade). The terminal method should always work.

PCIe fan 800RPM is the lower limit, can't change it.

2.0b7 and 2.0b8 allow you to lower the Exhaust to 300, Intake to 400 (300 for 2.0b7), and booster to 600. The system won't accept anything lower than that.

But you have to play around the setting to find out the optimum value for your machine. In general, increase the value in Lower Threshold will help to reduce noise as well (avoid the fan spin up too early).

And for V2.0b8, I personally recommend that set the Upper Threshold at or below 64C (Exhaust) and 80C (Booster) to make sure you have the proper protection.
 
Last edited:

maximini

macrumors member
Sep 11, 2011
47
1
Not trying to hijack this thread but looking for advice.

I know this is targeting Mac Pro but I tried it on my 2011 Mac Mini i5 running Yosemite and it does not work. I removed the prefpane and deleted /Library/StartupItems/FanControlDaemon. I hope that's all is needed for proper uninstall.

The last version of Fan Control (1.2) ran just fine in Mavericks. I wonder how hard it would be to modify it to run in Yosemite. I don't know if I can do it myself as I am not an OSX developer, don't even know if Apple's free Xcode is all I need?

I miss Fan Control working in Yosemite. smcFanControl has to be constantly adjusted as temperature changes: not cool.

Any pointer to what needs to be changed in the regular version (or even this one for Mac Pro) to make it work in Yosemite?
 

maximini

macrumors member
Sep 11, 2011
47
1
Replying to my own post. I found Macs Fan Control from crystalidea.com works on the mini in Yosemite, and is to me better than fan control as it shows temperature and fan speed in the menu bar. It also runs up the fan speed less than Fan Control would have with appropriate settings.

Sharing in case it works on Mac Pro too!?
 

h9826790

macrumors P6
Apr 3, 2014
16,656
8,587
Hong Kong
I know this is targeting Mac Pro but I tried it on my 2011 Mac Mini i5 running Yosemite and it does not work. I removed the prefpane and deleted /Library/StartupItems/FanControlDaemon. I hope that's all is needed for proper uninstall.

The reason why it only works for the cMP is because in the software it define the SCM key as follow.

/***** Temperature key values *****/

#define SMC_KEY_AMBIENT_TEMP "TA0P" // Ambient Temperature

#define SMC_KEY_CPU_A_TEMP "TCAD" //CPU A Temperature
#define SMC_KEY_CPU_A_HS_TEMP "TCAH" //CPU A Heatsink Temperature

#define SMC_KEY_CPU_B_TEMP "TCBD" //CPU B Temperature
#define SMC_KEY_CPU_B_HS_TEMP "TCBH" //CPU B Heatsink Temperature

#define SMC_KEY_Northbridge_TEMP "TN0D" //Northbridge Temperature
#define SMC_KEY_Northbridge_HS_TEMP "TN0H" //Northbridge Heatsink Temperature

/***** Intake Fan key values *****/
#define SMC_KEY_INTAKE_RPM_MIN "F3Mn"
#define SMC_KEY_INTAKE_RPM_CUR "F3Ac"

/***** CPU Fan key values *****/
#define SMC_KEY_CPU_A_RPM_MIN "F4Mn"
#define SMC_KEY_CPU_A_RPM_CUR "F4Ac"

/***** CPU Fan key values *****/
#define SMC_KEY_CPU_B_RPM_MIN "F5Mn"
#define SMC_KEY_CPU_B_RPM_CUR "F5Ac"

/***** Exhaust Fan key values *****/
#define SMC_KEY_EXHAUST_RPM_MIN "F2Mn"
#define SMC_KEY_EXHAUST_RPM_CUR "F2Ac"

The Software will control Fan 2 to Fan 5 accordingly. Fan 0 in cMP is the PCIe fan, Fan 1 is the PSU's fan. And it's not controller by this software. If you want to make it work in your mini, Xcode is all you need. I never learn how to use it, but just open the source code, read it back and forth a few times, and adjust the code to what I want. Thanks for the developer, he make the source code very easy to understand (with proper comment etc.).

So, even though another Mac has the same temperature sensor SMC key to let the software correctly read the CPU temperature via SMC key TCAD. Most likely it doesn't has 6 fans and the Fan SMC key won't match. e.g. if there are only 2 fans in the Mac mini Fan 0 and Fan 1, then they will never controlled by this software.

Macs Fan Control works on the Mac Pro too, both softwares allow users to modify the fan speed, but the working mechanism is different. FanControl will constantly adjust the fan speed according to the setting and the CPU / Heatsink temperature. Macs Fan Control can give you indications on the menu bar, but AFAIK it can only increase the fan speed to certain value by a single step (e.g. set RPM to 2000 if CPU temperature reach 70C), no continue adjustment available (e.g. 1000RPM when CPU reach 50C, and 2000RPM when CPU reach 70C, etc).
 
Last edited:

maximini

macrumors member
Sep 11, 2011
47
1
The reason why it only works for the cMP is because in the software it define the SCM key as follow.

/***** Temperature key values *****/

#define SMC_KEY_AMBIENT_TEMP "TA0P" // Ambient Temperature

#define SMC_KEY_CPU_A_TEMP "TCAD" //CPU A Temperature
#define SMC_KEY_CPU_A_HS_TEMP "TCAH" //CPU A Heatsink Temperature

#define SMC_KEY_CPU_B_TEMP "TCBD" //CPU B Temperature
#define SMC_KEY_CPU_B_HS_TEMP "TCBH" //CPU B Heatsink Temperature

#define SMC_KEY_Northbridge_TEMP "TN0D" //Northbridge Temperature
#define SMC_KEY_Northbridge_HS_TEMP "TN0H" //Northbridge Heatsink Temperature

/***** Intake Fan key values *****/
#define SMC_KEY_INTAKE_RPM_MIN "F3Mn"
#define SMC_KEY_INTAKE_RPM_CUR "F3Ac"

/***** CPU Fan key values *****/
#define SMC_KEY_CPU_A_RPM_MIN "F4Mn"
#define SMC_KEY_CPU_A_RPM_CUR "F4Ac"

/***** CPU Fan key values *****/
#define SMC_KEY_CPU_B_RPM_MIN "F5Mn"
#define SMC_KEY_CPU_B_RPM_CUR "F5Ac"

/***** Exhaust Fan key values *****/
#define SMC_KEY_EXHAUST_RPM_MIN "F2Mn"
#define SMC_KEY_EXHAUST_RPM_CUR "F2Ac"

The Software will control Fan 2 to Fan 5 accordingly. Fan 0 in cMP is the PCIe fan, Fan 1 is the PSU's fan. And it's not controller by this software. If you want to make it work in your mini, Xcode is all you need. I never learn how to use it, but just open the source code, read it back and forth a few times, and adjust the code to what I want. Thanks for the developer, he make the source code very easy to understand (with proper comment etc.).

So, even though another Mac has the same temperature sensor SMC key to let the software correctly read the CPU temperature via SMC key TCAD. Most likely it doesn't has 6 fans and the Fan SMC key won't match. e.g. if there are only 2 fans in the Mac mini Fan 0 and Fan 1, then they will never controlled by this software.

Macs Fan Control works on the Mac Pro too, both softwares allow users to modify the fan speed, but the working mechanism is different. FanControl will constantly adjust the fan speed according to the setting and the CPU / Heatsink temperature. Macs Fan Control can give you indications on the menu bar, but AFAIK it can only increase the fan speed to certain value by a single step (e.g. set RPM to 2000 if CPU temperature reach 70C), no continue adjustment available (e.g. 1000RPM when CPU reach 50C, and 2000RPM when CPU reach 70C, etc).

I replied to your post in the Mini thread I created ("Yosemite broke fan control"). Which code should I modify? Is it the one at https://github.com/thomaslfessler/osxFanControl, or somewhere else. Really noob with Xcode and all this so would definitely appreciate your modifications for the Mini based on my responses in the other thread, especially if you can provide the modified code (you could PM it to me if you want).

I see how more progressive Fan Control is as it can indeed adjust the speed vs Macs Fan Control that does a one time adjustment so it would definitely be nice to have Fan Control work on the Mini too.

Perhaps we should continue this discussion in the other thread to avoid derailing the present one as it focuses on Mac Pro.

Thank you!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.