[ltp] Tracking down a EC firmware bug (fan reading)

Henrique de Moraes Holschuh linux-thinkpad@linux-thinkpad.org
Mon, 2 Oct 2006 20:56:06 -0300


I am trying to see what I could clean up in the ibm-acpi fan control patches
to make them easier to be accepted upstream.

One of the issues the driver needs to cather for is that some ThinkPads have
a stupid bug in the EC firmware that reports false status when the machine
is booted up, up until the first write access to the fan control register or
a EC sleep cycle.

It would be very helpful if we could know the real range of ThinkPads
affected by this firmware bug, so I am starting a pool:  is your ThinkPad
affected by the fan status bug?

Which models are likely to be affected:
  T-series: T23 and later (T43 26xx know affected)
  A-series: A31 and later
  R-series: R50e and later
  X-series: X32 and later
  Z-series: all

If you own such a Thinkpad, please consider doing one of the tests below and
replying to me or to this thread with the following information:

	ThinkPad model (e.g. T43 2687)
	EC firmware version (output of "dmidecode | grep "Embedded
	Controller" as root)
	Whether it has the fan status bug or not.

How to detect the fan status bug:

	You need a kernel with ibm-acpi.  Stock ibm-acpi will do just fine.
	Make sure you don't have any fan control scripts or anything else
	that might be writing to the fan control register!   This is *very*
	important, as once anything writes to the fan control register, the
	bug becomes impossible to detect.
	
	Please load ibm-acpi with the experimental=1 parameter for this
	test.

	Power *up* the thinkpad (cold boot), a reboot or resume from RAM or
	disk won't do.  MAKE SURE THE AC ADAPTER IS PLUGGED.


	TEST PROCEDURE 1 (REQUIRES SUSPEND-TO-RAM):

	do a "cat /proc/acpi/ibm/fan > /var/tmp/fan-status"

	Then sleep to RAM and resume.

	do a "cat /proc/acpi/ibm/fan > /var/tmp/fan-status2 ; diff
	/var/tmp/fan-status*".  If diff reports any difference other than
	RPM values, your ThinkPad has the fan status bug.


	ALTERNATE TEST PROCEDURE 2 (no suspend-to-RAM):

	If you *know* for sure that your ThinkPad powers up in automatic
	fan control (i.e. it varies by itself the fan speed when it gets
	hotter, etc) -- AFAIK all ThinkPads do this, but... -- then you
	don't need to sleep to RAM.

	Regular ibm-acpi (no advanced fan control patch):
	Just check if "cat /proc/acpi/ibm/fan" reports that it's disabled.
	As the fan control is in fact enabled, it is obvious that your
	ThinkPad has the fan status bug if ibm-acpi is reporting that the
	fan is disabled.

	ibm-acpi with fan-control patches:
	If your ibm-acpi is patched for fan control, check whether "cat
	/proc/acpi/ibm/fan" reports that the fan is enabled *and* in auto
	mode.  If it reports anything different, then you have the bug.

	A T43 2687 will report it is enabled in level 7 (when it is in fact
	enabled in level "auto"), for example.

Thanks in advance for any replies.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh