Hibernate mode - power is not turned off

The problem appeared on the Linux kernel 6.0.11-1.
systemctl hibernate command succeeds, but laptop power does not turn off, requires hard shutdown.
After starting, the session is restored successfully, in the logs I see:

12/15/2022 05:40 PM systemd Starting Hibernate...
12/15/2022 05:40 PM systemd-sleep Entering sleep state 'hibernate'...
12/15/2022 5:46 PM audit SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-hibernate comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
12/15/2022 5:46 PM audit SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-hibernate comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
12/15/2022 5:46 PM kernel audit: type=1130 audit(1671101206.940:288): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-hibernate comm="systemd" exe="/usr/ lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
12/15/2022 5:46 PM kernel audit: type=1131 audit(1671101206.940:289): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-hibernate comm="systemd" exe="/usr/ lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
12/15/2022 05:46 PM systemd systemd-hibernate.service: Deactivated successfully.
12/15/2022 05:46 PM systemd Finished Hibernate.
12/15/2022 5:46 PM systemd systemd-hibernate.service: Consumed 5.485s CPU time.
1 Like

i have the same problem here… Dell 5510… Kernel 6.0.11

Is the problem specific to this model? Dell G15 5510… Kernel upgraded from 6.0.11 to 6.1.0-1 but problem persists.

Hi there :wave: !

I have the same issue that you described but on a Lenovo Slim 7i Pro (14IHU5).

  • With kernels 5.15.x (LTS), it works properly
  • With kernels > 5.15 it does not

I have tried 5.17, 5.18, 5.19, and recently 6.x with the same behavior: The OS state and memory are written to disk properly and the resume step works. But in between, the laptop does not power off…

$ systemctl --version

systemd 251 (251.8-1-manjaro)
$ uname -a
Linux 5.15.85-1-MANJARO 
OS: Manjaro Linux x86_64 
Host: Yoga Slim 7 Pro 14IHU5 
Kernel: 5.15.85-1-MANJARO 
DE: GNOME 43.2 
WM: Mutter 
Theme: Adwaita-dark [GTK2/3] 
Icons: Adwaita [GTK2/3] 
CPU: 11th Gen Intel i7-11370H (8) @ 4.800GHz 
GPU: Intel TigerLake-LP GT2 [Iris Xe Graphics] 
Memory: 2807MiB / 15782MiB 

While searching for solutions, I found this GitHub issue from systemd that says that it is a kernel issue and nothing related to systemd (compared to other issues I stumbled upon these last days :sweat_smile: suspend-then-hibernate: add option to force early hibernate · Issue #25269 · systemd/systemd · GitHub).

Hi there :wave:!

Happy new year to all of you :sparkles:
I wish us luck :four_leaf_clover: for 2023 with that issue ^^

Here are my logs from yesterday evening with kernel 6.1.1-1-MANJARO

janv. 02 22:35:35 systemd[1]: Reached target Sleep.
janv. 02 22:35:35 systemd[1]: Starting Hibernate...
janv. 02 22:35:35 systemd-sleep[29763]: Entering sleep state 'hibernate'...
janv. 02 22:35:35 kernel: PM: hibernation: hibernation entry
-------------------------------------------------------------
Nothing in between, I had to manually power off my laptop by keeping pushing the power button ... 
Then, by opening the lid, the laptop started and resumed from hibernation with no issue.
-------------------------------------------------------------
janv. 03 11:29:16 kernel: Filesystems sync: 0.003 seconds
janv. 03 11:29:16 kernel: Freezing user space processes ... (elapsed 0.002 seconds) done.
janv. 03 11:29:16 kernel: OOM killer disabled.
janv. 03 11:29:16 kernel: PM: hibernation: Marking nosave pages: [mem 0x00000000-0x00000fff]
janv. 03 11:29:16 kernel: PM: hibernation: Marking nosave pages: [mem 0x0009f000-0x000fffff]
janv. 03 11:29:16 kernel: PM: hibernation: Marking nosave pages: [mem 0x3c162000-0x3c3c1fff]
janv. 03 11:29:16 kernel: PM: hibernation: Marking nosave pages: [mem 0x3d042000-0x3d042fff]
janv. 03 11:29:16 kernel: PM: hibernation: Marking nosave pages: [mem 0x40d99000-0x41698fff]
janv. 03 11:29:16 kernel: PM: hibernation: Marking nosave pages: [mem 0x434af000-0x45bfefff]
janv. 03 11:29:16 kernel: PM: hibernation: Marking nosave pages: [mem 0x45c00000-0xffffffff]
janv. 03 11:29:16 kernel: PM: hibernation: Basic memory bitmaps created
janv. 03 11:29:16 kernel: PM: hibernation: Preallocating image memory
janv. 03 11:29:16 kernel: PM: hibernation: Allocated 1570593 pages for snapshot
janv. 03 11:29:16 kernel: PM: hibernation: Allocated 6282372 kbytes in 0.59 seconds (10648.08 MB/s)
janv. 03 11:29:16 kernel: Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
janv. 03 11:29:16 kernel: printk: Suspending console(s) (use no_console_suspend to debug)
janv. 03 11:29:16 kernel: ACPI: EC: interrupt blocked
janv. 03 11:29:16 kernel: Disabling non-boot CPUs ...
janv. 03 11:29:16 kernel: smpboot: CPU 1 is now offline
janv. 03 11:29:16 kernel: smpboot: CPU 2 is now offline
janv. 03 11:29:16 kernel: smpboot: CPU 3 is now offline
janv. 03 11:29:16 kernel: smpboot: CPU 4 is now offline
janv. 03 11:29:16 kernel: smpboot: CPU 5 is now offline
janv. 03 11:29:16 kernel: smpboot: CPU 6 is now offline
janv. 03 11:29:16 kernel: smpboot: CPU 7 is now offline
janv. 03 11:29:16 kernel: PM: hibernation: Creating image:
janv. 03 11:29:16 kernel: PM: hibernation: Need to copy 1522723 pages
janv. 03 11:29:16 kernel: PM: hibernation: Normal pages needed: 1522723 + 1024, available pages: 2614761
janv. 03 11:29:16 kernel: Enabling non-boot CPUs ...
janv. 03 11:29:16 kernel: x86: Booting SMP configuration:
janv. 03 11:29:16 kernel: smpboot: Booting Node 0 Processor 1 APIC 0x2
janv. 03 11:29:16 kernel: CPU1 is up
...

to compare, here are the logs with kernel 5.15.85 where hibernation powers off the laptop properly

déc. 22 18:04:37 systemd-sleep[31684]: Entering sleep state 'hibernate'...
déc. 22 18:04:37 kernel: PM: suspend exit
déc. 22 18:04:37 kernel: PM: hibernation: hibernation entry
-------------------------------------------------------------
The laptop was shutdown properly on its own.
Then, by opening the lid, the laptop started and resumed from hibernation with no issue.
-------------------------------------------------------------
déc. 24 15:48:17 kernel: Filesystems sync: 0.001 seconds
déc. 24 15:48:17 kernel: Freezing user space processes ... (elapsed 0.001 seconds) done.
déc. 24 15:48:17 kernel: OOM killer disabled.
déc. 24 15:48:17 kernel: PM: hibernation: Marking nosave pages: [mem 0x00000000-0x00000fff]
déc. 24 15:48:17 kernel: PM: hibernation: Marking nosave pages: [mem 0x0009f000-0x000fffff]
déc. 24 15:48:17 kernel: PM: hibernation: Marking nosave pages: [mem 0x3c162000-0x3c3c1fff]

Not very verbose :thinking:
Does anyone have an idea how to troubleshoot this one?

Many thanks in advance!

PS: I have the same version of systemd in both cases (v251.8-1-manjaro), but only the Kernel and Initramfs differ.

Hi there :wave: !

Sorry for dropping questions here with no real contribution but it is driving me crazy :sweat_smile:

:question: Nobody is facing such an issue?
:question: Does someone use hibernate to disk with a laptop and is it working properly?

Many thanks to any good soul that will spend some time helping us :pray:


Update

Ok i found out on my system what the issue was :sweat:

I though being smart by “enforcing” the shutdown behavior in /etc/systemd/sleep.conf.d/01-myconf.conf

[Sleep]
# Define the method of suspend, also used by suspend-then-hibernate.
SuspendMode=suspend
SuspendState=mem

HibernateMode=shutdown  <-----
HibernateState=disk
...

But after eating the frog and doing the steps recommended in Debugging hibernation and suspend — The Linux Kernel documentation , I was kicked by Chapter1 line 5 :sweat_smile:

Moreover, hibernating in the “reboot” and “shutdown” modes causes the PM core to skip some platform-related callbacks which on ACPI systems might be necessary to make hibernation work. Thus, if your machine fails to hibernate or resume in the “reboot” mode, you should try the “platform” mode.

And indeed, using platform mode works …

I hope that will help somebody else too.