{
    "mode": "info",
    "parameter": "SYSTEMD-SUSPEND.SERVICE",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/info/SYSTEMD-SUSPEND.SERVICE/json",
    "generated": "2026-07-05T16:02:02Z",
    "synopsis": "systemd-suspend.service\nsystemd-hibernate.service\nsystemd-hybrid-sleep.service\nsystemd-suspend-then-hibernate.service\n/lib/systemd/system-sleep",
    "sections": {
        "NAME": {
            "content": "systemd-suspend.service, systemd-hibernate.service, systemd-hybrid-\nsleep.service, systemd-suspend-then-hibernate.service, systemd-sleep -\nSystem sleep state logic\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "systemd-suspend.service\n\nsystemd-hibernate.service\n\nsystemd-hybrid-sleep.service\n\nsystemd-suspend-then-hibernate.service\n\n/lib/systemd/system-sleep\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "systemd-suspend.service is a system service that is pulled in by\nsuspend.target and is responsible for the actual system suspend.\nSimilarly, systemd-hibernate.service is pulled in by hibernate.target\nto execute the actual hibernation. Finally,\nsystemd-hybrid-sleep.service is pulled in by hybrid-sleep.target to\nexecute hybrid hibernation with system suspend and pulled in by\nsuspend-then-hibernate.target to execute system suspend with a timeout\nthat will activate hibernate later.\n\nImmediately before entering system suspend and/or hibernation\nsystemd-suspend.service (and the other mentioned units, respectively)\nwill run all executables in /lib/systemd/system-sleep/ and pass two\narguments to them. The first argument will be \"pre\", the second either\n\"suspend\", \"hibernate\", \"hybrid-sleep\", or \"suspend-then-hibernate\"\ndepending on the chosen action. An environment variable called\n\"SYSTEMDSLEEPACTION\" will be set and contain the sleep action that is\nprocessing. This is primarily helpful for \"suspend-then-hibernate\"\nwhere the value of the variable will be \"suspend\", \"hibernate\", or\n\"suspend-after-failed-hibernate\" in cases where hibernation has failed.\nImmediately after leaving system suspend and/or hibernation the same\nexecutables are run, but the first argument is now \"post\". All\nexecutables in this directory are executed in parallel, and execution\nof the action is not continued until all executables have finished.\n\nNote that scripts or binaries dropped in /lib/systemd/system-sleep/ are\nintended for local use only and should be considered hacks. If\napplications want to react to system suspend/hibernation and resume,\nthey should rather use the Inhibitor interface[1].\n\nNote that systemd-suspend.service, systemd-hibernate.service,\nsystemd-hybrid-sleep.service, and\nsystemd-suspend-then-hibernate.service should never be executed\ndirectly. Instead, trigger system sleep with a command such as\nsystemctl suspend or systemctl hibernate.\n\nInternally, this service will echo a string like \"mem\" into\n/sys/power/state, to trigger the actual system suspend. What exactly is\nwritten where can be configured in the [Sleep] section of\n/etc/systemd/sleep.conf or a sleep.conf.d file. See systemd-\nsleep.conf(5).\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "systemd-sleep understands the following commands:\n",
            "subsections": [
                {
                    "name": "-h, --help",
                    "content": "Print a short help text and exit.\n",
                    "flag": "-h",
                    "long": "--help"
                },
                {
                    "name": "--version",
                    "content": "Print a short version string and exit.\n\nsuspend, hibernate, suspend-then-hibernate, hybrid-sleep\nSuspend, hibernate, suspend then hibernate, or put the system to\nhybrid sleep.\n",
                    "long": "--version"
                }
            ]
        },
        "SEE ALSO": {
            "content": "systemd-sleep.conf(5), systemd(1), systemctl(1), systemd.special(7),\nsystemd-halt.service(8)\n",
            "subsections": []
        },
        "NOTES": {
            "content": "1. Inhibitor interface\nhttps://www.freedesktop.org/wiki/Software/systemd/inhibit\n\nsystemd 249                                         SYSTEMD-SUSPEND.SERVICE(8)",
            "subsections": []
        }
    },
    "summary": "systemd-suspend.service, systemd-hibernate.service, systemd-hybrid- sleep.service, systemd-suspend-then-hibernate.service, systemd-sleep - System sleep state logic",
    "flags": [
        {
            "flag": "-h",
            "long": "--help",
            "arg": null,
            "description": "Print a short help text and exit."
        },
        {
            "flag": "",
            "long": "--version",
            "arg": null,
            "description": "Print a short version string and exit. suspend, hibernate, suspend-then-hibernate, hybrid-sleep Suspend, hibernate, suspend then hibernate, or put the system to hybrid sleep."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "systemd-sleep.conf",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/systemd-sleep.conf/5/json"
        },
        {
            "name": "systemd",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/systemd/1/json"
        },
        {
            "name": "systemctl",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/systemctl/1/json"
        },
        {
            "name": "systemd.special",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/systemd.special/7/json"
        },
        {
            "name": "systemd-halt.service",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/systemd-halt.service/8/json"
        }
    ]
}