Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Dec 2010 15:40:46 -0500
From:      Paul Mather <paul@gromit.dlib.vt.edu>
To:        Andreas Tobler <andreast@FreeBSD.org>
Cc:        freebsd-ppc@FreeBSD.org, Nathan Whitehorn <nwhitehorn@FreeBSD.org>, yongari@FreeBSD.org
Subject:   Re: New powerpc64 snapshot
Message-ID:  <3853126F-041B-4CA9-A3FC-417CB000E21C@gromit.dlib.vt.edu>
In-Reply-To: <4CF7FAFD.2030607@FreeBSD.org>
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> <4CF7FAFD.2030607@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Dec 2, 2010, at 3:01 PM, Andreas Tobler wrote:

> Hi!
>=20
> I'll take the opportunity to comment on the fans situation.
>=20
> On 02.12.10 20:29, Paul Mather wrote:
>=20
>>>> 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. :-)
>>>=20
>>> 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.
>>=20
>> 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?
>=20
> 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=3D<minrpm - maxrpm>.
>=20
>> 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.
>=20
> 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.

Yes, I am using an Xserve G5.


>> 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:
>>=20
>> # Try and keep the fans from racing */2	*	*	*	=
*	root	/sbin/sysctl
>> dev.fcu.0.fans>  /dev/null 2>&1
>>=20
>>=20
>> 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:
>>=20
>> dev.max6690.0.sensor.sys_ctrlr_ambient.temp: 35.6C
>> dev.max6690.0.sensor.sys_ctrlr_internal.temp: 49.2C
>>=20
>> But, like I said, it seems like a bizarre solution.
>=20
> 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.
>=20
> 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
>=20
> The other addresses I need to check.
>=20
> Could you provide me with a 'devinfo -v' from both iichb's (0|1)


Hopefully, this is the info you requested (if not, I can e-mail the =
whole devinfo -v output):

    iichb0 pnpinfo name=3Di2c compat=3Dkeywest-i2c
      iicbus0
        unknown pnpinfo name=3Di2c-hwclock compat=3Dpulsar-legacy-slewing =
at addr=3D0xd4
        max66900 pnpinfo name=3Dtemp-monitor compat=3Dmax6690 at =
addr=3D0x98
        fcu0 pnpinfo name=3Dfan compat=3Dfcu at addr=3D0x15e
        unknown pnpinfo name=3Di2c-cpu-voltage compat=3Dpca9556 at =
addr=3D0x30
        unknown pnpinfo name=3Dsupply-monitor compat=3Dad7417 at =
addr=3D0x58
        unknown pnpinfo name=3Dcpuid compat=3D24256 at addr=3D0xa0
        unknown pnpinfo name=3Di2c-cpu-voltage compat=3Dpca9556 at =
addr=3D0x32
        unknown pnpinfo name=3Dsupply-monitor compat=3Dad7417 at =
addr=3D0x5a
        unknown pnpinfo name=3Dcpuid compat=3D24256 at addr=3D0xa2
        unknown pnpinfo name=3Dcereal at addr=3D0x1c0

            iichb1 pnpinfo name=3Di2c compat=3Dk2-i2c
              iicbus1
                unknown pnpinfo name=3Dlm87cimt compat=3Dlm87cimt at =
addr=3D0x5a
                unknown pnpinfo name=3Dlm87cimt compat=3Dlm87cimt at =
addr=3D0x5c
                unknown pnpinfo name=3Dtemp-monitor compat=3Dlm75 at =
addr=3D0x90
                unknown pnpinfo name=3Dpower-supply-monitor =
compat=3Dpic16c72a at addr=3D0x94
                unknown pnpinfo name=3Dcereal at addr=3D0x1c0


> 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.
>=20
> 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.
>=20
> [bohrium:~] andreast% cat fan_set.sh
> #!/bin/sh
> /sbin/sysctl dev.fcu.0.fans.cpu_a_intake.rpm=3D1500 > /dev/null
> /sbin/sysctl dev.fcu.0.fans.cpu_b_intake.rpm=3D1500 > /dev/null
> /sbin/sysctl dev.fcu.0.fans.cpu_a_exhaust.rpm=3D1500 > /dev/null
> /sbin/sysctl dev.fcu.0.fans.cpu_b_exhaust.rpm=3D1500 > /dev/null
> /sbin/sysctl dev.fcu.0.fans.drive_bay.rpm=3D1500 > /dev/null
> /sbin/sysctl dev.fcu.0.fans.slot.rpm=3D2500 > /dev/null
> /sbin/sysctl dev.fcu.0.fans.backside.rpm=3D2000 > /dev/null
>=20
> Thanks,
> Andreas
>=20


My thanks to you (and others) for the explanation.

On my system, setting a *.rpm sysctl to a value does not always have =
direct correlation with the value subsequently reported.  This is =
particularly true of dev.fcu.0.fans.sys_ctrlr_fan.rpm and =
dev.fcu.0.fans.pci_fan.maxrpm.  For example, if I set sys_ctrlr_fan RPM =
to 6000, it will race up immediately to ~13000--14000 RPM.  To get it to =
maintain a reported ~6000 RPM I need to set it to ~1100--1200 RPM with =
the sysctl.

Cheers,

Paul.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3853126F-041B-4CA9-A3FC-417CB000E21C>