Page 1 of 1

ACPI in Linux on TPs: need explanation

Posted: Thu Oct 30, 2008 3:23 pm
by BigCatAndy
Hello everyone,

can anyone explain me (briefly or in middle-level details) the relation between thinkpad-acpi (former ibm-acpi), cpufreq and other "ACPI-related" modules in Linux (Debian)? Today I tried to walk through the web-pages describing all that stuff and finally I got lost in different definitions, references, etc.

As far as I understand, ACPI is a kind of interface between OS (Linux or Windows) and computer's hardware (CPU, display, motherboard). Using ACPI, I can get the temperature of the devices, speed of the CPU clock, etc. Is this understanding correct? If yes, how to utilize all that information in Linux? What is "thinkpad-acpi" for?

I really would appreciate any hints and information on this topic!

Cheers,
Andrey.

P.S. The background of my question is quite simple: last week I changed from Debian Etch to Lenny, and I had problems with cpufreq module (it could not found my "ondemand" governor) . Today I fixed it - rather occasionally - by installing "cpufrequtils" package from Debian repositories. But I want to know more precise, how all those modules and programs work together, especially on TPs - because TPs have that "thinkpad-acpi" part.

Thanks in advance.

Posted: Thu Oct 30, 2008 5:55 pm
by aaa
Even though ACPI is used to control the cpu, the thinkpad-acpi driver has nothing to do with that (a separate driver, often acpi-cpufreq, does it). thinkpad-acpi mostly focuses on unique-to-thinkpad stuff. So if you wanted to see the extra sensors thinkpads have, you 'd make sure thinkpad-acpi is loaded then you'd use some sensor program to read them (I'm using "sensors-applet").

Since controlling the cpu is mostly the same across all recent laptops, you have a standard system for it. First you have a low-level driver that controls the cpu, either via ACPI with acpi-cpufreq or directly with speedstep-centrino/powernow-k8. Then you have the higher level cpufreq drivers, which provide an interface to the low level drivers and also can change the speed automatically, with different governors (cpufreq_ondemand, cpufreq_performance, etc). Then on top of that you have various optional userspace programs to control the the kernel cpufreq driver, like cpufrequtils or cpufreqd. I think all cpufrequtils did for you was make sure the kernel drivers were getting loaded at startup.

Clarification

Posted: Fri Oct 31, 2008 10:34 am
by BigCatAndy
Hello aaa,
aaa wrote:Even though ACPI is used to control the cpu, the thinkpad-acpi driver has nothing to do with that (a separate driver, often acpi-cpufreq, does it). thinkpad-acpi mostly focuses on unique-to-thinkpad stuff. So if you wanted to see the extra sensors thinkpads have, you 'd make sure thinkpad-acpi is loaded then you'd use some sensor program to read them (I'm using "sensors-applet").

Since controlling the cpu is mostly the same across all recent laptops, you have a standard system for it. First you have a low-level driver that controls the cpu, either via ACPI with acpi-cpufreq or directly with speedstep-centrino/powernow-k8. Then you have the higher level cpufreq drivers, which provide an interface to the low level drivers and also can change the speed automatically, with different governors (cpufreq_ondemand, cpufreq_performance, etc). Then on top of that you have various optional userspace programs to control the the kernel cpufreq driver, like cpufrequtils or cpufreqd. I think all cpufrequtils did for you was make sure the kernel drivers were getting loaded at startup.
thanks a lot. For example, if I want to imitate the behaviour of the "Power Manager" application from Thinkvantage suite of IBM/Lenovo, I have to configure cpufrequtils. Is it correct?

Is it correct, that thinkpad-acpi cannot manage CPU speed alone? It is more complementary than obligatory part on my TP, isn't it?

Thanks,
Andrey

Posted: Fri Oct 31, 2008 9:54 pm
by GomJabbar

Posted: Sat Nov 01, 2008 2:01 pm
by BigCatAndy
Hello GomJabbar,
thanks for these links. I have read them already, but I would like to gain more theoretical background, in order to understand what is written there.

Cheers,
Andrey

Re: Clarification

Posted: Sat Nov 01, 2008 7:06 pm
by aaa
BigCatAndy wrote:thanks a lot. For example, if I want to imitate the behaviour of the "Power Manager" application from Thinkvantage suite of IBM/Lenovo, I have to configure cpufrequtils. Is it correct
That would depend on what you are trying to do... the Thinkvantage power manager covers alot of things. cpufrequtils only covers the cpu, and is just one of the ways to do it (there's also a taskbar applet that does the same thing). And you don't need to change anything if ondemand (I assume that's what it's doing now) is good enough, staying at the lowest speed then jumping to full speed when needed is usually what most people use.