Hibernation stops computer but restart does not restore programs, starts new session instead

If I open Nemo and then press the Hibernate button in the main menu of the taskbar in Cinnamon then I restart the computer, the Nemo window does not show up anymore and programs that start at the first login event that I have closed are shown again.

Relevant topic: Need help diagnosing failed hibernation.

Startup programs:

After this failed hibernation and restart of the computer I get:

❯ sudo journalctl -u systemd-hibernate.service
oct 07 23:03:54 silviu-omenbyhplaptop17cb0xxx systemd[1]: Starting Hibernate...
oct 07 23:03:54 silviu-omenbyhplaptop17cb0xxx systemd-sleep[70083]: Entering sleep state 'hibernate'...
-- Boot aeb9fa44a31344329dc81b2850a56692 --
oct 08 15:17:14 silviu-omenbyhplaptop17cb0xxx systemd[1]: Starting Hibernate...
oct 08 15:17:14 silviu-omenbyhplaptop17cb0xxx systemd-sleep[10366]: Entering sleep state 'hibernate'...

❯ free -m
               total        used        free      shared  buff/cache   available
Mem:           15874        1615       10508          14        3750       13909
Swap:          19999           0       19999

❯ sudo systemctl status hibernate.target
○ hibernate.target - System Hibernation
     Loaded: loaded (/usr/lib/systemd/system/hibernate.target; static)
     Active: inactive (dead)
       Docs: man:systemd.special(7)

❯ ls /usr/lib/systemd/system-sleep
nvidia*  tlp*

❯ cat /usr/lib/systemd/system-sleep/nvidia
#!/bin/sh

case "$1" in
    post)
        /usr/bin/nvidia-sleep.sh "resume"
        ;;
esac

❯ cat /usr/lib/systemd/system-sleep/tlp
#!/bin/sh

# tlp - systemd suspend/resume hook
#
# Copyright (c) 2022 Thomas Koch <linrunner at gmx.net> and others.
# This software is licensed under the GPL v2 or later.

case $1 in
    pre)  tlp suspend ;;
    post) tlp resume  ;;
esac

❯ ls /etc/systemd/system/sleep.target.wants
ls: '/etc/systemd/system/sleep.target.wants' nu poate fi accesat: No such file or directory

System info

System:
  Kernel: 5.15.65-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.2.0 Desktop: Cinnamon
    v: 5.4.10 tk: GTK v: 3.24.34 dm: GDM Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: HP product: OMEN by HP Laptop 17-cb0xxx v: N/A serial: <superuser required>
    Chassis: type: 10 serial: <superuser required>
  Mobo: HP model: 8603 v: 45.40 serial: <superuser required> UEFI: AMI v: F.23 date: 02/18/2020
Battery:
  Device-1: hidpp_battery_0 model: Logitech Wireless Mouse M275/M280 serial: <filter> charge: 55%
    (should be ignored) status: discharging
CPU:
  Info: 6-core model: Intel Core i7-9750H bits: 64 type: MT MCP arch: Coffee Lake level: v3 rev: A
    cache: L1: 384 KiB L2: 1.5 MiB L3: 12 MiB
  Speed (MHz): avg: 4106 high: 4161 min/max: 800/4500 cores: 1: 4113 2: 4062 3: 4115 4: 4111
    5: 4115 6: 4087 7: 4089 8: 4099 9: 4087 10: 4111 11: 4123 12: 4161 bogomips: 62431
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: NVIDIA TU106M [GeForce RTX 2060 Mobile] vendor: Hewlett-Packard driver: nvidia
    v: 515.65.01 arch: Turing pcie: speed: 8 GT/s lanes: 16 bus-ID: 01:00.0 chip-ID: 10de:1f11
  Display: x11 server: X.Org v: 21.1.4 with: Xwayland v: 22.1.3 driver: X: loaded: nvidia
    gpu: nvidia display-ID: :1 screens: 1
  Screen-1: 0 s-res: 1680x1050 s-dpi: 99
  Monitor-1: HDMI-0 res: 1680x1050 dpi: 99 diag: 508mm (19.99")
  OpenGL: renderer: NVIDIA GeForce RTX 2060/PCIe/SSE2 v: 4.6.0 NVIDIA 515.65.01
    direct render: Yes
Audio:
  Device-1: Intel Cannon Lake PCH cAVS vendor: Hewlett-Packard driver: snd_hda_intel v: kernel
    bus-ID: 1-3.1.1:8 chip-ID: 0d8c:000c bus-ID: 00:1f.3 chip-ID: 8086:a348
  Device-2: NVIDIA TU106 High Definition Audio vendor: Hewlett-Packard driver: snd_hda_intel
    v: kernel pcie: speed: 8 GT/s lanes: 16 bus-ID: 01:00.1 chip-ID: 10de:10f9
  Device-3: C-Media Audio Adapter type: USB driver: hid-generic,snd-usb-audio,usbhid
  Sound Server-1: ALSA v: k5.15.65-1-MANJARO running: yes
  Sound Server-2: sndio v: N/A running: no
  Sound Server-3: JACK v: 1.9.21 running: no
  Sound Server-4: PulseAudio v: 16.1 running: yes
  Sound Server-5: PipeWire v: 0.3.57 running: yes
Network:
  Device-1: Intel Cannon Lake PCH CNVi WiFi driver: iwlwifi v: kernel bus-ID: 00:14.3
    chip-ID: 8086:a370
  IF: wlp0s20f3 state: down mac: <filter>
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Hewlett-Packard
    driver: r8169 v: kernel pcie: speed: 2.5 GT/s lanes: 1 port: 3000 bus-ID: 3c:00.0
    chip-ID: 10ec:8168
  IF: enp60s0 state: up speed: 100 Mbps duplex: full mac: <filter>
  IF-ID-1: br-03d7cffb8eac state: down mac: <filter>
  IF-ID-2: br-1a059270729a state: down mac: <filter>
  IF-ID-3: br-2456e330b522 state: down mac: <filter>
  IF-ID-4: br-28a5ada02005 state: down mac: <filter>
  IF-ID-5: br-29b8debfd706 state: down mac: <filter>
  IF-ID-6: br-2d43081f1766 state: down mac: <filter>
  IF-ID-7: br-33b2ff8b1dea state: down mac: <filter>
  IF-ID-8: br-3aeac45b8ba1 state: down mac: <filter>
  IF-ID-9: br-44b56c34d827 state: down mac: <filter>
  IF-ID-10: br-471d57f337fe state: down mac: <filter>
  IF-ID-11: br-492cf1db5d11 state: down mac: <filter>
  IF-ID-12: br-4ed8977b4f26 state: down mac: <filter>
  IF-ID-13: br-575437368d89 state: down mac: <filter>
  IF-ID-14: br-81ea752696cf state: down mac: <filter>
  IF-ID-15: br-82867fe8ed8f state: down mac: <filter>
  IF-ID-16: br-8906ec7c872a state: down mac: <filter>
  IF-ID-17: br-8d391e292555 state: down mac: <filter>
  IF-ID-18: br-8e2f0f583274 state: down mac: <filter>
  IF-ID-19: br-9cdb3afec4d2 state: down mac: <filter>
  IF-ID-20: br-a6f1fbe06746 state: down mac: <filter>
  IF-ID-21: br-abf85b3124ff state: down mac: <filter>
  IF-ID-22: br-b0186898f5ce state: down mac: <filter>
  IF-ID-23: br-b396320647a9 state: down mac: <filter>
  IF-ID-24: br-c561c1409b8e state: down mac: <filter>
  IF-ID-25: br-cfab67bdf823 state: down mac: <filter>
  IF-ID-26: br-d7ea6c69f903 state: down mac: <filter>
  IF-ID-27: br-f7aac0d39dcc state: down mac: <filter>
  IF-ID-28: docker0 state: down mac: <filter>
Bluetooth:
  Device-1: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: USB driver: btusb v: 0.8
    bus-ID: 1-14:5 chip-ID: 8087:0aaa
  Report: rfkill ID: hci0 rfk-id: 1 state: down bt-service: enabled,running rfk-block:
    hardware: no software: yes address: see --recommends
RAID:
  Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci v: 3.0 bus-ID: 00:17.0
    chip-ID: 8086:282a
Drives:
  Local Storage: total: 1.84 TiB used: 644.81 GiB (34.2%)
  ID-1: /dev/nvme0n1 vendor: Samsung model: MZVLB1T0HBLR-000H1 size: 953.87 GiB speed: 31.6 Gb/s
    lanes: 4 serial: <filter> temp: 39.9 C
  ID-2: /dev/sda type: USB vendor: Samsung model: PSSD T7 Touch size: 931.51 GiB
    serial: <filter>
Partition:
  ID-1: / size: 566.22 GiB used: 475.64 GiB (84.0%) fs: ext4 dev: /dev/nvme0n1p1
  ID-2: /boot/efi size: 4.65 GiB used: 312 KiB (0.0%) fs: vfat dev: /dev/nvme0n1p6
Swap:
  ID-1: swap-1 type: partition size: 19.53 GiB used: 5.2 MiB (0.0%) priority: -2
    dev: /dev/nvme0n1p7
Sensors:
  System Temperatures: cpu: N/A mobo: N/A gpu: nvidia temp: 43 C
  Fan Speeds (RPM): N/A
Repos:
  Packages: 2239 pm: pacman pkgs: 2203 pm: flatpak pkgs: 25 pm: snap pkgs: 11
  Active pacman repo servers in: /etc/pacman.d/mirrorlist
    1: https: //mirror.moson.org/manjaro/stable/$repo/$arch
    2: https: //mirror.dkm.cz/manjaro/stable/$repo/$arch
    3: https: //mirror.cyberhost.uk/sites/manjaro/stable/$repo/$arch
    4: http: //ftp.free.org/mirrors/repo.manjaro.org/repos/stable/$repo/$arch
    5: https: //mirror.zetup.net/manjaro/stable/$repo/$arch
    6: http: //mirror.xeonbd.com/manjaro/stable/$repo/$arch
    7: https: //mirror.math.princeton.edu/pub/manjaro/stable/$repo/$arch
    8: https: //mirror1.cl.netactuate.com/manjaro/stable/$repo/$arch
Info:
  Processes: 414 Uptime: 3h 16m Memory: 15.5 GiB used: 13.08 GiB (84.4%) Init: systemd v: 251
  default: graphical Compilers: gcc: 12.2.0 clang: 14.0.6 Client: Cinnamon v: 5.4.10 inxi: 3.3.21

Please advice.

etc/mkinitcpio.conf

HOOKS=(base udev autodetect modconf block filesystems keyboard fsck resume)

resume must be at the end like above, worked for me hope it helps.

1 Like

Duplicate of this topic, I guess… Anyway, this helped me when I had the same problem:

3 Likes

How do I put the swap partition in /etc/fstab?

In /etc/fstab I have these contents:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=d6a72d1f-3160-46db-80c7-2c374ed21471 /              ext4    defaults,noatime 0 1
UUID=5F82-1308                            /boot/efi      vfat    umask=0077 0 2

Read this: Swap - ArchWiki

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.