[ltp] Thinkpad X30, 2.6.21-rc5, and the hdaps module.

Henrique de Moraes Holschuh linux-thinkpad@linux-thinkpad.org
Sun, 8 Apr 2007 23:26:34 -0300


On Sun, 08 Apr 2007, Steve Thompson wrote:
> Another issue which I am interested in getting feedback on is the
> speedstep functions in the kernel.  If the IBM bios is configured for
> maximum power savings, the CPU frequency on battery will be as low as
> 200MHz (maxing out at  700 or so I think) whereas the linux kernel never
> detects the processor as having more than two rates: 1197000 798000, as
> shown in scaling_available_frequencies.  Obviously, this affects programs
> like xine.  The workaround is to set the BIOS so it does not scale the
> frequency back quite so far.  This, however, will tend to reduce battery
> life.
>
> Is there some known reason why the BIOS can set a wider range of CPU
> frequencies than linux, or am I experiencing an artifact of the limited
> experience IBM ACPID developers have with the X30 model?

1. ACPI tables might tell the kernel not to set all those frequencies.

2. Your machine might be blacklisted by the cpufreq module and it reduces
   the capabilities.

3. A bug somewhere is causing the problem.

Anyway, ibm-acpi has nothing to do with it, and you should open a bug report
in bugzilla.kernel.org (but check if there aren't open bugs about these
issues already, before opening a new one).

> Finally, I seem to have found that the X30 may actually have an
> accelerometer similar to the one used in more recent models for hdaps.  I
> *thought* I had read somewhere that it did, but I realise that was
> incorrect.  Nevertheless, I saw that hdaps is only probed after the system
> is checked against a whitelist.  Removing the whitelist check does not
> magically get it working, but subsequent probing indicates that there
> might  actually be a chip there.  

Install tp_smapi and its hdaps patch.  Use *that* one to try to locate an
HDAPS firmware in your X30.  The stuff in Linux mainline is hopeless.

> A quick modification to the hdaps.c module to dump the 30 bytes at 0x1600

Don't do this.

> Now I am no expert, but that sure looks like there's a bunch of registers
> sitting there at the appropriate locations.  The initialization proceedure

Yes, there is.  Go to thinkwiki, get the EC manuals, and learn about it.
Get the tp_smapi source, read it, and work from there.

> At any rate, I'm wondering if the folks here who also have X30s would mind
> checking what their machine shows when those bytes are dumped.  If you

*Don't* *mess* *with* *these* *IO* *ports*.   They are sensitive to reads.

-- 
  "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