From owner-freebsd-ppc@freebsd.org Thu Jan 28 22:49:16 2016 Return-Path: Delivered-To: freebsd-ppc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CE82BA71B77 for ; Thu, 28 Jan 2016 22:49:16 +0000 (UTC) (envelope-from xavier.hilaire@gmail.com) Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com [IPv6:2a00:1450:400c:c09::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 78D061F45 for ; Thu, 28 Jan 2016 22:49:16 +0000 (UTC) (envelope-from xavier.hilaire@gmail.com) Received: by mail-wm0-x230.google.com with SMTP id p63so45553177wmp.1 for ; Thu, 28 Jan 2016 14:49:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=to:from:subject:message-id:date:user-agent:mime-version :content-type:content-transfer-encoding; bh=AinLaTPfBWrRS4r5/W6B2qo8T2HA88cSlU1E+YeKcCA=; b=JwuVj9kgnZRnOOPPgWpnPFi7OYxTXWMZTcyEwl2cs95PKidklBhEKtbYg/NWyYWkN5 f+kVm3oUznQ/FPDBHUveDAFU9u+gTf9hoq7TwXCYgkqE37tyk1o5ByFHdSmlD1Goj2+B RuK1INjGIr1FbNttoIVk4vtixjKQckPzjNQ6iBlh4h4D/d19K8HVFDuNqrDFMxOi+Yj6 ksPwAdZoAwwNpAPA3ykZPeJNMEWrF6SFlesdlMMkblCVvLE0YPdm6kcN/uAtDHdVfoLY LTSC4G79fpjPF+EgM4YzizGOga65CPPGDAk4oAGMWp9/uLbiCsMWUFayBqMtZd0mrQ0Q 3ZCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-type:content-transfer-encoding; bh=AinLaTPfBWrRS4r5/W6B2qo8T2HA88cSlU1E+YeKcCA=; b=PXhhozdr97d0J9/7RK/+licnbJwK/eo/WL4RNeS4Ajk0pMBwRy0atRrJ1xk6x2+R1d 5uc5szKKmYYzcI6AigQOhDSxWER0QTramCxYO8KbWjiY5HlwYDXLYxdadQTuv3plGi7m 4dap5kCPNi17IKL24qvHsQMjZI0pmdzhoAQ8SxqwTsqlmsVJZl9cTF+Pcyrl3XF9CI9M WSN+Ps+6wdisowV5VoWXVWmDuaxKWWIGltFKIizymKKlyUNzcoHv5M3f23/AcDt7ypTs 4MfqPwbKnpzA8kvp5GGIlpCXIJQDy14PZF6btT+kH6EXKnJxI83VVPsAtP7R34q/1WM1 tSnw== X-Gm-Message-State: AG10YOSWTRWDQnEg9+F5LlZaUsq/fd/W33dLvMyxRrdNdWEkwbQItEuxdcO947friDICbQ== X-Received: by 10.28.146.145 with SMTP id u139mr5347775wmd.81.1454021354931; Thu, 28 Jan 2016 14:49:14 -0800 (PST) Received: from [192.168.1.15] (AAubervilliers-651-1-325-10.w83-200.abo.wanadoo.fr. [83.200.92.10]) by smtp.gmail.com with ESMTPSA id 73sm4839073wmm.7.2016.01.28.14.49.13 for (version=TLSv1/SSLv3 cipher=OTHER); Thu, 28 Jan 2016 14:49:14 -0800 (PST) To: freebsd-ppc@freebsd.org From: Xavier HILAIRE Subject: On-die temperatures not reported on a Powermac dual G5 Message-ID: <56AA9AE7.6030402@gmail.com> Date: Thu, 28 Jan 2016 23:49:11 +0100 User-Agent: Mozilla/5.0 (X11; Linux ppc64; rv:38.0) Gecko/20100101 Icedove/38.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2016 22:49:16 -0000 Hi, I recently got an old Powermac dual G5 on which I installed both FreeBSD 10.2 and Linux (Debian, jessie). After booting FreeBSD I noticed the fans were running at an unusual low speed given the CPU-intensive work I was doing (recompile some ports + X11 drivers). A sysctl -a | grep temp showed the following: > net.inet6.ip6.use_tempaddr: 0 > net.inet6.ip6.temppltime: 86400 > net.inet6.ip6.tempvltime: 604800 > net.inet6.ip6.prefer_tempaddr: 0 > hw.usb.template: 0 > dev.ad7417.1.sensor.cpu_b_ad7417_amb.temp: 31.0C > dev.ad7417.0.sensor.cpu_a_ad7417_amb.temp: 33.2C > dev.ds1631.0.sensor.mlb_inlet_amb.temp: 22.2C > dev.ds1631.0.%pnpinfo: name=temp-monitor compat=ds1631 > dev.max6690.0.sensor.u3_heatsink.temp: 63.0C > dev.max6690.0.sensor.backside.temp: 35.3C > dev.max6690.0.%pnpinfo: name=temp-monitor compat=max6690 > dev.ds1775.0.sensor.drive_bay.temp: 21.0C > dev.ds1775.0.%pnpinfo: name=temp-monitor compat=ds1775 > x The only two available temperatures related to the CPUs seem to be those reported by the AD7417 supply monitor's sensors, and there is *no* temperature reported from the on-die sensors at all. When rebooting Linux, the kernel complained about CPU0's temperature higher than the critical value, and shut down the system almost immediately. Now, (well, after a few hours cooling, ideed!) here is copy of what I get on Debian after cd'ing to /sys/devices/platform/windfarm.0 : > xavier@pomme:/sys/devices/platform/windfarm.0$ for f in $(find . -type f); do >> echo -n "$f -> "; cat $f >> done > ./backside-temp -> 66.000 > ./backside-fan -> 19 % > ./cpu-amb-temp-0 -> 38.250 > ./cpu-amb-temp-1 -> 35.250 > ./power/control -> auto > ./power/async -> disabled > ./power/runtime_enabled -> disabled > ./power/runtime_active_kids -> 0 > ./power/runtime_active_time -> 0 > ./power/autosuspend_delay_ms -> cat: ./power/autosuspend_delay_ms: Erreur d'entrée/sortie > ./power/runtime_status -> unsupported > ./power/runtime_usage -> 0 > ./power/runtime_suspended_time -> 0 > ./cpu-current-0 -> 35.522 > ./cpu-current-1 -> 33.447 > ./cpu-pump-0 -> 1250 RPM > ./cpu-pump-1 -> 1250 RPM > ./cpu-front-fan-0 -> 660 RPM > ./cpu-front-fan-1 -> 660 RPM > ./modalias -> platform:windfarm > ./cpu-rear-fan-0 -> 681 RPM > ./cpu-rear-fan-1 -> 681 RPM > ./cpu-12v-current-0 -> 5.004 > ./cpu-12v-current-1 -> 4.577 > ./cpu-voltage-0 -> 1.374 > ./cpu-voltage-1 -> 1.364 > ./hd-temp -> 24.000 > ./cpufreq-clamp -> 0 > ./drive-bay-fan -> 300 RPM > ./uevent -> DRIVER=windfarm > MODALIAS=platform:windfarm > ./cpu-diode-temp-0 -> 70.987 > ./cpu-diode-temp-1 -> 60.784 > ./slots-fan -> 39 % The cpu-diode-temp-* lines just do not have their equivalent from sysctl on FreeBSD. I took a look at the powermac_thermal.{c,h} files in the source tree, and my understanding is that the fans are not managed properly because the on-die temperatures are just not reported, thus accounted for at all in the fan management loop (indeed, the cpu-amb-* temperatures can remain quite stable, while the cpu-diode-temp can increase substantially) Am I right? This is weird, because a "sysctl -a | grep smu" does not report anything, while the kernel *does* include the smu driver, and temperature sensors are normally attached to this device AFAIK. I would *love* using FreeBSD again (rather than Linux, for compatibility reasons). But my code is CPU intensive and relies a lot on Altivec, I wouldn't want to fire my everything... The machine is an M9032LL/A according to Apple's specs: https://support.apple.com/kb/sp96?locale=en_US Any help will be greatly appreciated. Thanks, Xavier