systemctl-suspend
Suspend the Linux system to RAM
TLDR
Suspend the system immediately
Schedule a suspend after a 5 minute delay
Suspend the system and then hibernate after a delay
SYNOPSIS
systemctl [OPTIONS...] suspend
PARAMETERS
--no-block
Do not wait for the operation to complete. The command will return immediately after queuing the suspend request, allowing the calling script or process to continue.
--no-wall
Do not send a wall message to all logged-in users before suspending the system. This option is useful for automated scripts or situations where user notification is not desired.
--no-ask-password
Do not prompt for a password when performing privileged operations. This assumes that the user already has the necessary authorization via Polkit rules.
DESCRIPTION
The systemctl suspend command is a high-level utility used to transition a Linux system into a suspend-to-RAM state. This action temporarily powers down most system components while keeping the RAM powered to preserve its contents. Upon waking, the system quickly resumes operation from where it left off, making it ideal for short breaks or conserving battery life without fully shutting down.
When executed, systemctl suspend triggers the systemd-suspend.service unit, which handles the underlying mechanics of putting the system to sleep. This includes flushing disk caches, preparing devices, and finally, issuing the suspend command to the kernel. It's a modern replacement for older power management tools like pm-suspend, integrating power management seamlessly with the systemd init system.
CAVEATS
Suspending the system requires appropriate privileges, typically root access or membership in a group allowed to manage power (e.g., `power` group, or granted via Polkit rules for desktop users).
Hardware compatibility can be an issue; some devices or drivers might not properly support suspend-to-RAM, leading to resume failures or unexpected behavior. It's crucial to ensure your system's hardware and kernel are well-supported.
While suspended, the system still consumes a small amount of power to maintain RAM. If power is lost (e.g., battery fully drains, or power cord is removed from a desktop), all unsaved data in RAM will be lost, similar to a sudden power failure.
WAKE-UP SOURCES
Systems can typically be woken from suspend by various events, including pressing the power button, keyboard input, mouse movement, or specific network activity (Wake-on-LAN, if configured and supported by hardware). Advanced configurations may also involve Real-Time Clock (RTC) alarms to wake the system at a scheduled time.
CONFIGURATION
The behavior of suspend operations can be fine-tuned through the /etc/systemd/sleep.conf file. This configuration file allows administrators to set default actions for suspend, hibernate, and hybrid sleep, as well as specify delays or other power-related options for systemd's sleep management.
HISTORY
With the adoption of systemd as the default init system in many Linux distributions, power management commands like suspend, hibernate, reboot, and poweroff were unified under the systemctl utility. This replaced older, less integrated tools such as those provided by pm-utils (e.g., pm-suspend), which often involved separate scripts and configurations. The move aimed to streamline power management, improve reliability, and provide a consistent interface across different systemd-based systems, leveraging systemd's service management capabilities for better control over the suspend and resume process.


