Sponsored Content
Full Discussion: Hibernate and Suspend
Top Forums UNIX for Advanced & Expert Users Hibernate and Suspend Post 302567945 by BrandonShw on Tuesday 25th of October 2011 03:21:21 PM
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?
 

8 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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
PM-IS-SUPPORTED(1)					       pm-utils User Manual						PM-IS-SUPPORTED(1)

NAME
pm-is-supported - Test whether suspend or hibernate is supported. SYNOPSIS
pm-is-supported [{--suspend | --hibernate | --suspend-hybrid}] DESCRIPTION
This manual page documents briefly the pm-is-supported command. The intended purpose of pm-is-supported is to find out which power management modes are supported by the system. hald(8) will call it to do just that. (Note that UPower does not use this.) OPTIONS
--suspend Test whether suspend is supported. Suspend is a state where most devices are shutdown, except for RAM. This state still draws power. --hibernate Test whether hibernate is supported. During hibernate the state of the system is saved to disk, the system is fully powered off. --suspend-hybrid Test whether hybrid-suspend is supported. Hybrid-suspend is the process where first the state of the system is saved to disk -- just like with hibernate -- but instead of poweroff, the system goes in suspend state, which means it can wakeup quicker than for normal hibernation. The advantage over suspend is that you can resume even if you run out of power. s2both is a hybrid-suspend implementation. RETURN VALUE
The result of the test for a certain powermanagement state is defined by the following exit codes. Code Diagnostic 0 State available. 1 State NOT available. SEE ALSO
hald(8), pm-suspend(8), s2both(8), UPower(7) AUTHOR
Tim Dijkstra <tim@famdijkstra.org> Manpage author. COPYRIGHT
Copyright (C) 2007 Tim Dijkstra This manual page was originally written for the Debian(TM) system, and has been adopted by the pm-utils project. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or (at your option) any later version published by the Free Software Foundation. pm-is-supported Apr 18, 2007 PM-IS-SUPPORTED(1)
All times are GMT -4. The time now is 01:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy