Jump to content

APM and ACPI


Recommended Posts

Mod Note: moved to laptops by tyme

 

There are two functions I need out of apm or acpi. Problem is neither does both.

 

I need battery status (percent) and a sleep mode.

 

ACPI gives me battery status, but no sleep mode. swsusp also failed. there is no /proc/acpi/sleep either

 

APM gives me the sleep mode, apm -S, however reports my battery as a constant -1% and doesnt know ifi ts on the charger or not.

 

does anyone have any ideas to solve my predicament as they dont both runn at the same time either :(

 

Thanks a heap!

 

iphitus

Edited by tyme
Link to comment
Share on other sites

try echo 3 > /proc/acpi/sleep

or echo 4 > /proc/acpi/sleep

 

ACPI has modes S0 S1 S2 S3 S4, consult your laptop BIOS on which modes it supports. (S4 is "hibernate") You might have to recompile the kernel to enable all ACPI features but the default 10.0 kernel works fine for me. Modprobe all the components like battery, thermal, fan, etc.

 

I think 10.0 has a bug since I always have to manually start Klaptop...I'll solve that pretty soon. There's also a kernel patch called swsusp2 from http://swsusp.sourceforge.net . It's more like hibernate, but it's quite fast.

Link to comment
Share on other sites

For sleep mode, try calling pmsuspend2 from a command line with acpi enabled.

 

I can't remember where the exact script is that you have to edit, but there is one that you have to change from pmsuspend to pmsuspend2 in order for this to work on lid close. Since your laptop doesn't have an nvidia chipset, it should work from within X.

 

One thing for the pmsuspend2 script, though; you have to have a swap partition that is at least as large as the amount of memory you have. It won't work if you don't, trust me.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...