Configuring suspend-then-hibernate

Hi all,

I tried to configure this mode for my laptop (since I'm used to this functionality on windows)

As per the wiki page I tried to reconfigure the /etc/systemd/sleep.conf - my laptop stopped to suspend at all.

As per what the file said "to restore the defaults - just delete the file" - I have done exactly that, but now I don't have any source file to work upon. (since I thought it would generate a new one on reboot)

I created my own one from scratch. Playing around - i found out that

SuspendMode=suspend-then-hibernate 

is causing the laptop to fail to go to suspended state (the cursor remains on the screen, but everything else goes black)

Found it myself on a russian forum
If anyone need it - here is what I've done:

  1. Created this directory
    sudo mkdir /etc/systemd/system/systemd-suspend.service.d/
  2. Created this file
    sudo touch /etc/systemd/system/systemd-suspend.service.d/override.conf
  3. Contents of the override.conf file:
[Service]
ExecStart=
ExecStart=/usr/lib/systemd/systemd-sleep suspend-then-hibernate

(btw IDK why there is an empty ExecStart, but I just copy-pasted it, and it works

  1. Also you should have these lines in /etc/systemd/sleep.conf:
[Sleep]
AllowSuspendThenHibernate=yes
HibernateDelaySec=60

Where HibernateDelaySec is the delay after which the system will startup and hibernate.

1 Like