You are not logged in.

#1 2018-11-04 15:23:44

Lupo Alberto
Member
From: Gomel, Belarus
Registered: 2013-11-25
Posts: 84

[SOLVED] Is there a right way to launch 'suspend-then-hibernate' ?

Is there a right way to  launch 'suspend-then-hibernate' instead 'suspend' in Archlinux?
Is it possible to change at the system level  instead running

systemctl suspend

to start

systemctl suspend-then-hibernate

?
I.e. when I fire 'systemctl suspend' from any place it starts 'systemctl suspend-then-hibernate'?

Last edited by Lupo Alberto (2018-11-04 16:26:05)

Offline

#2 2018-11-04 16:22:37

Lupo Alberto
Member
From: Gomel, Belarus
Registered: 2013-11-25
Posts: 84

Re: [SOLVED] Is there a right way to launch 'suspend-then-hibernate' ?

I think I've solved this.

cat /etc/systemd/system/systemd-suspend.service.d/override.conf 
[Service]
ExecStart=
ExecStart=/usr/lib/systemd/systemd-sleep suspend-then-hibernate

Offline

#3 2018-11-04 16:32:08

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 595

Re: [SOLVED] Is there a right way to launch 'suspend-then-hibernate' ?

The right way to do this is to create a sleep.conf file with the contents:

[Sleep]
SuspendMode=suspend-then-hibernate

Offline

#4 2018-11-04 16:38:36

Lupo Alberto
Member
From: Gomel, Belarus
Registered: 2013-11-25
Posts: 84

Re: [SOLVED] Is there a right way to launch 'suspend-then-hibernate' ?

nl6720 wrote:

The right way to do this is to create a sleep.conf file with the contents:

[Sleep]
SuspendMode=suspend-then-hibernate

...but it doesn't work.

% cat /etc/systemd/sleep.conf                                    
[Sleep]
SuspendMode=suspend-then-hibernate
HibernateDelaySec=10
% systemctl suspend          
Failed to suspend system via logind: Sleep verb "suspend" not supported

P.S.

% cat /sys/power/disk
[platform] shutdown reboot suspend test_resume

Last edited by Lupo Alberto (2018-11-04 16:40:49)

Offline

#5 2018-11-04 17:10:37

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 595

Re: [SOLVED] Is there a right way to launch 'suspend-then-hibernate' ?

Did you restart systemd-logind.service? See https://wiki.archlinux.org/index.php/Po … CPI_events .

If it still doesn't work open an issue in systemd's bug tracker.

Offline

#6 2018-11-04 18:22:32

Lupo Alberto
Member
From: Gomel, Belarus
Registered: 2013-11-25
Posts: 84

Re: [SOLVED] Is there a right way to launch 'suspend-then-hibernate' ?

nl6720 wrote:

Did you restart systemd-logind.service? See https://wiki.archlinux.org/index.php/Po … CPI_events .

If it still doesn't work open an issue in systemd's bug tracker.

I restarted whole my system.
The link you gave me describes the behavior of the system when it receives ACPI events, but not when it runs commands.
I think there's not an issue in this case.

Last edited by Lupo Alberto (2018-11-04 18:22:55)

Offline

Board footer

Powered by FluxBB