Unwanted hibernation

Kernels & Hardware, configuring network, installing services

Unwanted hibernation

Postby ngolia » 2018-09-20 14:29

My two Debian desktop PCs have recently started exhibiting undesirable behaviour:- I have automatic suspend enabled, and when I try to resume after an extended suspension I keep finding them in what appears to be a state of hibernation. They start in grub and go through a sort of boot sequence which can take even longer than a normal boot, before presenting the desktop I left. I think this is also responsible for the PC in my bedroom waking me up in the middle of the night by bursting into life for a few seconds, as it switches from suspend to hibernate I guess.

I was happy with plain old suspend, how can I disable this behaviour? I've looked at the changelogs for systemd, gnome-shell, gnome-settings-daemon, gnome-shell and gdm. The only one which matches "hibernat*" for recent changes is gnome-settings-daemon - "Add SuspendAndHibernate" - and that was back in July, whereas I have only noticed this problem in the last week or so.
ngolia
 
Posts: 25
Joined: 2010-02-17 21:17

Re: Unwanted hibernation

Postby bw123 » 2018-09-20 15:45

That sounds annoying, I think it's called hybrid suspend or hybrid sleep. Did you try man page or anything? Maybe some gnome documentation or searches...

https://duckduckgo.com/html/?q=gnome+hybrid+sleep

Code: Select all
$ apropos hybrid
systemd-hybrid-sleep.service (8) - System sleep state logic
User avatar
bw123
 
Posts: 3404
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Unwanted hibernation

Postby ngolia » 2018-09-20 22:03

I did find some information about hybrid, but I don't think that's what's going on here, or if it is it isn't working how I would like it to. What I understand hybrid should do is when triggered, first prepare for hibernation, but just before stopping the CPU go into suspend instead. If nothing happens the PC should stay in suspend mode until resumed (rather than drop into hibernation a bit later like mine), and the hibernation is a sort of mini back-up in case the power fails while suspended.

In the meantime I've done systemctl mask hibernate.target, I'll see if that helps.
ngolia
 
Posts: 25
Joined: 2010-02-17 21:17

Re: Unwanted hibernation

Postby ngolia » 2018-09-22 18:45

ngolia wrote:In the meantime I've done systemctl mask hibernate.target, I'll see if that helps.


It didn't, but then I noticed there was a suspend-then-hibernate.target which sounds like a plausible culprit. I think masking it would prevent (GNOME's) suspend from working at all, so I need to find what's responsible for calling suspend-then-hibernate instead of suspend and/or hack systemd to make suspend-then-hibernate do suspend only. Seeing how systemctl mask works I presume I could do this by:
Code: Select all
ln -s /lib/systemd/system/suspend.target /etc/systemd/system/suspend-then-hibernate.target
ngolia
 
Posts: 25
Joined: 2010-02-17 21:17

Re: Unwanted hibernation

Postby bw123 » 2018-09-22 20:43

Sounds interesting, never heard of suspend-then-hibernate can you let people know your debian, gnome, and systemd versions? Also your machine specs/architecture?

I found it in sid
https://packages.debian.org/search?sear ... e&arch=any

and man page for systemd 239 describing how the targets work
https://www.freedesktop.org/software/sy ... rvice.html
User avatar
bw123
 
Posts: 3404
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Unwanted hibernation

Postby debiman » 2018-09-23 06:27

maybe it's possible to disable hibernation completely by editing /etc/systemd/logind.conf?

Code: Select all
man logind.conf
User avatar
debiman
 
Posts: 2917
Joined: 2013-03-12 07:18

Re: Unwanted hibernation

Postby ngolia » 2018-09-23 18:37

My hack seemed to work.

My system is sid, I appear to have done a dist-upgrade at an awkward time because I have a mixture of 3.28.1-1 and 3.30.0 GNOME packages. systemd is 239-9. This PC is a 1st gen Ryzen5 on a B350 chipset with NVidia 1060 GPU using the proprietary driver, 16GB RAM, one M2+SATA SSD, and one SATA SSD, Debian is on the latter IIRC. The other PC is based on an Intel G4560, I use the onboard graphics. It has two SATA SSDs. I haven't updated the OS as recently as this one. So two quite different systems, I don't think this is hardware specific.
ngolia
 
Posts: 25
Joined: 2010-02-17 21:17

Re: Unwanted hibernation

Postby Head_on_a_Stick » 2018-09-24 05:12

Check the systemd journal for clues and also
Code: Select all
systemd-inhibit

I would help more but I no longer run systemd on my laptop :mrgreen:
User avatar
Head_on_a_Stick
 
Posts: 8009
Joined: 2014-06-01 17:46
Location: /dev/chair


Return to System configuration

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable