You are not logged in.

#1 2019-08-22 02:28:16

chra
Member
Registered: 2019-01-04
Posts: 46

[SOLVED] Suspend-then-hibernate not going into hibernate

For some reason when I type systemctl suspend-then-hibernate in the terminal it suspends fine but never actually hibernates. I am using KDE with the SDDM display manager. I have set the HibernateDelaySec to 60 for testing.

/etc/systemd/sleep.conf:

[Sleep]
#AllowSuspend=yes
#AllowHibernation=yes
#AllowSuspendThenHibernate=yes
#AllowHybridSleep=yes
SuspendMode=suspend
SuspendState=disk
#HibernateMode=platform shutdown
#HibernateState=disk
#HybridSleepMode=suspend platform shutdown
#HybridSleepState=disk
HibernateDelaySec=60 # 10800

/etc/systemd/logind.conf:

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
#InhibitDelayMaxSec=5
HandlePowerKey=suspend-then-hibernate
#HandleSuspendKey=suspend
#HandleHibernateKey=hibernate
HandleLidSwitch=suspend-then-hibernate
HandleLidSwitchExternalPower=suspend-then-hibernate
HandleLidSwitchDocked=ignore
#PowerKeyIgnoreInhibited=no
#SuspendKeyIgnoreInhibited=no
#HibernateKeyIgnoreInhibited=no
#LidSwitchIgnoreInhibited=yes
#HoldoffTimeoutSec=30s
#IdleAction=ignore
#IdleActionSec=30min
#RuntimeDirectorySize=10%
#RemoveIPC=yes
#InhibitorsMax=8192
#SessionsMax=8192

Could KDE be interfering here?

Last edited by chra (2019-08-23 02:43:42)

Offline

#2 2019-08-22 02:47:18

pirateprentice
Member
Registered: 2019-08-16
Posts: 31

Re: [SOLVED] Suspend-then-hibernate not going into hibernate

I think you need to uncomment:

AllowSuspend=yes
AllowHibernate=yes
AllowSuspendThenHibernate=yes

Offline

#3 2019-08-22 02:53:52

chra
Member
Registered: 2019-01-04
Posts: 46

Re: [SOLVED] Suspend-then-hibernate not going into hibernate

pirateprentice wrote:

I think you need to uncomment:

AllowSuspend=yes
AllowHibernate=yes
AllowSuspendThenHibernate=yes

Thanks for the reply. I just tried that and then ran systemctl suspend-then-hibernate after a reboot. Still nothing.

Offline

#4 2019-08-22 07:54:24

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 16,202

Re: [SOLVED] Suspend-then-hibernate not going into hibernate

Fairly certain KDE will have their own handlers for this, check your KDE settings (and to confirm this you can use

systemctl-inhibit --list

to show programs that have handlers registered for certain events.

Offline

#5 2019-08-22 10:58:26

chra
Member
Registered: 2019-01-04
Posts: 46

Re: [SOLVED] Suspend-then-hibernate not going into hibernate

V1del wrote:

Fairly certain KDE will have their own handlers for this, check your KDE settings (and to confirm this you can use

systemctl-inhibit --list

to show programs that have handlers registered for certain events.

Thanks. In the KDE GUI power settings there is no option for suspend-then-hibernate only the normal suspend, hibernate, hybrid-sleep etc. I believe you meant the below command (systemd not systemctl). I ran that and I believe the PowerDevil line is what I am after.

$ systemd-inhibit --list

WHO           UID  USER PID  COMM            WHAT                                                                       WHY                                                        MODE 
UPower        0    root 898  upowerd         sleep                                                                      Pause device polling                                       delay
PowerDevil    1000 user 1494 org_kde_powerde handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch KDE handles power events                                   block
Screen Locker 1000 user 1018 ksmserver       sleep                                                                      Ensuring that the screen gets locked before going to sleep delay

Is there a way to bypass PowerDevil for sleep or just force PowerDevil to use suspend-then-hibernate?

Last edited by chra (2019-08-22 10:58:41)

Offline

#6 2019-08-22 20:29:57

pirateprentice
Member
Registered: 2019-08-16
Posts: 31

Re: [SOLVED] Suspend-then-hibernate not going into hibernate

chra wrote:
V1del wrote:

Fairly certain KDE will have their own handlers for this, check your KDE settings (and to confirm this you can use

systemctl-inhibit --list

to show programs that have handlers registered for certain events.

Thanks. In the KDE GUI power settings there is no option for suspend-then-hibernate only the normal suspend, hibernate, hybrid-sleep etc. I believe you meant the below command (systemd not systemctl). I ran that and I believe the PowerDevil line is what I am after.

$ systemd-inhibit --list

WHO           UID  USER PID  COMM            WHAT                                                                       WHY                                                        MODE 
UPower        0    root 898  upowerd         sleep                                                                      Pause device polling                                       delay
PowerDevil    1000 user 1494 org_kde_powerde handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch KDE handles power events                                   block
Screen Locker 1000 user 1018 ksmserver       sleep                                                                      Ensuring that the screen gets locked before going to sleep delay

Is there a way to bypass PowerDevil for sleep or just force PowerDevil to use suspend-then-hibernate?

To answer your question literally, you can disable PowerDevil in  Systemsettings>Startup and Shutdown>Service Management, but I don't know whether or not that will fix your issue.

Offline

#7 2019-08-23 02:10:00

chra
Member
Registered: 2019-01-04
Posts: 46

Re: [SOLVED] Suspend-then-hibernate not going into hibernate

pirateprentice wrote:

To answer your question literally, you can disable PowerDevil in  Systemsettings>Startup and Shutdown>Service Management, but I don't know whether or not that will fix your issue.

I don't seem to have the Service Management option and no PowerDevil entry is in the Startup and Shutdown section. Suspend then hibernate seems to be in the pipeline for KDE looking at this https://phabricator.kde.org/D16425. I will try and get that code working and report back how it goes.

EDIT: I managed to find my issue mentioned in this bug https://bugs.kde.org/show_bug.cgi?id=399727. A workaround mentioned was to symlink the suspend-then-hibernate and suspend services:

ln -s /usr/lib/systemd/system/systemd-suspend-then-hibernate.service /etc/systemd/system/systemd-suspend.service

Since it works for my needs I will use this method while I wait for KDE to officially support suspend-then-hibernate. Supposedly this will be available in PowerDevil version 5.17. We are currently at 5.16.4.

Last edited by chra (2019-08-23 02:14:57)

Offline

Board footer

Powered by FluxBB