LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   ACPI use (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/acpi-use-64793/)

rpg 06-10-2003 12:10 PM

ACPI use
 
Can anyone give me either information about using ACPI, or a pointer to some information?

I have a Gateway 450X and am running Mandrake 9.1, which offers ACPI in its kernel. As far as I can tell, ACPI is running fine. I installed kapci, and can browse around the contents of /proc/acpi and see interesting stuff.

Unfortunately, I can't figure out how one changes any of the acpi stuff. For example, I'd like to change the temperature at which the fan turns on, because the laptop gets burning hot. The current cutoff is 66 degrees. I'd also like to be able to put the laptop in standby and hibernation mode.

I've read the acpi howto, but while it has a world of information about how to download, compile, and start acpi (all of which Mandrake has kindly handled for me), I don't see anything on how to make ACPI do something useful for me.

I'd appreciate any suggestions!

Brain Drop 06-15-2003 01:39 AM

i am also trying to find this out but to little avail. as far as i can tell many of the things like temp and what not are automatic except for some cpu things which you can specify by writing to the appropriate acpi file, i am trying to find out how to write a script to do this on mine but then again on some peoples it changes on its own to. im not sure what /cpu/performance file does as its not supported on mine but it may be usefull to you in changing power usage.
cpu/power file changes something about latency in cpu and i read someone that said at c3 they had considerable batt life extension. however on mine it seems to just return to whatever state it wants if i write to it.

/cpu/throttling changes something else about the cpu and this im trying to autonate on mine.

the files im refering to are /proc/acpi/procesor/cpu0/whatever

you can see current state:
cat /proc/acpi/procesor/cpu0/whatever

you can change state:
echo * > /proc/acpi/procesor/cpu0/whatever

where * is a number like 4

so echo 4 > /proc/acpi/procesor/cpu0/throttling

would set the throttling to T4 or 40% whatever that means.

standby depends i guess on how your laptop supports it, on mine it doesnt work.
cat /proc/acpi/sleep (i think thats the name) will give you supported states like s0 s1 s2, these are different sleep states try writing the different numbers back to this file and see what happens. if it works you can assign it to a keystroke or something?

hibernate: will work if you do a search for swsusp (software suspend) and compile it in your kernel. at cant tell you much more about it cause i havent gotten around to putting it in yet.

thats about the limit of what i know. as you figure stuff out it'd be cool if you post it here so i can learn more about it to.

oh and then there are the events which acpid does something with like the default example is one for the power button to shut down the comp when it is pressed.
you can define thesse i know (man acpid) but other than the power button and the lid button i dont think i get a lot of other events on mine.

haichow 07-13-2004 01:07 PM

Hey,

I am running MDK 10 and am running into same issues : being not able to put my laptop in standby moce and hiberanate mode.
Did you get any solution to your problem?
I did cat on /proc/acpi/sleep and it showed me
S0 S1 S4 S5

thanks
-haichow

rpg 07-13-2004 04:08 PM

Nope. I never got any answers about this. I figured I would wait until I brought up Mandrake 10 on my laptop before trying again.

AFAICT, the Mobility Radeon chip in the gets into a very bad state if you go into standby while X is running. To me, having to shut down X before standby or suspend would make suspend and standby useless, so I stopped trying to figure this out.

Sorry...

gaviidae 07-15-2004 01:23 AM

Hello,
Tho I'm a total computer n00b, I have Mandrake 10 on a Gateway M305 and M10 so far is the only distro I've used where the Power Management DID work. For the first time, my fan will go off every few minutes. I don't seem to have overheating problems. Is there somewhere anyone wants me to look up and see what mine says? Be specific, I'm still learning UNIX commands.
I can check this thread only a few times a week, can't get online with my linuxbox (heh heh, have to check from work).
--gaviidae

rpg 07-15-2004 11:52 AM

I don't mean to discourage you, gaviidae, but I'm not actually sure how you could help. Problems with ACPI and APM are very particular to the hardware involved, since laptops, especially, are very far from presenting a standard API (or at least behaving well with one!). So experiences with one model of laptop don't really help people with different ones.

On the other hand, it is good to know that the Mandrake 10 ACPI is working for someone.

Cheers

DAChristen29 08-12-2004 01:33 PM

sorry for this late post, but ive had ACPI kinda working on slackware 9.1 (2.4 kernel). the fan would turn on and off automatically. i still havent, on any distro, found out how to check my battery status.

Entropius 08-13-2004 04:38 PM

I have an eMachines 5312 (Athlon XP 2400+), running Mandrake 10.

ACPI sort of works.

That is, I get accurate reporting of power usage, and the system does some power management stuff when unplugged to increase battery life (which is around 2:50 with a dim screen and low proc usage; in WinXP I get about 3:20). I think it's using the various "deep idle" states (C1 and C2?).

However, there are a few issues. If I boot the system up with the AC adapter disconnected, it won't realize it's running off battery, and will chew through a full charge in under an hour. In order to get power management, I have to connect, then disconnect, the AC adapter.

Second, I can't seem to get CPU frequency scaling working. It automatically does this under Windows, but I can't seem to get it to work under Linux. I made some modifications to the system's DSDT table (google "linux dsdt" for more information about the problem... basically, because of sloppy programming, many laptops' ACPI works under Windows but not fully under Linux), but that didn't seem to fix the problem.

There *is* some sort of scaling going on based on heat. I have a number-cruncher that, among other things, graphs its crunch rate, and it will clearly drop to a lower (but constant) level when the processor gets hot, and will rev back up when it cools. Interestingly, it will stay at full speed when the system's running off battery--it realizes it should save power, creates less heat as a side effect, and can maintain full speed without overheating.

jfromcanada 11-15-2004 08:55 AM

for the frequency scaling stuffs, check that you have the cpufreq drivers compiled into the kernel (assuming you're using 2.6.x), as well as anything and everything ACPI

littlemidget 12-30-2004 05:16 PM

Quote:

Originally posted by DAChristen29
sorry for this late post, but ive had ACPI kinda working on slackware 9.1 (2.4 kernel). the fan would turn on and off automatically. i still havent, on any distro, found out how to check my battery status.
I am currently using Debian Sarge, and I have installed acpid.

Code:

midget@bluefish:~$ cat /proc/acpi/battery/BAT0/state
present:                    yes
capacity state:          ok
charging state:        discharging
present rate:            12178 mW
remaining capacity:  43020 mWh
present voltage:        12166 mV

You can also try torsmo (almost the same as gkrellm), and it will show both the temperature, and the battery status :-)

DAChristen29 03-20-2005 12:03 AM

alright, time for another post.

so far, EVERY newer distro im trying has working ACPI, battery stats, fans, etc...

they all use the 2.6 kernels, so that helps.

ive been trying mepis, suse 9.1, mandrake 10, ubuntu, gentoo (vida linux). they all work out of the box.


All times are GMT -5. The time now is 05:14 AM.