3

System Info

$ cat /etc/issue
Ubuntu 20.04.3 LTS \n \l

$ uname -r 5.11.0-27-generic

From the official document shown on http://manpages.ubuntu.com/manpages/groovy/man8/pm-action.8.html,

pm-suspend-hybrid Hybrid-suspend is the process where the system does everything it needs to hibernate, but suspends instead of shutting down. This means that your computer can wake up quicker than for normal hibernation if you do not run out of power, and you can resume even if you run out of power. s2both(8) is an hybrid-suspend implementation.

suepend-hybrid or hybrid-sleep are referring to suspend to disk and suspend to RAM without shutting down the computer. However, when I am trying either of the following two commands. My computer shuts down.

$ sudo pm-suspend-hybrid
$ sudo systemctl hybrid-sleep

I have double checked my hibernate mode, which works just fine and my swap configuration is fine. Then I checked file /etc/systemd/sleep.conf and found the following commented lines.

#HibernateMode=platform shutdown
#HibernateState=disk
#HybridSleepMode=suspend platform shutdown
#HybridSleepState=disk
#HibernateDelaySec=180min

I took the commented line as default configuration and found that both hibernate mode and hybrid sleep mode would shutdown my computer. Why hybrid sleep mode would shutdown my computer by default? Why its default implementation differs from the definition from official document?

Thank you for replying in advance.

1 Answers1

0

In man systemctl-sleep.conf it's documented that "More than one value can be specified by separating multiple values with whitespace. They will be tried in turn, until one is written without error." So when you revoke hybrid-sleep.service, it should try to suspend first.

Since the hibernation mode is working properly, you can first test whether suspend is working properly, then check if drop-in configurations are overriding the default behaviour. Config files normally reside in those following locations:

/etc/systemd/sleep.conf
/etc/systemd/sleep.conf.d/*.conf
/run/systemd/sleep.conf.d/*.conf
/usr/lib/systemd/sleep.conf.d/*.conf
Homan
  • 3