LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   how to do standby or suspend with acpi (https://www.linuxquestions.org/questions/linux-general-1/how-to-do-standby-or-suspend-with-acpi-58035/)

Brain Drop 05-03-2003 11:33 PM

how to do standby or suspend with acpi
 
i normally dont ask to many questions but this has me stumped, ive read all the man pages i can find but cant find anything on this.
i have an hp pavilion xt118 laptop and got acpi working ( have batt meter and will power down ok now) what i want to do is go into standby, suspend and hibernate. in the kde control panel under laptop batt there is a button to setup acpi when i click on it there are three check boxes, standby, suspend, and hibernate. beside each check box is a text box that has a default message that reads 'how to enter standby' or suspend or hibernate. what am i supposed to enter in these boxes? or am i supposed to enter a new event in the /etc/acpi/event? and how would i do that? the one that is in there after install and is called an 'example' is the power button one to call a halt when the power button is pressed. it works fine but i dont know how to add any other event things in there.

and as for hibernate, the only reference i have come across is one that was stating that you need a seperate partition to use to go into hibernate mode but that with kernal 2.5 you can use the swap partition. any information you can tell me about that would be cool too.

and of course ive tried all the sites that are supposed to be for linux on laptops and acpi sites but unless im missing something all the info there seems to be rather dated.:scratch:

rch 05-04-2003 12:51 AM

Re: how to do standby or suspend with acpi
 
Quote:

Originally posted by Brain Drop
i normally dont ask to many questions but this has me stumped, ive read all the man pages i can find but cant find anything on this.
i have an hp pavilion xt118 laptop and got acpi working ( have batt meter and will power down ok now) what i want to do is go into standby, suspend and hibernate. in the kde control panel under laptop batt there is a button to setup acpi when i click on it there are three check boxes, standby, suspend, and hibernate. beside each check box is a text box that has a default message that reads 'how to enter standby' or suspend or hibernate. what am i supposed to enter in these boxes? or am i supposed to enter a new event in the /etc/acpi/event? and how would i do that? the one that is in there after install and is called an 'example' is the power button one to call a halt when the power button is pressed. it works fine but i dont know how to add any other event things in there.

and as for hibernate, the only reference i have come across is one that was stating that you need a seperate partition to use to go into hibernate mode but that with kernal 2.5 you can use the swap partition. any information you can tell me about that would be cool too.

and of course ive tried all the sites that are supposed to be for linux on laptops and acpi sites but unless im missing something all the info there seems to be rather dated.:scratch:

A good question I have got after quite a long time.Many come here for answers without searching for them and ask stupid questions
like(how to make a boot floppy).
Yours is a good q!
I have not used the kde acpi crap(i never liked kde) and so i suggest for your kde queries you try their site
First thing first :ACPI is in experimental stage that may mean that it may not work in your machine or make it unstable
So if you are comfortable with APM i suggest you to stick with APM
now things you have to do is to run a acpi deamon :
use a deamon like acpid
get it from rpmseek
next add it in your init script
do a ntsysv and add acpid
now i will tell you about the different stages in acpi
ie the sleep states ,processor states
/proc/acpi would give you the current acpi configuration
the entries in the /proc/acpi will include sleep and CPU0 or simply 0 which controls the
throttling in CPU
what exactly you are seeking is /proc/acpi/sleep
first do a cat /proc/acpi/sleep
it should give you the output like
S0 S1 S4 S5
which prints the ACPI sleep states your system can support
The state S1 is like the suspend state in your windows system
S4 is like the hibernate state in your windows system
now to make your system go to suspend
do
echo 1 > /proc/acpi/sleep
it will print something like this
hwsleep ..blah blah
now your computer is suspended
but you might say your moniter is still on
that is becoz your moniter is not supposed to turn off in suspend stage
you could use the DPMS mode to enable your moniter to suspend or you can manually switch off
the moniter button
to wake up from suspend just press any key and your computer is back in action
i have tried the hibernate stage(doesn't require extra partition) but it did not work in
my computer
(Remember ACPI is in development stage)
There is very few documentation available in the net about linux ACPI if you find one
maybe you can tell me
(or if you are a programmer like me :suggest reading the kernel source to understand its action;
it is usually full of comments so that we could understand what is going on; remember also that intel is
currently supporting acpi in linux;that might mean that other motherboards /chipsets/processor might not work
remember that you have been warned)

Brain Drop 05-04-2003 10:42 AM

thanks for your answer, thats what i was looking for.
my system comes back with s0 s3 s4 s5 but writing any of them to sleep is not effective except if i write echo 5 > /proc/acpi/sleep then i lose my cursor. so io guess im going to take the hard road and dig through the kernel a little. or maybe go with software suspend for a hibernate type setup but its just not quite the same.

rch 05-04-2003 11:26 PM

Quote:

Originally posted by Brain Drop
thanks for your answer, thats what i was looking for.
my system comes back with s0 s3 s4 s5 but writing any of them to sleep is not effective except if i write echo 5 > /proc/acpi/sleep then i lose my cursor. so io guess im going to take the hard road and dig through the kernel a little. or maybe go with software suspend for a hibernate type setup but its just not quite the same.

I know some guys who use the SysRq key frequently .As for me I have got no idea about the key and its functions.Anyway nice to hear from you.Incidentally what is your machine's specification?


All times are GMT -5. The time now is 07:37 PM.