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.
2 Likes

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.

Same problem here but I’ve checked my file `/etc/systemd/sleep.conf``and I have:

HibernateMode=platform shutdown

So I guess the reason is different?
What dmsg gives me:

[Tue Mar  7 22:25:11 2023] PM: hibernation: hibernation exit
[Tue Mar  7 22:25:11 2023] audit: type=1131 audit(1678192434.875:511): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[Tue Mar  7 22:25:13 2023] audit: type=1130 audit(1678192436.631:512): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-hibernate comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
[Tue Mar  7 22:25:13 2023] Generic FE-GE Realtek PHY r8169-0-1b00:00: attached PHY driver (mii_bus:phy_addr=r8169-0-1b00:00, irq=MAC)
[Tue Mar  7 22:25:13 2023] r8169 0000:1b:00.0 enp27s0: Link is Down
[Tue Mar  7 22:25:15 2023] wlp28s0: authenticate with 50:39:2f:6f:7e:f0
[Tue Mar  7 22:25:16 2023] wlp28s0: send auth to 50:39:2f:6f:7e:f0 (try 1/3)
[Tue Mar  7 22:25:16 2023] wlp28s0: authenticated
[Tue Mar  7 22:25:16 2023] wlp28s0: associate with 50:39:2f:6f:7e:f0 (try 1/3)
[Tue Mar  7 22:25:16 2023] wlp28s0: RX AssocResp from 50:39:2f:6f:7e:f0 (capab=0x1411 status=0 aid=1)
[Tue Mar  7 22:25:16 2023] wlp28s0: associated
[Tue Mar  7 22:25:16 2023] wlp28s0: Limiting TX power to 20 (20 - 0) dBm as advertised by 50:39:2f:6f:7e:f0
[Tue Mar  7 22:25:16 2023] IPv6: ADDRCONF(NETDEV_CHANGE): wlp28s0: link becomes ready
[Tue Mar  7 22:25:16 2023] audit: type=1334 audit(1678192439.508:513): prog-id=168 op=LOAD
[Tue Mar  7 22:25:16 2023] audit: type=1300 audit(1678192439.508:513): arch=c000003e syscall=321 success=yes exit=26 a0=5 a1=7ffe5f75e440 a2=90 a3=26 items=0 ppid=1 pid=716 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="NetworkManager" exe="/usr/bin/NetworkManager" key=(null)
[Tue Mar  7 22:25:16 2023] audit: type=1327 audit(1678192439.508:513): proctitle=2F7573722F62696E2F4E6574776F726B4D616E61676572002D2D6E6F2D6461656D6F6E
[Tue Mar  7 22:25:16 2023] audit: type=1130 audit(1678192439.844:514): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[Tue Mar  7 22:25:26 2023] audit: type=1131 audit(1678192449.854:515): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[Tue Mar  7 23:01:48 2023] audit: type=1130 audit(1678194631.158:516): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[Tue Mar  7 23:01:48 2023] wlp28s0: deauthenticating from 50:39:2f:6f:7e:f0 by local choice (Reason: 3=DEAUTH_LEAVING)
[Tue Mar  7 23:01:49 2023] audit: type=1334 audit(1678194631.955:517): prog-id=168 op=UNLOAD
[Tue Mar  7 23:01:51 2023] PM: suspend entry (deep)
[Tue Mar  7 23:01:51 2023] Filesystems sync: 0.609 seconds
[Tue Mar  7 23:01:51 2023] Freezing user space processes ... (elapsed 0.002 seconds) done.
[Tue Mar  7 23:01:51 2023] OOM killer disabled.
[Tue Mar  7 23:01:51 2023] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[Tue Mar  7 23:01:51 2023] printk: Suspending console(s) (use no_console_suspend to debug)
[Tue Mar  7 23:01:51 2023] serial 00:05: disabled
[Tue Mar  7 23:01:51 2023] parport_pc 00:04: disabled
[Tue Mar  7 23:01:51 2023] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[Tue Mar  7 23:01:51 2023] sd 0:0:0:0: [sda] Stopping disk
[Tue Mar  7 23:01:51 2023] sd 1:0:0:0: [sdb] Synchronizing SCSI cache
[Tue Mar  7 23:01:51 2023] sd 1:0:0:0: [sdb] Stopping disk
[Tue Mar  7 23:01:52 2023] [drm] psp gfx command UNLOAD_TA(0x2) failed and response status is (0x117)
[Tue Mar  7 23:01:52 2023] [drm] free PSP TMR buffer
[Tue Mar  7 23:01:52 2023] ACPI: PM: Preparing to enter system sleep state S3
[Tue Mar  7 23:01:53 2023] ACPI: PM: Saving platform NVS memory
[Tue Mar  7 23:01:53 2023] Disabling non-boot CPUs ...
[Tue Mar  7 23:01:53 2023] smpboot: CPU 1 is now offline
[Tue Mar  7 23:01:53 2023] smpboot: CPU 2 is now offline
[Tue Mar  7 23:01:53 2023] smpboot: CPU 3 is now offline
[Tue Mar  7 23:01:53 2023] ACPI: PM: Low-level resume complete
[Tue Mar  7 23:01:53 2023] ACPI: PM: Restoring platform NVS memory
[Tue Mar  7 23:01:57 2023] Enabling non-boot CPUs ...
[Tue Mar  7 23:01:57 2023] x86: Booting SMP configuration:
[Tue Mar  7 23:01:57 2023] smpboot: Booting Node 0 Processor 1 APIC 0x2
[Tue Mar  7 23:01:57 2023] microcode: CPU1: patch_level=0x0810100b
[Tue Mar  7 23:01:57 2023] ACPI: \_PR_.C002: Found 2 idle states
[Tue Mar  7 23:01:57 2023] CPU1 is up
[Tue Mar  7 23:01:57 2023] smpboot: Booting Node 0 Processor 2 APIC 0x1
[Tue Mar  7 23:01:57 2023] microcode: CPU2: patch_level=0x0810100b
[Tue Mar  7 23:01:57 2023] ACPI: \_PR_.C001: Found 2 idle states
[Tue Mar  7 23:01:57 2023] CPU2 is up
[Tue Mar  7 23:01:57 2023] smpboot: Booting Node 0 Processor 3 APIC 0x3
[Tue Mar  7 23:01:57 2023] microcode: CPU3: patch_level=0x0810100b
[Tue Mar  7 23:01:57 2023] ACPI: \_PR_.C003: Found 2 idle states
[Tue Mar  7 23:01:57 2023] CPU3 is up
[Tue Mar  7 23:01:57 2023] ACPI: PM: Waking up from system sleep state S3
[Tue Mar  7 23:01:57 2023] xhci_hcd 0000:15:00.0: xHC error in resume, USBSTS 0x401, Reinit

It looks like it hibernates and then immediately starting up again!