# Standby then hibernate doesn't work

**URL:** <https://discuss.kde.org/t/standby-then-hibernate-doesnt-work/16194>\
**Category:** Help\
**Created:** [May 26, 2024, 7:13pm UTC](https://discuss.kde.org/t/standby-then-hibernate-doesnt-work/16194 "2024-05-26T19:13:24Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![medin](https://discuss-cdn.kde.org/user_avatar/discuss.kde.org/medin/32/2437_2.png) [@medin](https://discuss.kde.org/u/medin)\
**Post date:** [May 26, 2024, 7:13pm UTC](https://discuss.kde.org/t/standby-then-hibernate-doesnt-work/16194/1 "2024-05-26T19:13:24Z")

</div>

Sleep is working, hibernate is working, but selecting “Standby, then hibernate” in power saving settings doesn’t work, it actually performs a normal sleep, and what is that unknown period it needs to jump from normal sleep to hibernate?

```auto
Operating System: Manjaro Linux 
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.1
Kernel Version: 6.9.1-2-MANJARO (64-bit)
Graphics Platform: Wayland

```

---

<div class="post-metadata">

**Author:** ![jpetso](https://discuss-cdn.kde.org/user_avatar/discuss.kde.org/jpetso/32/2064_2.png) [@jpetso](https://discuss.kde.org/u/jpetso)\
**Post date:** [May 27, 2024, 12:10pm UTC](https://discuss.kde.org/t/standby-then-hibernate-doesnt-work/16194/2 "2024-05-27T12:10:51Z")

</div>

The unknown period is only configurable through systemd config files, the `HibernateDelaySec` entry in /etc/systemd/sleep.conf can modify the default which depends on your system’s capabilities and is described in `man systemd-sleep.conf` (see the “suspend-then-hibernate” section).

---

<div class="post-metadata">

**Author:** ![medin](https://discuss-cdn.kde.org/user_avatar/discuss.kde.org/medin/32/2437_2.png) [@medin](https://discuss.kde.org/u/medin)\
**Post date:** [May 27, 2024, 2:27pm UTC](https://discuss.kde.org/t/standby-then-hibernate-doesnt-work/16194/3 "2024-05-27T14:27:59Z")

</div>

`HibernateDelaySec` is effectively empty in `/etc/systemd/sleep.conf`,

```auto
[Sleep]
#AllowSuspend=yes
#AllowHibernation=yes
#AllowSuspendThenHibernate=yes
#AllowHybridSleep=yes
#SuspendState=mem standby freeze
#HibernateMode=platform shutdown
#HibernateDelaySec=
#SuspendEstimationSec=60min

```

With a laptop left connected to power, it seems it will always fail to hibernate after sleeping

> If the system has battery and HibernateDelaySec= is not set, low-battery alarms (ACPI \_BTP) are tried first for detecting battery percentage and wake up the system for hibernation. If not available, or HibernateDelaySec= is set, the system would regularly wake up to check the time and detect the battery percentage/discharging rate. The rate is used to schedule the next detection. If that is also not available, SuspendEstimationSec= is used as last resort.

After setting `HibernateDelaySec` to a value, now it works fine as it should.

---

<div class="post-metadata">

**Author:** ![skyfishgoo](https://discuss-cdn.kde.org/user_avatar/discuss.kde.org/skyfishgoo/32/2001_2.png) [@skyfishgoo](https://discuss.kde.org/u/skyfishgoo)\
**Post date:** [May 27, 2024, 3:55pm UTC](https://discuss.kde.org/t/standby-then-hibernate-doesnt-work/16194/4 "2024-05-27T15:55:16Z")

</div>

> [@jpetso](#):
>
> `HibernateDelaySec`

you must uncomment that line with the parameter in order for the value to be read, yes?

```auto
[Sleep]
#AllowSuspend=yes
#AllowHibernation=yes
#AllowSuspendThenHibernate=yes
#AllowHybridSleep=yes
#SuspendState=mem standby freeze
#HibernateMode=platform shutdown
#HibernateDelaySec=
SuspendEstimationSec=60min

```

---

<div class="post-metadata">

**Author:** ![medin](https://discuss-cdn.kde.org/user_avatar/discuss.kde.org/medin/32/2437_2.png) [@medin](https://discuss.kde.org/u/medin)\
**Post date:** [May 27, 2024, 4:22pm UTC](https://discuss.kde.org/t/standby-then-hibernate-doesnt-work/16194/5 "2024-05-27T16:22:16Z")

</div>

I simply created a new file  
`/etc/systemd/sleep.conf.d/sleep-then-hibernate.conf`

with the following content:

```auto
[Sleep]
HibernateDelaySec=3600

```

---

<div class="post-metadata">

**Author:** ![inv-er5kar](https://discuss-cdn.kde.org/user_avatar/discuss.kde.org/inv-er5kar/32/9588_2.png) [@inv-er5kar](https://discuss.kde.org/u/inv-er5kar)\
**Post date:** [May 27, 2024, 4:40pm UTC](https://discuss.kde.org/t/standby-then-hibernate-doesnt-work/16194/6 "2024-05-27T16:40:36Z")

</div>

Thank you, I always wondered when that’d happen or if it was broken. So I was never using it after testing.  
Seems to be set to

```auto
HibernateDelaySec=4

```

by default …?  
So that mean it did not work here.

---

<div class="post-metadata">

**Author:** ![medin](https://discuss-cdn.kde.org/user_avatar/discuss.kde.org/medin/32/2437_2.png) [@medin](https://discuss.kde.org/u/medin)\
**Post date:** [May 27, 2024, 4:49pm UTC](https://discuss.kde.org/t/standby-then-hibernate-doesnt-work/16194/7 "2024-05-27T16:49:22Z")

</div>

Hibernate needs some prior preparation depending on your distro, does hibernate alone works for you?

---

<div class="post-metadata">

**Author:** ![inv-er5kar](https://discuss-cdn.kde.org/user_avatar/discuss.kde.org/inv-er5kar/32/9588_2.png) [@inv-er5kar](https://discuss.kde.org/u/inv-er5kar)\
**Post date:** [May 27, 2024, 4:51pm UTC](https://discuss.kde.org/t/standby-then-hibernate-doesnt-work/16194/8 "2024-05-27T16:51:02Z")

</div>

> [@medin](#):
>
> does hibernate alone works for you?

Perfectly.  
😀

---

<div class="post-metadata">

**Author:** ![skyfishgoo](https://discuss-cdn.kde.org/user_avatar/discuss.kde.org/skyfishgoo/32/2001_2.png) [@skyfishgoo](https://discuss.kde.org/u/skyfishgoo)\
**Post date:** [May 27, 2024, 4:56pm UTC](https://discuss.kde.org/t/standby-then-hibernate-doesnt-work/16194/9 "2024-05-27T16:56:58Z")

</div>

4 seconds might not be enough time  
try 4min instead.

---

<div class="post-metadata">

**Author:** ![skyfishgoo](https://discuss-cdn.kde.org/user_avatar/discuss.kde.org/skyfishgoo/32/2001_2.png) [@skyfishgoo](https://discuss.kde.org/u/skyfishgoo)\
**Post date:** [May 27, 2024, 5:00pm UTC](https://discuss.kde.org/t/standby-then-hibernate-doesnt-work/16194/10 "2024-05-27T17:00:57Z")

</div>

i like that better (recommended approach).

does the initramfs need to be rebuilt for these changes take effect, or do you just reboot?

---

<div class="post-metadata">

**Author:** ![inv-er5kar](https://discuss-cdn.kde.org/user_avatar/discuss.kde.org/inv-er5kar/32/9588_2.png) [@inv-er5kar](https://discuss.kde.org/u/inv-er5kar)\
**Post date:** [May 27, 2024, 6:04pm UTC](https://discuss.kde.org/t/standby-then-hibernate-doesnt-work/16194/11 "2024-05-27T18:04:40Z")

</div>

Maybe these defaults need to be adjusted. Or maybe distros set them individually.

---

<div class="post-metadata">

**Author:** ![medin](https://discuss-cdn.kde.org/user_avatar/discuss.kde.org/medin/32/2437_2.png) [@medin](https://discuss.kde.org/u/medin)\
**Post date:** [May 27, 2024, 8:37pm UTC](https://discuss.kde.org/t/standby-then-hibernate-doesnt-work/16194/12 "2024-05-27T20:37:13Z")

</div>

I simply restarted my laptop and it worked.

---

<div class="post-metadata">

**Author:** ![Punk9216](https://discuss-cdn.kde.org/user_avatar/discuss.kde.org/punk9216/32/4112_2.png) [@Punk9216](https://discuss.kde.org/u/Punk9216)\
**Post date:** [October 29, 2024, 9:01am UTC](https://discuss.kde.org/t/standby-then-hibernate-doesnt-work/16194/13 "2024-10-29T09:01:26Z")

</div>

Hello there, I’ve got the Same Setup (Manjaro and the adjusted sleep.conf to switch to hibernate after 90 minutes) and most of the time it works fine. My Laptop goes into Standby and after the 90 minutes, it switches.

But sometimes, it doesnt work and it’s still in Standby, although it’s definetly been more than the 90 minutes.

I meed to do some more Testing to find out what causes this, but maybe you got some tips on how to find the root of the problem… I’m definetly No pro in Linux on that.  
I could bei wrong on this, but maybe the Firefox Browser may be a problem?  
Last night i left open the Browser and this morning, the Laptop was still in Standby.

---

<div class="post-metadata">

**Author:** ![medin](https://discuss-cdn.kde.org/user_avatar/discuss.kde.org/medin/32/2437_2.png) [@medin](https://discuss.kde.org/u/medin)\
**Post date:** [October 29, 2024, 9:36am UTC](https://discuss.kde.org/t/standby-then-hibernate-doesnt-work/16194/14 "2024-10-29T09:36:30Z")

</div>

> [@Punk9216](#):
>
> Last night i left open the Browser and this morning, the Laptop was still in Standby.

Firefox has some weird behavior:

- If the currently selected tab is playing some videos or playlist then it will block automatic sleep and lock.

- If you select another tab different from the one playing video, then blocking automatic sleep and lock will be disabled.

- Even if the current selected tab plays some video and you click on minimize button then blocking sleep and lock will be disabled.

- Playing audio will never block automatic sleep and lock even if the tab playing it is the one currently selected and viewed at top of all apps.

---

<div class="post-metadata">

**Author:** ![Punk9216](https://discuss-cdn.kde.org/user_avatar/discuss.kde.org/punk9216/32/4112_2.png) [@Punk9216](https://discuss.kde.org/u/Punk9216)\
**Post date:** [October 29, 2024, 9:12pm UTC](https://discuss.kde.org/t/standby-then-hibernate-doesnt-work/16194/15 "2024-10-29T21:12:03Z")

</div>

Did some more testing today and in KJournald i found a hint at the real cause for this behaviour.

When i start the application menu and select the standby there, i can see that the laptop only enters suspend mode (Kjournald says: The system will suspend now!  
But when i press the power button of my laptop, which i configured to be the same “standby”, KJournald says: The system will suspend and later hibernate now!

Dunno why the button seems to trigger this but the suspend/standby-icon in application menu doesnt… Maybe someone got an idea.

For the real test, im gonna press the power button this time to see, if it really goes into hibernation after some time.
