[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Fan control on ibook2



Cedric Pradalier wrote:
> Hi,
> 	I've noticed that the fan is started according to a much higher
> temperature when using linux (2.6.3-ben2) w.r.t mac os x. (for instance
> if I reboot on macosx after compiling my kernel, fan is started
> immediately)
> 
> 	Does somebody have a hints of what rules this ? Is there a parameter
> somewhere, that can be changed ? Or does it corresponds to some kernel
> or open firmware constants.

Hi,
I own an iBook2rev2 (PPC 750FX @ 600 MHz made by IBM, Ati Radeon
[without 7500] GPU). The fan is controlled by a little IC called
ADM1030. The IC has two sensores to measure the temperature and it can
also measure the speed of the fan and -of course- it can control the
fan. The datasheet can be found in the net. 

Ben Herrenschmidt wrote a little module 'therm_albooks' for monitoring
the temperature. It can be found in the linux_2.4_benh source tree.
You have to modify the file therm_albooks in one line in order to use
it:

--- /opt/kernels/linux-2.4-benh/drivers/macintosh/therm_albooks.c
Thu May  1 12:41:02 2003
+++ /home/frank/tmp_modul/therm_ibook.c Mon Aug 11 19:44:51 2003
@@ -304,8 +304,7 @@
        struct device_node* np;
	        u32 *prop;
		 
		 -       if (!machine_is_compatible("PowerBook5,1") &&
		 -           !machine_is_compatible("PowerBook6,1"))
		 +       if (!machine_is_compatible("PowerBook4,3"))
		                 return -ENODEV;
				 

If you want to control the fan by our own you must change some
values in the  registers of the ADM1030. Some hints to do so  you can find
in the source and in the datasheet.

I think the fan in my iBook is powered on at a temperature of 60 
Celsius measured by sensor 0 (located[?] in the neigbourhood of the CPU). I
have heard that  sensor 1 is in the neigbourhood of the GPU.

Actual values:

| # tail /var/log/syslog
| kernel: thermostat: status 2 change: 0x00 -> 0x20
| kernel: thermostat: Temp 0 change: 52.750 C (1a6)
| kernel: thermostat: Temp 1 change: 50.875 C (197)
| kernel: thermostat: Temp 0 change: 52.500 C (1a4)
| kernel: thermostat: Temp 1 change: 51.000 C (198)
| kernel: thermostat: Temp 0 change: 52.750 C (1a6)
| kernel: thermostat: Temp 1 change: 50.875 C (197)
| kernel: thermostat: Temp 1 change: 51.000 C (198)

I also have the feeling that my iBook operates at higher temperature
if I using linux (esp. 2.6.4-vanilla or/and opengl-enabled xserver).
A 'hotspot' is the frontmost left part of the bottom part of the iBook. 
There are the hard disk _and_ the GPU. Perhaps the GPU works in a more power 
consuming mode.

Ah one interesting fact: 
I believe I encountered that my iBook produced more heat at one point even it
booted in OS_X. It was after an update of 10.2.n to 10.2.n+1. I think
Quartz Extreme was introduced in this time frame. 
Can someone cofirm this?

> 	Also. Temperature is always shown as uncalibrated in /proc/cpuinfo.
> I've seen that this sentence is hard-coded. Is there a way to have it
> calibrated ? 

The TAU ([?] thermal assist unit) functionality of some PowerPCs is  broken 
or practically useless. But, you can find some descriptions how to calibrate 
the CPU in the net. (PDF by IBM or Motorola)

Frank



Reply to: