From owner-freebsd-ppc@FreeBSD.ORG Fri Dec 3 20:41:18 2010 Return-Path: Delivered-To: freebsd-ppc@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6AFEC106564A; Fri, 3 Dec 2010 20:41:18 +0000 (UTC) (envelope-from paul@gromit.dlib.vt.edu) Received: from lennier.cc.vt.edu (lennier.cc.vt.edu [198.82.162.213]) by mx1.freebsd.org (Postfix) with ESMTP id 1BDEB8FC17; Fri, 3 Dec 2010 20:41:17 +0000 (UTC) Received: from vivi.cc.vt.edu (vivi.cc.vt.edu [198.82.163.43]) by lennier.cc.vt.edu (8.13.8/8.13.8) with ESMTP id oB3KelHx018486; Fri, 3 Dec 2010 15:40:47 -0500 Received: from auth3.smtp.vt.edu (EHLO auth3.smtp.vt.edu) ([198.82.161.152]) by vivi.cc.vt.edu (MOS 4.2.2-FCS FastPath queued) with ESMTP id OMS76481; Fri, 03 Dec 2010 15:40:46 -0500 (EST) Received: from pmather.tower.lib.vt.edu (pmather.tower.lib.vt.edu [128.173.51.28]) (authenticated bits=0) by auth3.smtp.vt.edu (8.13.8/8.13.8) with ESMTP id oB3KekvK013495 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 3 Dec 2010 15:40:46 -0500 Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: Paul Mather In-Reply-To: <4CF7FAFD.2030607@FreeBSD.org> Date: Fri, 3 Dec 2010 15:40:46 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <3853126F-041B-4CA9-A3FC-417CB000E21C@gromit.dlib.vt.edu> References: <5A677521-DE86-4BA9-BA85-8003957551B5@freebsd.org> <4CEBDB9D.2010309@freebsd.org> <15A958D9-5CBE-4830-B72C-CC4DF2192BC0@gromit.dlib.vt.edu> <4CF7FAFD.2030607@FreeBSD.org> To: Andreas Tobler X-Mailer: Apple Mail (2.1082) X-Mirapoint-Received-SPF: 198.82.161.152 auth3.smtp.vt.edu paul@gromit.dlib.vt.edu 5 none X-Mirapoint-IP-Reputation: reputation=neutral-1, source=Fixed, refid=n/a, actions=MAILHURDLE SPF TAG X-Junkmail-Status: score=10/50, host=vivi.cc.vt.edu X-Junkmail-Signature-Raw: score=unknown, refid=str=0001.0A020202.4CF955CF.0060,ss=1,fgs=0, ip=0.0.0.0, so=2010-07-22 22:03:31, dmn=2009-09-10 00:05:08, mode=single engine X-Junkmail-IWF: false Cc: freebsd-ppc@FreeBSD.org, Nathan Whitehorn , yongari@FreeBSD.org Subject: Re: New powerpc64 snapshot X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Dec 2010 20:41:18 -0000 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. >=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: at addr 0x98 on iicbus0 > fcu0: at addr 0x15e on iicbus0 > iicbus0: at addr 0x30 > iicbus0: at addr 0x58 <---- AD7417 > iicbus0: at addr 0xa0 > iicbus0: at addr 0x32 > iicbus0: at addr 0x5a <---- AD7417 > iicbus0: at addr 0xa2 > iicbus0: 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.