From the systemctl manpage:
suspend
Suspend the system. This will trigger activation of the special target unit suspend.target. This command is asynchronous, and will return after the suspend operation is successfully enqueued. It will not wait for the suspend/resume cycle to complete.
On my system the suspend.target
looks like this:
[Unit]
Description=Suspend
Documentation=man:systemd.special(7)
DefaultDependencies=no
Requires=systemd-suspend.service
After=systemd-suspend.service
StopWhenUnneeded=yes
If I look at the man:systemd.special(7)
listed there I get find this:
suspend.target A special target unit for suspending the system. This pulls in sleep.target.
If I dig more into systemd-suspend.service
I get:
systemd-suspend.service is a system service that is pulled in by suspend.target and is responsible for the actual system suspend.
...
Internally, this service will echo a string like "mem" into /sys/power/state, to trigger the actual system suspend. What exactly is written where can be configured in the "[Sleep]" section of /etc/systemd/sleep.conf or a sleep.conf.d file.
The documentation on sleep.conf
tells me:
The default configuration is defined during compilation, so a configuration file is only needed when it is necessary to deviate from those defaults.
There is no sleep.conf
on my system so it must be using the compiled defaults. I can't figure out what those are.
What are the exact commands being sent to /sys/power/state
and friends by systemctl suspend
by default?