Forcing acpi? Hoping to improve battery life...


Forum: Laptops
Topic: Forcing acpi? Hoping to improve battery life...
started by: yangmusa

Posted by yangmusa on Sep. 14 2007,18:55
I love DSL, but I confess that my curiosity for different Linux distributions led me to install Wolvix Cub 1.1 too (dual booting now). And I discovered something interesting! Although my hardware is too slow to run Wolvix as fast as it runs DSL, my battery life is tripled (or more, still waiting..) when running Wolvix!

I'm guessing it might be to do with Wolvix running acpi, rather than apm? I removed both noapm and noacpi from the cheat codes, to let DSL choose. Although it isn't listed, can I use "acpi" as a cheat code to force it on?

On the negative side, with Wolvix & acpi - when I press the power button it initiates shutdown. On DSL, pressing the power button initiates hardware suspend. I love suspend! No more waiting for start up! So if I had to choose between great battery life, or suspend... oh, I don't know..

Posted by roberts on Sep. 14 2007,21:13
The answer depends on how you are booting DSL.
If you have a boot prompt then

boot: dsl acpi=force

If no boot prompt then how are booting and how did you install?
What boot loader did you choose? It could be lilo.conf or menu.lst, or syslinux.cfg or isolinux.cfg or pendrive.bat, etc...

Posted by yangmusa on Sep. 14 2007,21:38
I've got a frugal install, booting using GRUB.

I guess I can add acpi=force at the end of the list of kernel parameters in the relevant menu.lst entry? Will give it a try after work and see what happens.

Posted by yangmusa on Sep. 15 2007,19:31
I used acpi=force and it booted with acpi. It looks like battery life will be extended too, so already this experiment has been somewhat successful!

Few questions though:
1) Torsmo no longer shows any info about the battery - do I need to change any settings?

2) Suspend to ram no longer works, it used to sleep on pressing the power button. Now it does nothing. I've been reading the acpi < documentation > but following their advice doesn't work.

Code Sample
echo S3 > /proc/acpi/sleep


Gives no errors, but nothing happens either. Still nothing if a sudo this command. When I check the contents of sleep, it remains unchanged:

Code Sample
cat /proc/acpi/sleep
S0 S1 S2 S3 S4 S5


Ideas?

Posted by roberts on Sep. 15 2007,21:13
For advanced acpi functions you need to look at the example scripts in /opt/acpi/actions and modify to suit your needs. Then start the daemon acpid
Posted by yangmusa on Sep. 15 2007,21:39
Quote (roberts @ Sep. 15 2007,14:13)
For advanced acpi functions you need to look at the example scripts in /opt/acpi/actions and modify to suit your needs. Then start the daemon acpid

I don't seem to have the acpi deamon installed. Is it a MyDsl package? And if so, I can't find it under MyDSL browser > System.

Also, I checked the scripts. The powerbutton script initiates reboot, the lib script initiates shutdown - neither initiate suspend to ram.

If I could find the right commands to initiate suspend to ram, then I could rewrite the scripts. But like I wrote earlier, the instructions from the ACPI documentation don't work on DSL. Could be there's more to be learned from the docs, but the instructions given didn't list any ifs/buts/caveats or alternative suggestions.

Posted by roberts on Sep. 15 2007,23:17
acpid was added to DSL v3.4 see notes.html section

Use the boot option "acpid"

or the typical

# /etc/init.d/acpid start

Posted by Juanito on Sep. 16 2007,03:50
On my laptop, the biggest power saving comes from slowing the Intel Speedstop processor down - in the 2.6.x kernel, this can be done automatically using cpufreqd (I get about twice the battery life with dsl-n as compared with dsl).

After this, the next biggest power saving comes from spinning down the hd, again in 2.6.x this can be done automatically with laptop-mode-tools.

I have tried suspend/sleep on 2.4.x with no sucess at all - on 2.6.x I can suspend, but my laptop never wakes up...

I think you're going to be relatively limited in 2.4.x, but there is plenty of information out there via google.

Posted by andrewb on Sep. 16 2007,23:16
Quote (yangmusa @ Sep. 15 2007,05:31)
I used acpi=force and it booted with acpi. It looks like battery life will be extended too, so already this experiment has been somewhat successful!

Few questions though:
1) Torsmo no longer shows any info about the battery - do I need to change any settings?

2) Suspend to ram no longer works, it used to sleep on pressing the power button. Now it does nothing. I've been reading the acpi < documentation > but following their advice doesn't work.

Code Sample
echo S3 > /proc/acpi/sleep


Gives no errors, but nothing happens either. Still nothing if a sudo this command. When I check the contents of sleep, it remains unchanged:

Code Sample
cat /proc/acpi/sleep
S0 S1 S2 S3 S4 S5


Ideas?

Check where your battery info is stored when using acpi. The version of torsmo currently in DSL can only access battery info in directories proc/acpi/battery/BAT0(or 1,2,3,.....) Version 0.18, which I think Robert is going to put in future releases, can cope with other directory names (the Toshiba Libretto 100CT uses a directory called MBAT). I haven't had much success with symlinks to to correct this. The binary of v0.18 that I use is at users.tpg.com.au/cramond/torsmo.tar.gz. This contains a unc file so you can use it to overwrite the existing version of torsmo for the time being.

Posted by roberts on Sep. 17 2007,14:46
andrewb's torsom v0.18 will be included in the next release of DSL both 3.4.3 and 4.0.
Posted by JPsDad on Sep. 10 2008,04:23
Quote (roberts @ Sep. 15 2007,20:17)


# /etc/init.d/acpid start


ACPID started; I looked at Torsmo to see if it told me my power source and I noticed that my CPU usage was 110%! I unplug the power and it dropped back to 100%. It stays there even if I am not doing anything!.
Does acpiD only check at boot or should it drop back to minimum (600MHz) if I switch to battery?
As I am writing this, I have nothing else going on that I selected, but CPU usage is steady at 100%. Torsmo says there are 28 processes with 0 running.
Can someone help me to understand what is going on?

Posted by chaostic on Sep. 10 2008,05:01
Try exiting and restarting X. Or Torsmo itself ("killall torsmo && nohup torsmo & ").
Posted by Juanito on Sep. 10 2008,07:14
Quote
Does acpiD only check at boot or should it drop back to minimum (600MHz) if I switch to battery?

acpid monitors changes to acpi "sensors" (I'm not sure how often it checks for changes) - i.e. if you plug/unplug the power, acpid will register an acpi "event".

Once acpid detects an event, if there is an acpid script for that event (i.e. if power unplugged then slow cpu down) it will be executed, if there is no script for that event, then nothing will happen.

Do you have an acpid log in /var or /var/log that could give clues to the problem?

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.