apmsleep Linux Commands

What is Linux apmsleep Command?

Explanation

apmsleep COMMAND:

The apmsleep - go into suspend or standby mode and wake-up later.
Some computers, especially laptops, can wake-up from a low-power suspend to DRAM mode using the Real-time-clock (RTC) chip. Apmsleep can be used to set the alarm time in the RTC and to go into suspend or standby mode. An interrupt from the RTC causes the computer to wake-up. The program detects this event, by waiting for a leap in the kernel time and terminates successfully. If no time leap occurs within one minute, or something goes wrong, the exit value will be non-zero.
The wake-up time can be specified in two formats:
  • +hh:mm specifies a relative offset to the current time. The computer will suspend for exactly hh hours and mm minutes plus a few seconds to wake up. On some laptops, the timing is not completely accurate so it may be a few minutes (or more?) late.
  • hh:mm specifies absolute local time in 24-hour format. The time stored in the RTC is not important. You may change the time zone used, with the TZ environment variable as usual. Daylight saving time is not obeyed in this version, but might be in a future release. WARNING: Do not close cover of laptop after suspending the laptop with apmsleep. Most laptops overheat when running with closed cover.

Energy conservation with APM is little for a desktop. Turning of the screen will save 1/2, going into standby with drives turned off will save another 1/6th of the current.

SYNTAX:


apmsleep [-sSnwhVd] [--suspend] [--standby] [--noapm] [--wait] [--precise] [--help] [--version] [--debug] [+]hh:mm

DESCRIPTION:

There are four main operations that attr can perform:
Tag Description
-V, --version Print the apmsleep program version and exit immediately.
-s, --suspend Put the machine into suspend mode if possible (default). On my laptop, suspend mode turns off everything except the memory.
-S, --standby Put the machine into standby mode if possible. On my laptop, standby mode turns off screen, hard disk, and CPU.
-w, --wait Wait indefinitely for the time leap.
-p, --precise Wait for alarm time to match actual time. Do not wait for time leap. This might be useful even without APM.
-n, --noapm Do not call apm bios to suspend computer, just set the alarm clock and wait for time leap indefinitely.
-d, --debug Print some information about what is going on.

EXAMPLE:


  1. apmsleep
    apmsleep coomand produce the below output:
    apmsleep: missing argument.
    Usage:
    apmsleep [+]hh:mm
    Example:
    apmsleep +1:15 will suspend for one hour and 15 minutes
    apmsleep 8:00 will suspend until 8:00 am
    Bugs: Daylight saving jumps are not taken into account.
    Modem ring detection may trigger early wake-up.
    Does not work with Suspend to Disk.
    Bug reports to author Peter Englmaier <ppe@mpe.mpg.de>.

Ask Questions

Ask Question