Hibernate and Suspend

Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Hibernate and Suspend
# 1  
Old 10-25-2011
Hibernate and Suspend

I have a C++ program which ends up getting run on every conceivable distro. What I can't do in C++, I can do by shelling out to the O/S. I am trying to find a portable way to send the system into hibernate and suspend modes. For users who have pm-utils, of course, I can use that, but I am trying to figure out how to do the same things when that package isn't present.

I have found a lot of Web articles that tell me to do things like:

echo -n mem > /sys/power/state

but I find that some of the virtuals I create to test contain disk mode but not mem mode or the other way around, and none of these thousands upon thousands of articles even hints at how this works.

I am willing to have my software do different things in different places and am trying to understand the basic principles, but 99.9% of the articles I read on the Web just re-quote the same two or three quick tips.

Can anyone point me towards more understanding of acpi for Linux?
# 2  
Old 10-25-2011
Have you looked at LessWatts.org?
# 3  
Old 10-26-2011
Doesn't seem to have much to say about how to activate ACPI, which is what I am after. Most of what I try, e.g. pm-utils, is only present on the occasional system.
# 4  
Old 10-26-2011
Humm. What do you mean by "activate ACPI"? If by activate, you mean enable, it depends on a number of factors. Does the hardware support ACPI? What ACPI states does the hardware support? Does the OS support ACPI? Was the OS booted with ACPI enabled?

Last edited by fpmurphy; 10-26-2011 at 12:03 PM..
# 5  
Old 10-26-2011
My customers are running on every conceivable configuration. One way to hibernate would be to give the command:


but it only works if pm-utils are installed. One way or another, I want to cover most users.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Ubuntu

Sound fails after waking from hibernate -- Intrepid/Xubuntu

Title says it all. Occasionally but frequently I lose sound: external speakers and headphones both make no noise. I just realized that this tends to happen (perhaps only happens) after starting the computer following hibernation. Rebooting always fixes the issue... but I'd hate to tell my... (3 Replies)
Discussion started by: CRGreathouse
3 Replies

2. Solaris

Suspend in opensolaris

How does one enable the suspend to hard drive or ram and sleep features on a desktiop running Open Solaris? (2 Replies)
Discussion started by: FloridaBSD
2 Replies

3. Shell Programming and Scripting

Edit hibernate config file

I'd like to use a shell script to edit the params in my hibernate.cfg.xml file. I need to substitute the database info(user name, password,url) Here is a look at it: <hibernate-configuration> <session-factory name=""> <property... (1 Reply)
Discussion started by: mc1392
1 Replies

4. Red Hat

Hibernate in Linux

1) How to enable Hibernate in Linux ? 2) Does compiling kernel from source code alters the current setup of the kernel after implementation Thx in advance, siva. (3 Replies)
Discussion started by: Sivaswami
3 Replies

5. Linux

How to enable Hibernate

Hi, I want to enable hibernate in my machine. when i click hibernate option, it is throwing message that hibernate is not enabled in kernel. earlier, i was hibernating in the same machine with windows os. any idea ? Thx in advance. Siva (0 Replies)
Discussion started by: Sivaswami
0 Replies

6. AIX

AIX, Hibernate, Java 1.5 website problem

We have an AIX machine running Tomcat 5.0.28 along with Java 1.5. There are two web application on there however when we start Tomcat and unpack the WAR files only one of the sites work. Then if we remove the working site then the other site starts to work. So it appears that one is taking... (0 Replies)
Discussion started by: coaxis
0 Replies

7. Shell Programming and Scripting

suspend a process

Hello, Two child processes work at the same time because they communicate one another. In KSH, does it exist a good way to suspend a parent process until one of the two child processes stops. It seems that the command 'wait' works well for one process but for two processes, it suspends the... (7 Replies)
Discussion started by: piou78
7 Replies

8. UNIX for Dummies Questions & Answers

UNIX Process Suspend

Hi, I have this doubt.... When some program is running and if we press CTRL+Z...it is suspended... what should we do to continue its execution I know that KILL can be used to completely terminate the process....but is there any way to continue... Thanks (3 Replies)
Discussion started by: proton
3 Replies
Login or Register to Ask a Question

Featured Tech Videos