zzz - Man Page

suspend or hibernate your computer

Synopsis

zzz [-v] [-n|s|S|z|Z|H|R|V|h]
ZZZ [-v] [-n|s|S|z|Z|H|R|V|h]

Description

zzz is a simple program to suspend or hibernate your computer. It supports hooks before and after suspending.

Options

-n

Dry-run mode. Instead of performing an ACPI action, zzz will just sleep for a few seconds.

-s,  -S

Enter low-power idle mode (ACPI S1, kernel name “freeze”).

-z

Enter suspend to RAM mode (ACPI S3, kernel name “mem”). This is the default for zzz.

-Z

Enter hibernate to disk mode (ACPI S4, kernel name “disk”) and power off. This is the default for ZZZ.

-H

Enter hibernate to disk mode and suspend. This is also know as suspend-hybrid.

-R

Enter hibernate to disk mode and reboot. This can be used to switch operating systems.

-v

Be verbose.

-V

Print program name & version and exit.

-h

Print help message and exit.

Files

/etc/zzz.d/*

Hook scripts found in this directory are executed before/after the system is suspended/resumed by zzz.

/etc/zzz.d/suspend/*

Hook scripts found in this directory are executed before the system is suspended by zzz. This directory is supported for compatibility with zzz(8) on Void Linux.

/etc/zzz.d/suspend/*

Hook scripts found in this directory are executed after the system is resumed. This directory is supported for compatibility with zzz(8) on Void Linux.

The hook script is a regular file (or a symlink) owned by root, executable by the owner and not writeable by others. Any other files found in the aforesaid directories are ignored.

The hook scripts are executed sequentially in alphabetic order with two arguments:

  1. “pre” (before suspend), or “post” (after resume),
  2. the same as ZZZ_MODE (see below).

And the following environment variables:

ZZZ_MODE

The selected suspend mode; one of “hibernate”, “noop”, “standby”, or “suspend”.

ZZZ_HIBERNATE_MODE

The selected hibernate mode: “platform”, “reboot”, or “suspend”.

Exit Codes

Logging

Information and debug messages are printed to STDOUT, error messages are printed to STDERR. All messages are also logged to syslog with ident string “zzz” and facility code 1 (user).

Debug messages are not printed and logged unless -v is specified.

History

This program is inspired from zzz(8) script in Void Linux written by Leah Neukirchen.

Authors

Jakub Jirutka

Reporting Bugs

Report bugs to the project’s issue tracker at https://github.com/jirutka/zzz/issues.

Info

2021-08-30