# Where are the ACPI userland programs?

## clacour

I'm trying to get suspend functionality working on my new laptop (Compaq Presario 2135us), and I'm not getting too far.

I'm used to using apm (on Dell laptops), but nothing I do seems to get apm in the kernel. I've tried compiling it with and without ACPI turned on, and every time I enter the command "apm" to see the status, it comes back and says "No apm support in kernel". I can cat /proc/config and it says APM is enabled, but nothing works.

In the course of experimenting with this, I've had ACPI turned on several times, and it does seem to be working, but the only package I can find is acpid, which does not have any userland programs for displaying/setting things.

Looking at the ACPI project page, there seems to be a program called "acpi" which does exactly that, but it's not in the acpid package, nor can I find anything which sounds like it might have it.

Does anybody know where the other half of ACPI is?  (Or how to get the kernel to notice that it DOES have APM compiled in...?)

Thanks,

 Charles Lacour

----------

## neilhwatson

Possibly acpid?

----------

## neilhwatson

While we are on the subject of acpi.  How does one use this to minimize power usage of a PC?

----------

## clacour

No, acpid is the one program that is in the acpid package. (Amazing how they do that, isn't it?)

Acpid is the daemon that monitors all the stuff in the kernel and provides that info to the outside world.

The ACPI home page specifically mentions a program called "acpi" which is the human interface. There's no Gentoo package called "acpi", though, nor anything else that just jumps out at me as being likely.

I found a couple of monitor/displayprograms for X, but they don't allow you to set anything. (And so far, for me, they haven't worked, either. They always report the system on AC, regardless of the truth.)

As for your question, I'm not sure it will at all, yet. The ACPI specification has six levels, from S0 (on full blast) to S5 (completely off). "Suspend" (the functionality I care about most at the moment) is S3, I believe, and I'm not sure if they have that working or not.

By setting individual components to lower levels (s1, s2) you can save power, and of course suspending the machine saves a LOT of power. From what I've read, though, ACPI is still a work in progress, and you may not be able to do all this neat stuff just yet.

I started to say I might just give up and go back to APM, but then I remembered the kernel is very confused about whether it has APM support compiled in. Gnarf.

----------

## CrankyPenguin

What do you want to set?  

Most of the parameters can be controlled by echoing text to the nodes in the /proc/acpi directory.  Most of the traffic that I have seen on the ACPI list suggests that this is how people do it in practice.

Other than ACPID, I know of WMACPI and  WMPOWER and Autospeedstep.  Both WMPower and Autospeedstep attempt to do processor throttling in order to conserve power although it isn't always successful.  It dpends upon what processor you are running and what you want to do with it.  If that is what you are after you might also try cpufreqd  this one depends upon the cpufreq patch.

-- MOD EDIT -- made links phpBB-compliant, Bloody B.

----------

## neilhwatson

I would be interested in:

1.  Turning off pci cards.

2.  Turn off monitor/agp card (it's an Nvidia so perhaps that won't work).

3.  Throttle CPUs (Athlon-MP x 2)

4.  Spin down hard drives.

----------

## piquadrat

For SpeedStep, you could use the cpufreq kernel patch (http://www.brodo.de/cpufreq_old/) in connection with cpudyn (http://mnm.uib.es/~gallir/cpudyn/), which adjusts the cpu frequency dynamically.

Don't know about AMD support, though...  :Sad: 

----------

## clacour

One piece that DOES work, even with the bare-bones ACPI, is throttling (stepping the CPU speed down). (Caveat: this statement applies to my Compaq 2135us. Your mileage may vary.)

cat /proc/acpi/CPU0/throttling and you should see T0 thru T7, with the level that is currently in use flagged. Doing something like "echo 4 > /proc/acpi/CPU0/throttling" would step the CPU down to 50%.

In the tests I've done, it didn't make that huge a difference in battery life. I suspect it's stepping down the CPU, but not all the rest of the system, so most things are still drawing power at their full rate.

Nice to know that at least some of the ACPI stuff works, though.

Hopefully, 2.6 will have a great deal more -- I've heard that's one of the areas that got worked on a lot.

----------

## Panick007

I remember when I got the ACPI on my Presario 1700T laptop working I had to fiddle with a lot of config files to make it work right (and it still wasn't totally working). I got it to "see" the lid button, react to a press of the power button, shutdown properly on a halt command and work the CPU fan (which was controlled entirely by ACPI, I had the cpu overheat once because of that). I always assumed that the CPU throttled itself automatically.

----------

