New powerpc64 snapshot
Paul Mather
paul at gromit.dlib.vt.edu
Fri Dec 3 20:41:18 UTC 2010
On Dec 2, 2010, at 3:01 PM, Andreas Tobler wrote:
> 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.
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:
>>
>> # 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)
Hopefully, this is the info you requested (if not, I can e-mail the whole devinfo -v output):
iichb0 pnpinfo name=i2c compat=keywest-i2c
iicbus0
unknown pnpinfo name=i2c-hwclock compat=pulsar-legacy-slewing at addr=0xd4
max66900 pnpinfo name=temp-monitor compat=max6690 at addr=0x98
fcu0 pnpinfo name=fan compat=fcu at addr=0x15e
unknown pnpinfo name=i2c-cpu-voltage compat=pca9556 at addr=0x30
unknown pnpinfo name=supply-monitor compat=ad7417 at addr=0x58
unknown pnpinfo name=cpuid compat=24256 at addr=0xa0
unknown pnpinfo name=i2c-cpu-voltage compat=pca9556 at addr=0x32
unknown pnpinfo name=supply-monitor compat=ad7417 at addr=0x5a
unknown pnpinfo name=cpuid compat=24256 at addr=0xa2
unknown pnpinfo name=cereal at addr=0x1c0
iichb1 pnpinfo name=i2c compat=k2-i2c
iicbus1
unknown pnpinfo name=lm87cimt compat=lm87cimt at addr=0x5a
unknown pnpinfo name=lm87cimt compat=lm87cimt at addr=0x5c
unknown pnpinfo name=temp-monitor compat=lm75 at addr=0x90
unknown pnpinfo name=power-supply-monitor compat=pic16c72a at addr=0x94
unknown pnpinfo name=cereal at addr=0x1c0
> 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
>
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.
More information about the freebsd-ppc
mailing list