Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Dec 2010 21:01:01 +0100
From:      Andreas Tobler <andreast@FreeBSD.org>
To:        Paul Mather <paul@gromit.dlib.vt.edu>
Cc:        freebsd-ppc@FreeBSD.org, Nathan Whitehorn <nwhitehorn@FreeBSD.org>, yongari@FreeBSD.org
Subject:   Re: New powerpc64 snapshot
Message-ID:  <4CF7FAFD.2030607@FreeBSD.org>
In-Reply-To: <15A958D9-5CBE-4830-B72C-CC4DF2192BC0@gromit.dlib.vt.edu>
References:  <5A677521-DE86-4BA9-BA85-8003957551B5@freebsd.org>	<C31BDA76-ECE9-4012-86C4-24B30ECC8162@gromit.dlib.vt.edu>	<4CEBDB9D.2010309@freebsd.org> <15A958D9-5CBE-4830-B72C-CC4DF2192BC0@gromit.dlib.vt.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi!

I'll take the opportunity to comment on the fans situation.

On 02.12.10 20:29, Paul Mather wrote:

>>> 3) The system is LOUD!  It sounds like the fans are running high
>>> pretty much all the time---running much higher than Mac OS X
>>> 10.5 runs them.  I notice a "fcu" fan-related device during boot.
>>> Is there any way to force the fans to run at a lower speed?  I'm
>>> going to go deaf at this rate. :-)
>>
>> Andreas Tobler has some in-flight thermal monitoring code he posted
>> to the list a while ago, and one thermal monitor chip is still not
>> in the tree. Even without the patches, you can turn down the fans
>> by hand with sysctls on dev.fcu.
>
> The fan situation is bizarre.  I couldn't find a man page for device
> fcu so I looked at the sysctls.  There are a bunch of
> dev.fcu.0.fans.*.{minrpm,maxrpm,rpm} sysctls associated with cpu_a,
> cpu_b, sys_ctrlr_fan and pci_fan.  I initially figured that lowering
> dev.fcu.0.fans.*.maxrpm from the 14000 shown would limit the noise.
> However, that sysctl is read-only, and trying to set it in
> /boot/loader.conf appeared to have no effect: the values stayed
> resolutely at 14000.  Is there some other way to set this, or is it
> hard-coded?

First, there is no man page yet.
Second, the minrpm and the maxrpm are the edge values, these are fix. 
You can't change them. The only parameter you can influence is the 
dev.fcu.0.fans.*.rpm=<minrpm - maxrpm>.

> I could set a value for dev.fcu.0.fans.*.rpm though it wasn't clear
> what the precise correlation was between the value set and the
> resultant fan RPM.  It did have some effect.  In any case, the value
> didn't stay at the set value, and the fans eventually began racing
> again.  Actually, when I say "the fans" it seemed only to be
> sys_ctrlr_fan and pci_fan.  The various CPU fans appeared to hover
> around ~6000 rpm according to the sysctls.

I have to admit, the machine I wrote this driver for was a PowerMac7,2 
and your machine is an Xserve, right? They share some fan properties but 
not all. So I guess the sys_ctrlr_fan and the pci_fan are not supported 
yet. Should not be a big deal to add support for them.

> The really bizarre thing, though, is that when the fans begin racing
> and the noise is loud, simply executing "sysctl dev.fcu.0.fans" is
> enough to calm them down to a more manageable 5600--6400 RPM!  So, as
> a temporary workaround (to preserve my hearing whilst working on the
> system:) I've added this to /etc/crontab:
>
> # Try and keep the fans from racing */2	*	*	*	*	root	/sbin/sysctl
> dev.fcu.0.fans>  /dev/null 2>&1
>
>
> Does anyone have any information as to the correct way of wrangling
> the fan RPM?  Using the bizarre crontab entry above keeps the noise
> at a reasonable level and the temperature at this fairly steady
> value:
>
> dev.max6690.0.sensor.sys_ctrlr_ambient.temp: 35.6C
> dev.max6690.0.sensor.sys_ctrlr_internal.temp: 49.2C
>
> But, like I said, it seems like a bizarre solution.

For now it is the 'correct' solution. The idea is to have a user land 
application which controls the fan speed with the information from the 
temp sensors. As Nathan already pointed out, there is at least one 
driver missing in the repo. And I see in your verbose log that there 
must be some more sensors missing. The one I have local is the AD7417 
and the one I expect to be missing on your system is the LM75 or so.

max66900: <Temp-Monitor MAX6690> at addr 0x98 on iicbus0
fcu0: <Apple Fan Control Unit> at addr 0x15e on iicbus0
iicbus0: <unknown card> at addr 0x30
iicbus0: <unknown card> at addr 0x58 <---- AD7417
iicbus0: <unknown card> at addr 0xa0
iicbus0: <unknown card> at addr 0x32
iicbus0: <unknown card> at addr 0x5a <---- AD7417
iicbus0: <unknown card> at addr 0xa2
iicbus0: <unknown card> at addr 0x1c0

The other addresses I need to check.

Could you provide me with a 'devinfo -v' from both iichb's (0|1)

On my PowerMac I have the same crontab entry as you have above. It is 
necessary to 'tickle' the HW that it knows the current setting is still 
valid. In case your machine freezes, the tickling will not happen and 
the HW can speed up the fans to make sure no HW damage will happen.

I have a little shell scripts which sets the fan speed for compilation 
jobs. Means, if I heavily use the machine I drill up the speed to make 
sure the temperature will stay at a 'normal' level.

[bohrium:~] andreast% cat fan_set.sh
#!/bin/sh
/sbin/sysctl dev.fcu.0.fans.cpu_a_intake.rpm=1500 > /dev/null
/sbin/sysctl dev.fcu.0.fans.cpu_b_intake.rpm=1500 > /dev/null
/sbin/sysctl dev.fcu.0.fans.cpu_a_exhaust.rpm=1500 > /dev/null
/sbin/sysctl dev.fcu.0.fans.cpu_b_exhaust.rpm=1500 > /dev/null
/sbin/sysctl dev.fcu.0.fans.drive_bay.rpm=1500 > /dev/null
/sbin/sysctl dev.fcu.0.fans.slot.rpm=2500 > /dev/null
/sbin/sysctl dev.fcu.0.fans.backside.rpm=2000 > /dev/null

Thanks,
Andreas



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CF7FAFD.2030607>