Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Unwanted hibernation

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
ngolia
Posts: 28
Joined: 2010-02-17 21:17

Unwanted hibernation

#1 Post by ngolia »

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.

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Unwanted hibernation

#2 Post by bw123 »

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
resigned by AI ChatGPT

ngolia
Posts: 28
Joined: 2010-02-17 21:17

Re: Unwanted hibernation

#3 Post by ngolia »

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: 28
Joined: 2010-02-17 21:17

Re: Unwanted hibernation

#4 Post by ngolia »

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

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Unwanted hibernation

#5 Post by bw123 »

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
resigned by AI ChatGPT

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Unwanted hibernation

#6 Post by debiman »

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

Code: Select all

man logind.conf

ngolia
Posts: 28
Joined: 2010-02-17 21:17

Re: Unwanted hibernation

#7 Post by ngolia »

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.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Unwanted hibernation

#8 Post by Head_on_a_Stick »

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:
deadbang

Post Reply