macfanctld does not regulate third fan

Bug #1092970 reported by Patty A. Hardy
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
macfanctld
New
Undecided
Unassigned

Bug Description

The system is an early 2006 iMac 4,1 (core duo) running Lubuntu 12.10. The iMac 4,1 has three fans: one for the optical drive, one for the hard disk drive, and one for the CPU.

I installed macfanctld (0.6-mactel1ubuntu3-quantal1, from the mactel-support PPA at LaunchPad) . Here is my macfanctld.conf:

fan_min: 1000

temp_avg_floor: 45
temp_avg_ceiling: 55

temp_TC0D_floor: 40
temp TC0D_ceiling: 55

temp_TC0P_floor: 40
temp_TC0P_ceiling: 55

temp_TG0D_floor: 50
temp_TG0D_ceiling: 60

temp_TH0P_floor: 35
temp_TH0P_ceiling: 50

temp_TO0P_floor: 35
temp_TO0P_ceiling: 50

exclude: 1 7
log_level: 0

I restarted macfanctld and monitored the sensor temperatures and fan speed using xsensors. The ODD and HDD fans are initially set to 1000 and fluctuate with system load. The CPU fan minimum speed remains at the iMac's default value of 800 and fluctuates upward but there seems clear relationship to the CPU temperatures. Running CPU-intensive benchmarks raises both the CPU temperatures and the speed of the ODD & HDDfans.

Revision history for this message
Patty A. Hardy (hyades) wrote :

Okay, I have read the code a bit and it looks like only two fans are supported.

Revision history for this message
Patty A. Hardy (hyades) wrote :

So I guess my question is, is macfanctld supposed to regulate the CPU fan?

Revision history for this message
deutrino (deutrino) wrote :

IMO macfantld should regulate all fans in a Mac. Can you let us know if you're still using macfantld and if there is still a problem with this?

Revision history for this message
Frantisek Boranek (fboranek) wrote : Re: [Bug 1092970] Re: macfanctld does not regulate third fan

 Yes the problem is still there. Current implementation support only two fans (see control.c). I refactored code to suit my needs. In an attached patch is also hardcoded optimization for my important sensors, so the patch is not ready to apply, but base idea is to find all fans. The best solution should be a possibility to specify sensors for a particular fan and controls fans separately, but my patch is far from that.

Regards,
František Bořánek

 From: gmorehou <email address hidden>
 To: <email address hidden>
 Sent: 17.4.2015 8:49
 Subject: [Bug 1092970] Re: macfanctld does not regulate third fan

IMO macfantld should regulate all fans in a Mac. Can you let us know if
you're still using macfantld and if there is still a problem with this?

--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/1092970

Title:
  macfanctld does not regulate third fan

Status in macfanctld:
  New

Bug description:
  The system is an early 2006 iMac 4,1 (core duo) running Lubuntu 12.10.
  The iMac 4,1 has three fans: one for the optical drive, one for the
  hard disk drive, and one for the CPU.

  I installed macfanctld (0.6-mactel1ubuntu3-quantal1, from the mactel-
  support PPA at LaunchPad) . Here is my macfanctld.conf:

  fan_min: 1000

  temp_avg_floor: 45
  temp_avg_ceiling: 55

  temp_TC0D_floor: 40
  temp TC0D_ceiling: 55

  temp_TC0P_floor: 40
  temp_TC0P_ceiling: 55

  temp_TG0D_floor: 50
  temp_TG0D_ceiling: 60

  temp_TH0P_floor: 35
  temp_TH0P_ceiling: 50

  temp_TO0P_floor: 35
  temp_TO0P_ceiling: 50

  exclude: 1 7
  log_level: 0

  I restarted macfanctld and monitored the sensor temperatures and fan
  speed using xsensors. The ODD and HDD fans are initially set to 1000
  and fluctuate with system load. The CPU fan minimum speed remains at
  the iMac's default value of 800 and fluctuates upward but there seems
  clear relationship to the CPU temperatures. Running CPU-intensive
  benchmarks raises both the CPU temperatures and the speed of the ODD &
  HDDfans.

To manage notifications about this bug go to:
https://bugs.launchpad.net/macfanctld/+bug/1092970/+subscriptions

Revision history for this message
deutrino (deutrino) wrote :

Hi Frantisek,

Thanks for your patch. I think we're going to get the project together on Github or Gitlab and we'll try to integrate your patch if possible. I'll update this bug when I have further info.

Revision history for this message
deutrino (deutrino) wrote :

Hi Frantisek,

What codebase is your patch against? I'm having trouble applying it to both the official debian package and the basis for the existing Ubuntu package which I pulled from master on https://github.com/detly/macfanctld

Thanks much
-Gordon M.

Revision history for this message
deutrino (deutrino) wrote :
Revision history for this message
Frantisek Boranek (fboranek) wrote :

I pulled revision here: http://bazaar.launchpad.net/~fboranek/macfanctld/macfanctld/revision/5

It will be simple to track that change.

Revision history for this message
Frantisek Boranek (fboranek) wrote :

The patch also contains one significant bugfix. When iMac is not used and all temperature dropped down, some sensors become unreliable and it can happen that reported temperature is -1 C, which is really high number if read as a signed integer from a file. Then your fans are running at their maximum speed so it seems your mac is flying to the moon.

These sensors report temperature 0 C and are useless for counting average temperature. So bugfix is that any sensors which report value lower than 5 are excluded.

Revision history for this message
deutrino (deutrino) wrote :

Frantisek: Interesting - my iMac6,1 will only run at maximum fan speed.

I've also noticed sensors that report -127.

If your patch fixes that, it will fix the whole reason I ended up taking an interest in this project in the first place! ;)

Revision history for this message
Naël (nathanael-naeri) wrote :

Frantisek:
> any sensors which report value lower than 5 are excluded

I think it's a good idea, but why not also exclude sensors that report aberrantly high values? Critical temperatures for CPU/GPU are around 105 C aren't they? At which point either damage or emergency shutdown happens. And there are reports of aberrant temperature readings of about 128 C, probably because of mishandled signed/unsigned variables. So why not exclude sensors above, say, 120 C?

Support of more than two fans is a feature that has been asked several times by early-2006 to mid-2011 iMac users. All the more so that the two fans detected by macfanctld are the HDD and the ODD fans, while the third, undetected fan is the CPU one. How inconvenient!

As far as I know there are two patched versions of macfanctld that have this feature: yours (up to 10 fans) and Anton Lundin's (3 fans), both mentioned in this thread. I've reviewed both, they seem solid to me. Perhaps 10 fans is overkill, since the situation is as follow, unless I'm mistaken:

------------------------------------------------------------------
Macbook 1 fan for all 13" models before 2015
             0 fan for new 13" model (Retina 2015)
Macbook Air 1 fan for all 11" and 13" models
------------------------------------------------------------------
Macbook Pro 1 fan for most 13" models
             2 fans for all 15" and 17" models
------------------------------------------------------------------
iMac 3 fans on CPU, HDD, ODD
               2006-01/2012-10 models w/ 3.5 HDD and ODD
             1 fan on CPU
               2012-11/today models w/ 2.5 HDD or SSD and no ODD
Mac Mini 1 fan for all models
------------------------------------------------------------------
Mac Pro 1 large fan for the cylindrical model
------------------------------------------------------------------

The trend is clearly towards less fans, for less noise and less bulk. This is made possible by the constant advances in CPU/GPU power efficiency and the switch from HDD to SSD.

Also:
> The best solution should be a possibility to specify sensors
> for a particular fan and controls fans separately

Yes, for 3-fan iMac models that would make sense, since the three fans effectively cool three different pieces of hardware which are distant enough to be at different temperatures. For all other models that would be a useless feature.

Since pre-10/2012 iMacs are discontinued now and assumedly on their way out, perhaps it is not worth working on what seems to be a rather large feature. Driving the three fans at same speed could be enough.

On the other hand one can argue that it's only three years ago and Apple hardware is expensive and can last long, so I don't know.

Revision history for this message
Ricardo (rikrdo89) wrote :

can someone please post some instruction on how to download and installed the patched version that can control the 3 fans and/or the one with 10-fan support?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.