Hibernate and suspend not working

Hi!

When I use the “Hibernate” option in the application menu or when I use

systemctl hibernate

the computer restarts.

Some info:

Lines that contain “hibernate” in the journalctl:

Feb 07 19:52:03 opensuse-gabriel systemd[1]: Starting Resume from hibernation using device /dev/disk/by-uuid/04a7e2b9-690f-4865-85f8-948f9d0d5089...
Feb 07 19:52:03 opensuse-gabriel systemd-hibernate-resume[381]: Could not resume from '/dev/disk/by-uuid/04a7e2b9-690f-4865-85f8-948f9d0d5089' (8:21>
Feb 07 19:52:03 opensuse-gabriel kernel: PM: Image not found (code -22)
Feb 07 19:52:03 opensuse-gabriel systemd[1]: Started Resume from hibernation using device /dev/disk/by-uuid/04a7e2b9-690f-4865-85f8-948f9d0d5089.
$ sudo lsblk -f
NAME   FSTYPE   LABEL    UUID                                 FSAVAIL FSUSE% MOUNTPOINT
loop0  squashfs                                                     0   100% /snap/core/4917
sda                                                                          
├─sda1 ntfs     Recovery 96E8B907E8B8E6A1                                    
├─sda2 vfat     ESP      AABB-0E31                                           
├─sda3                                                                       
├─sda4 ntfs     Acer     5ADAE067DAE040BD                                    
├─sda5 ntfs              38DA108BDA104810                                    
├─sda6 btrfs             386575c5-61fe-47a3-ad44-31cfac95c944   23,6G    53% /
└─sda7 vfat              CB9D-C53F                             270,8M     2% /boot/efi
sdb                                                                          
├─sdb1 ntfs     Recovery 96E8B907E8B8E6A1                                    
├─sdb2 vfat     ESP      AABB-0E31                                           
├─sdb3                                                                       
├─sdb4 ntfs     HDD      825E441D5E440BFB                                    
├─sdb5 swap              04a7e2b9-690f-4865-85f8-948f9d0d5089                [SWAP]
└─sdb6 ext4              1b3d5cb3-225b-4aa1-b962-a509e69e21d4  149,9G    31% /home


**sudo cat /proc/cmdline**
BOOT_IMAGE=/boot/vmlinuz-4.20.2-1-default root=UUID=386575c5-61fe-47a3-ad44-31cfac95c944 resume=/dev/disk/by-uuid/04a7e2b9-690f-4865-85f8-948f9d0d5089 splash=silent quiet

**sudo blkid | grep -i swap**
/dev/sdb5: UUID="04a7e2b9-690f-4865-85f8-948f9d0d5089" TYPE="swap" PARTUUID="ba3a28b6-4235-4e95-8373-0e2a7a57341b"

That means that the system memory image was not created or not saved to disk for some reason.
That might be due to a swap partition too small (less than the available RAM size, say) or some hardware that refuses to go to sleep nicely so that the suspend to disk never completes or other hiccups…
Please see a somewhat similar thread here https://forums.opensuse.org/showthread.php/533911-Issue-where-Leap-15-does-not-always-hibernate
Describing your hardware in more detail (CPU model, graphics model, any odd peripheral or USB hub you may have in use…) may help us offer useful tips.

sudo lspci
[sudo] password for root:
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor DRAM Controller (rev 06)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06)
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)
00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05)
00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 05)
00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05)
00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 (rev d5)
00:1c.3 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #4 (rev d5)
00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 05)
00:1f.0 ISA bridge: Intel Corporation HM86 Express LPC Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 05)
00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 05)
01:00.0 3D controller: NVIDIA Corporation GM107M [GeForce GTX 960M] (rev ff)
07:00.0 Network controller: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter (rev 20)
08:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)

Also, my swap partition has 9GB and I have 8 Gb Ram.

The tread mentioned earlier is mine. What sorted it for me was adding nomodeset to grub, now my wife’s laptop hibernates fine. At least worth trying it as a test.

Stuart

YEP! That looks remarkably similar to the HW I’m writing from!
Interestingly, If I try “systemctl hibernate” everything works fine and if I look at dmesg around the time of hibernate and resume I see:

...
 4727.595424] smpboot: CPU 7 is now offline
 4727.595683] PM: Creating hibernation image:
 4727.739814] PM: Need to copy 1174141 pages
 4727.739816] PM: Normal pages needed: 1174141 + 1024, available pages: 2991448
 4727.596641] PM: Restoring platform NVS memory
 4727.597747] ACPI : EC: EC started
 4727.598021] Suspended for 47.696 seconds
 4727.598062] Enabling non-boot CPUs ...
 4727.598127] x86: Booting SMP configuration:
 4727.598128] smpboot: Booting Node 0 Processor 1 APIC 0x2
 4727.598661]  cache: parent cpu1 should not be sleeping
 4727.599045] CPU1 is up
 4727.599102] smpboot: Booting Node 0 Processor 2 APIC 0x4
 4727.599638]  cache: parent cpu2 should not be sleeping
 4727.599895] CPU2 is up
...

BUT if I try that a second time the system ends up in a kernel panic, I have to press the power button and on the next boot I see in dmesg:

    1.906811] PM: Starting manual resume from disk
    1.906813] PM: Hibernation image partition 8:4 present
    1.906813] PM: Looking for hibernation image.
    1.907012] PM: Image not found (code -22)
    1.907012] PM: Hibernation image not present or could not be loaded.

and that is remarkably similar to what you witness.
I suspect that the Nvidia GTX 960M and the “Optimus” logic around it be involved in that hiccup, but since I’m currently on Leap 15, maybe you are better off waiting for somebody actually using Tumbleweed for a deeper debug.

I added nomodeset to the grub, but didn’t worked though. Actually, bizzare things happened. All menus and panels became transparent and the graphics performance of my laptop droped a lot. Like, google maps was slow.