Hibernation does not work with Plasma and Kernel 6.12.21-4-MANJARO

Hibernation blackens the screen disabling any interaction except forced turn off, and on turn on the previous session is lost.

uname -a:

Linux silviu-omenbyhplaptop17cb0xxx 6.12.21-4-MANJARO #1 SMP PREEMPT_DYNAMIC Tue, 01 Apr 2025 18:45:30 +0000 x86_64 GNU/Linux

I’ve put resume in the /etc/mkinitcpio.conf. Now the computer shuts down when selecting Hibernate, but the session is still lost.

$ sudo journalctl -u systemd-hibernate.service
apr 07 00:29:18 silviu-omenbyhplaptop17cb0xxx systemd[1]: Starting System Hibernate...
apr 07 00:29:18 silviu-omenbyhplaptop17cb0xxx systemd-sleep[34878]: Successfully froze unit 'user.slice'.
apr 07 00:29:18 silviu-omenbyhplaptop17cb0xxx systemd-sleep[34878]: Performing sleep operation 'hibernate'...
-- Boot f6d23ccc908f4aa7b43771b636865084 --
apr 18 17:01:45 silviu-omenbyhplaptop17cb0xxx systemd[1]: Starting System Hibernate...
apr 18 17:01:45 silviu-omenbyhplaptop17cb0xxx systemd-sleep[51765]: Successfully froze unit 'user.slice'.
apr 18 17:01:45 silviu-omenbyhplaptop17cb0xxx systemd-sleep[51765]: Performing sleep operation 'hibernate'...
apr 18 17:02:01 silviu-omenbyhplaptop17cb0xxx systemd[1]: systemd-hibernate.service: Main process exited, code=exited, status=1/FAILURE
apr 18 17:02:01 silviu-omenbyhplaptop17cb0xxx systemd[1]: systemd-hibernate.service: Failed with result 'exit-code'.
apr 18 17:02:01 silviu-omenbyhplaptop17cb0xxx systemd[1]: Failed to start System Hibernate.
apr 18 17:02:01 silviu-omenbyhplaptop17cb0xxx systemd[1]: systemd-hibernate.service: Consumed 6.564s CPU time, 1.8M memory peak, 916K memory swap peak.
-- Boot 337c62a822274541933ef3ece4014d92 --
apr 26 14:22:46 silviu-omenbyhplaptop17cb0xxx systemd[1]: Starting System Hibernate...
apr 26 14:22:46 silviu-omenbyhplaptop17cb0xxx systemd-sleep[1294137]: Successfully froze unit 'user.slice'.
apr 26 14:22:46 silviu-omenbyhplaptop17cb0xxx systemd-sleep[1294137]: Performing sleep operation 'hibernate'...
-- Boot ee386c62f7114ec68e956334d8f28b59 --
apr 26 14:23:59 silviu-omenbyhplaptop17cb0xxx systemd[1]: Starting System Hibernate...
apr 26 14:23:59 silviu-omenbyhplaptop17cb0xxx systemd-sleep[2078]: Successfully froze unit 'user.slice'.
apr 26 14:23:59 silviu-omenbyhplaptop17cb0xxx systemd-sleep[2078]: Performing sleep operation 'hibernate'...
$ cat /sys/power/mem_sleep
s2idle [deep]

swapon:

NAME           TYPE       SIZE USED PRIO
/dev/nvme0n1p7 partition 19,5G   0B   -2

/etc/mkinitcpio.conf as installed by Manjaro Installer and added resume option:

HOOKS=(base udev autodetect microcode kms modconf block keyboard keymap consolefont plymouth filesystems fsck resume)

/etc/default/grub

# GRUB boot loader configuration

GRUB_DEFAULT=saved
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR='Manjaro'
GRUB_CMDLINE_LINUX_DEFAULT='quiet splash udev.log_priority=3'
GRUB_CMDLINE_LINUX=""

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y

# Set to 'countdown' or 'menu' to change timeout behavior,
# press ESC key to display menu.
GRUB_TIMEOUT_STYLE=hidden

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command 'videoinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
GRUB_COLOR_NORMAL="light-gray/black"
GRUB_COLOR_HIGHLIGHT="green/black"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/usr/share/grub/background.png"
GRUB_THEME="/usr/share/grub/themes/manjaro/theme.txt"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

# Uncomment to make GRUB remember the last selection. This requires
# setting 'GRUB_DEFAULT=saved' above.
GRUB_SAVEDEFAULT=true

# Uncomment to disable submenus in boot menu
#GRUB_DISABLE_SUBMENU=y

# Uncomment this option to enable os-prober execution in the grub-mkconfig command
GRUB_DISABLE_OS_PROBER=false

# Uncomment to ensure that the root filesystem is mounted read-only so that
# systemd-fsck can run the check automatically. We use 'fsck' by default, which
# needs 'rw' as boot parameter, to avoid delay in boot-time. 'fsck' needs to be
# removed from 'mkinitcpio.conf' to make 'systemd-fsck' work.
# See also Arch-Wiki: https://wiki.archlinux.org/index.php/Fsck#Boot_time_checking
#GRUB_ROOT_FS_RO=true

/etc/systemd/sleep.conf

#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it under the
#  terms of the GNU Lesser General Public License as published by the Free
#  Software Foundation; either version 2.1 of the License, or (at your option)
#  any later version.
#
# Entries in this file show the compile time defaults. Local configuration
# should be created by either modifying this file (or a copy of it placed in
# /etc/ if the original file is shipped in /usr/), or by creating "drop-ins" in
# the /etc/systemd/sleep.conf.d/ directory. The latter is generally
# recommended. Defaults can be restored by simply deleting the main
# configuration file and all drop-ins located in /etc/.
#
# Use 'systemd-analyze cat-config systemd/sleep.conf' to display the full config.
#
# See systemd-sleep.conf(5) for details.

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

inxy -Fazy:

System:
  Kernel: 6.12.21-4-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 14.2.1
    clocksource: tsc avail: acpi_pm
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.12-x86_64
    root=UUID=5c4cde37-dac8-41e3-95c6-7b79465ca0fe rw quiet splash
    udev.log_priority=3
  Desktop: KDE Plasma v: 6.3.4 tk: Qt v: N/A info: frameworks v: 6.12.0
    wm: kwin_x11 vt: 2 dm: SDDM Distro: Manjaro 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>
    part-nu: 8RT96EA#AKE uuid: <superuser required> UEFI: AMI v: F.23
    date: 02/18/2020
Battery:
  Device-1: hidpp_battery_0 model: Logitech Wireless Mouse B330/M330/M331
    serial: <filter> charge: 55% (should be ignored) rechargeable: yes
    status: discharging
CPU:
  Info: model: Intel Core i7-9750H bits: 64 type: MT MCP arch: Coffee Lake
    gen: core 9 level: v3 note: check built: 2018 process: Intel 14nm family: 6
    model-id: 0x9E (158) stepping: 0xA (10) microcode: 0xFA
  Topology: cpus: 1x dies: 1 clusters: 6 cores: 6 threads: 12 tpc: 2
    smt: enabled cache: L1: 384 KiB desc: d-6x32 KiB; i-6x32 KiB L2: 1.5 MiB
    desc: 6x256 KiB L3: 12 MiB desc: 1x12 MiB
  Speed (MHz): avg: 800 min/max: 800/4500 scaling: driver: intel_pstate
    governor: powersave cores: 1: 800 2: 800 3: 800 4: 800 5: 800 6: 800 7: 800
    8: 800 9: 800 10: 800 11: 800 12: 800 bogomips: 62431
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: gather_data_sampling mitigation: Microcode
  Type: itlb_multihit status: KVM: Split huge pages
  Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT
    vulnerable
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed mitigation: IBRS
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: IBRS; IBPB: conditional; STIBP: conditional;
    RSB filling; PBRSB-eIBRS: Not affected; BHI: Not affected
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA TU106M [GeForce RTX 2060 Mobile] vendor: Hewlett-Packard
    driver: nouveau v: kernel non-free: 550-570.xx+ status: current (as of
    2025-04; EOL~2026-12-xx) arch: Turing code: TUxxx process: TSMC 12nm FF
    built: 2018-2022 pcie: gen: 1 speed: 2.5 GT/s lanes: 16 link-max: gen: 3
    speed: 8 GT/s ports: active: eDP-1 empty: DP-1,DP-2,HDMI-A-1
    bus-ID: 01:00.0 chip-ID: 10de:1f11 class-ID: 0300
  Device-2: Cheng Uei Precision Industry (Foxlink) HP Wide Vision HD
    Integrated Webcam driver: uvcvideo type: USB rev: 2.0 speed: 480 Mb/s
    lanes: 1 mode: 2.0 bus-ID: 1-5:4 chip-ID: 05c8:03bc class-ID: 0e02
  Display: x11 server: X.Org v: 21.1.16 with: Xwayland v: 24.1.6
    compositor: kwin_x11 driver: X: loaded: modesetting alternate: fbdev,vesa
    dri: nouveau gpu: nouveau display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
    s-diag: 582mm (22.93") monitors: <missing: xrandr>
  Monitor-1: eDP-1 model: ChiMei InnoLux 0x1774 built: 2020 res: 1920x1080
    dpi: 128 gamma: 1.2 size: 381x214mm (15x8.43") diag: 437mm (17.2")
    ratio: 16:9 modes: max: 1920x1080 min: 640x350
  API: EGL v: 1.5 hw: drv: nvidia nouveau platforms: device: 0 drv: nouveau
    device: 1 drv: swrast gbm: drv: nouveau surfaceless: drv: nouveau x11:
    drv: nouveau inactive: wayland
  API: OpenGL v: 4.5 compat-v: 4.3 vendor: mesa v: 25.0.3-arch1.1 glx-v: 1.4
    direct-render: yes renderer: NV166 device-ID: 10de:1f11 memory: 5.85 GiB
    unified: no
  API: Vulkan v: 1.4.309 layers: N/A device: 0 type: discrete-gpu name: NVIDIA
    GeForce RTX 2060 (NVK TU106) driver: mesa nvk v: 25.0.3-arch1.1
    device-ID: 10de:1f11 surfaces: xcb,xlib
  Info: Tools: api: clinfo, eglinfo, glxinfo, vulkaninfo
    de: kscreen-console,kscreen-doctor wl: wayland-info x11: xdpyinfo,xprop
Audio:
  Device-1: Intel Cannon Lake PCH cAVS vendor: Hewlett-Packard
    driver: sof-audio-pci-intel-cnl alternate: snd_hda_intel, snd_soc_avs,
    snd_sof_pci_intel_cnl bus-ID: 00:1f.3 chip-ID: 8086:a348 class-ID: 0401
  Device-2: NVIDIA TU106 High Definition Audio vendor: Hewlett-Packard
    driver: snd_hda_intel v: kernel pcie: gen: 2 speed: 5 GT/s lanes: 16
    link-max: gen: 3 speed: 8 GT/s bus-ID: 01:00.1 chip-ID: 10de:10f9
    class-ID: 0403
  API: ALSA v: k6.12.21-4-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: JACK v: 1.9.22 status: off tools: N/A
  Server-2: PipeWire v: 1.4.1 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel Cannon Lake PCH CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3 chip-ID: 8086:a370 class-ID: 0280
  IF: wlp0s20f3 state: up mac: <filter>
  Device-2: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: Hewlett-Packard driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s
    lanes: 1 port: 3000 bus-ID: 3c:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp60s0 state: down mac: <filter>
  Info: services: httpd, NetworkManager, systemd-timesyncd, wpa_supplicant
Bluetooth:
  Device-1: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) driver: btusb v: 0.8
    type: USB rev: 2.0 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-14:5
    chip-ID: 8087:0aaa class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 0 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 port: 5020 bus-ID: 00:17.0 chip-ID: 8086:282a rev: N/A class-ID: 0104
Drives:
  Local Storage: total: 1.95 TiB used: 37.87 GiB (1.9%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: MZVLB1T0HBLR-000H1
    size: 953.87 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 tech: SSD serial: <filter> fw-rev: HPS0NEXF temp: 41.9 C
    scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Samsung model: PSSD T7 Touch
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B type: USB
    rev: 2.1 spd: 480 Mb/s lanes: 1 mode: 2.0 tech: SSD serial: <filter>
    scheme: MBR
  ID-3: /dev/sdb maj-min: 8:16 vendor: Kingston model: DT microDuo 3C
    size: 115.5 GiB block-size: physical: 512 B logical: 512 B type: USB rev: 3.2
    spd: 5 Gb/s lanes: 1 mode: 3.2 gen-1x1 tech: N/A serial: <filter>
    fw-rev: PMAP scheme: MBR
Partition:
  ID-1: / raw-size: 194.82 GiB size: 190.71 GiB (97.89%)
    used: 37.87 GiB (19.9%) fs: ext4 dev: /dev/nvme0n1p8 maj-min: 259:8
  ID-2: /boot/efi raw-size: 500 MiB size: 499 MiB (99.80%)
    used: 312 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p9 maj-min: 259:9
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default) zswap: no
  ID-1: swap-1 type: partition size: 19.53 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/nvme0n1p7 maj-min: 259:7
Sensors:
  System Temperatures: cpu: 48.0 C pch: 47.0 C mobo: N/A
  Fan Speeds (rpm): cpu: 0 fan-2: 0
Info:
  Memory: total: 16 GiB note: est. available: 15.49 GiB used: 5.93 GiB (38.3%)
  Processes: 320 Power: uptime: 19m states: freeze,mem,disk suspend: deep
    avail: s2idle wakeups: 0 hibernate: platform avail: shutdown, reboot,
    suspend, test_resume image: 6.17 GiB services: org_kde_powerdevil,
    power-profiles-daemon, upowerd Init: systemd v: 257 default: graphical
    tool: systemctl
  Packages: 1478 pm: pacman pkgs: 1471 libs: 383 tools: pamac pm: flatpak
    pkgs: 7 Compilers: gcc: 14.2.1 Shell: fish v: 4.0.1 default: Bash v: 5.2.37
    running-in: tmux: inxi: 3.3.38

The installation of Manjaro is not older than 2 weeks.

Is there any danger of having an unbootable system in using:

in /etc/systemd/sleep.conf

[Sleep]
HibernateMode=platform shutdown

?

I highly doubt it.

You can change it, reboot and if you find you can’t boot anymore, you can simply undo the change from a live environment, or chroot environment. (Although chroot would strictly now be necessary it would make any explanations easier…)

The hibernation device needs to be mentioned in the Grub parameters: resume=/dev/sdxY
And the “resume” keyword needs to be in the HOOKS in /etc/mkinitcpio.conf

You apparently have the second one - but not the first.
Nothing referring to it in /etc/default/grub
This just cannot work.

I’ve put this

RESUME=/dev/nvme0n1p8

at the end of /etc/default/grub

and it still does not restore the previous session on Hibernation.

The specified /dev/nvme0n1p8 is the main Linux file system which contains /home, /etc etc.

You are right, I’ve tried it.

Output of sudo fdisk --list:

Disc /dev/nvme0n1: 953,87 GiB, 1024209543168 octeți, 2000409264 sectoare
Modelul discului: SAMSUNG MZVLB1T0HBLR-000H1              
Unități: sectoare din 1 * 512 = 512 octeți
Dimensiunea sectorului (logic/fizic): 512 octeți / 512 octeți
Dimensiunea In/Ieș (minimă/optimă): 512 octeți / 512 octeți
Tipul etichetei de disc: gpt
Identificatorul de disc: 6CBC3BD7-2FA3-4A13-9F0A-439C6AA249C5

Dispozitiv         Începe    Termină  Sectoare   Dim. Tip
/dev/nvme0n1p1  409602048 1207050239 797448192 380,3G Sistem de fișiere Linux
/dev/nvme0n1p2 1207050240 1207255039    204800   100M Sistem EFI
/dev/nvme0n1p3 1207255040 1207287807     32768    16M Rezervat Microsoft
/dev/nvme0n1p4 1207287808 1947802270 740514463 353,1G Date de bază Microsoft
/dev/nvme0n1p5 1947803648 1949679615   1875968   916M Mediul de recuperare Windows
/dev/nvme0n1p6 1949683712 1959448575   9764864   4,7G Date de bază Microsoft
/dev/nvme0n1p7 1959448576 2000408575  40960000  19,5G Spațiu de interschimb (swap) Linux
/dev/nvme0n1p8    1026048  409602047 408576000 194,8G Sistem de fișiere Linux
/dev/nvme0n1p9       2048    1026047   1024000   500M Sistem EFI

Intrările din tabela de partiții nu sunt în ordinea de pe disc.


Disc /dev/sda: 931,51 GiB, 1000204886016 octeți, 1953525168 sectoare
Modelul discului: PSSD T7 Touch   
Unități: sectoare din 1 * 512 = 512 octeți
Dimensiunea sectorului (logic/fizic): 512 octeți / 512 octeți
Dimensiunea In/Ieș (minimă/optimă): 512 octeți / 33553920 octeți
Tipul etichetei de disc: dos
Identificatorul de disc: 0x8a0162b7

Dispozitiv Pornire Începe    Termină   Sectoare   Dim. Id Tip
/dev/sda1  *         2048 1953522112 1953520065 931,5G 83 Linux


Disc /dev/sdb: 115,5 GiB, 124017180672 octeți, 242221056 sectoare
Modelul discului: DT microDuo 3C  
Unități: sectoare din 1 * 512 = 512 octeți
Dimensiunea sectorului (logic/fizic): 512 octeți / 512 octeți
Dimensiunea In/Ieș (minimă/optimă): 512 octeți / 512 octeți
Tipul etichetei de disc: dos
Identificatorul de disc: 0xe5223ac9

Dispozitiv Pornire Începe   Termină  Sectoare   Dim. Id Tip
/dev/sdb1            2048 242221055 242219008 115,5G 83 Linux

that is the wrong syntax

It’s lower case:
resume=...

also:

/dev/nvme0n1p7
is a swap partition, according to your provided output

not /dev/nvme0n1p8

and you also have to run
sudo update-grub
after you have made this change

Use:
LC_ALL=C command
to have the command output in english,
rather than in Romanian,
so that everyone here can read and comprehend without a translator tool …

1 Like

In English:

Disk /dev/nvme0n1: 953.87 GiB, 1024209543168 bytes, 2000409264 sectors
Disk model: SAMSUNG MZVLB1T0HBLR-000H1              
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 6CBC3BD7-2FA3-4A13-9F0A-439C6AA249C5

Device              Start        End   Sectors   Size Type
/dev/nvme0n1p1  409602048 1207050239 797448192 380.3G Linux filesystem
/dev/nvme0n1p2 1207050240 1207255039    204800   100M EFI System
/dev/nvme0n1p3 1207255040 1207287807     32768    16M Microsoft reserved
/dev/nvme0n1p4 1207287808 1947802270 740514463 353.1G Microsoft basic data
/dev/nvme0n1p5 1947803648 1949679615   1875968   916M Windows recovery environment
/dev/nvme0n1p6 1949683712 1959448575   9764864   4.7G Microsoft basic data
/dev/nvme0n1p7 1959448576 2000408575  40960000  19.5G Linux swap
/dev/nvme0n1p8    1026048  409602047 408576000 194.8G Linux filesystem
/dev/nvme0n1p9       2048    1026047   1024000   500M EFI System

Partition table entries are not in disk order.


Disk /dev/sda: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: PSSD T7 Touch   
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 33553920 bytes
Disklabel type: dos
Disk identifier: 0x8a0162b7

Device     Boot Start        End    Sectors   Size Id Type
/dev/sda1  *     2048 1953522112 1953520065 931.5G 83 Linux


Disk /dev/sdb: 115.5 GiB, 124017180672 bytes, 242221056 sectors
Disk model: DT microDuo 3C  
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xe5223ac9

Device     Boot Start       End   Sectors   Size Id Type
/dev/sdb1        2048 242221055 242219008 115.5G 83 Linux

That’s why I used the one ending in p8.

Now I will try with resume with lower case.

… but that is not a swap space - not a swap partition

Why would you use it when you need to specify a swap space?
Makes no sense to me …



that is your swap partition …

use it

I did not know I had to specify a swap partition.

I tried with both the swap partition and then the Linux one, then, in each attempt, I ran sudo update-grub without errors. The session is still not being recovered. It is only like a fresh startup.

… but that is what I said, and that is what is needed, that is how it works …

On hibernation, the RAM content is saved to swap.

New logs are needed.

grep resume /etc/default/grub

for a start

Are you sure you are hibernating - and not just resuming from suspending to sleep?

sudo mkinitcpio -P
might also be needed
before
sudo update-grub

1 Like
╰─❯ grep resume /etc/default/grub
resume=/dev/nvme0n1p7

I press the hibernate button in the Plasma UI, so I think I am hibernating. After pressing the Hibernate button, after a few seconds, the screen turns black, then it reappears with the previous content in it, then after another few seconds, it shuts down completely.

It functions! Thanks! :grinning:

This is definitely wrong! - it can’t work when this is on a line by itself.

It belongs in this line:

It should look like this:

GRUB_CMDLINE_LINUX_DEFAULT='quiet splash udev.log_priority=3 resume=/dev/nvme0n1p7'
or use the UUID instead:
GRUB_CMDLINE_LINUX_DEFAULT='quiet splash udev.log_priority=3 resume=UUID=...'



To be honest: I don’t believe you.

with
resume=/dev/nvme0n1p7
on it’s own line in the file /etc/default/grub
you will get an error instead of the result that you said you got.

It truly works (tested it for about 2-3 reboots). It works with your last suggested changes too. Thanks.

If you’d like to do changes to config files or present some log files, please ask. I wish that the hibernation problems that I had in the past (a few years ago) to go away from the official builds. I think that the change that resolved the situation was putting resume in the mkinitcpio.conf file in the HOOKS list. Could the Hibernation work out of the box in Manjaro?

/etc/mkinitcpio.conf:

# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES=(usbhid xhci_hcd)
MODULES=()

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=()

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
FILES=()

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No RAID, lvm2, or encrypted root is needed.
#    HOOKS=(base)
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS=(base udev autodetect modconf block filesystems fsck)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev modconf block filesystems fsck)
#
##   This setup assembles a mdadm array with an encrypted root file system.
##   Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices.
#    HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck)
#
##   This setup loads an lvm2 volume group.
#    HOOKS=(base udev modconf block lvm2 filesystems fsck)
#
##   This will create a systemd based initramfs which loads an encrypted root filesystem.
#    HOOKS=(base systemd autodetect modconf kms keyboard sd-vconsole sd-encrypt block filesystems fsck)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr and fsck hooks.
HOOKS=(base udev autodetect microcode kms modconf block keyboard keymap consolefont plymouth filesystems fsck resume)

# COMPRESSION
# Use this to compress the initramfs image. By default, zstd compression
# is used for Linux ≥ 5.9 and gzip compression is used for Linux < 5.9.
# Use 'cat' to create an uncompressed image.
#COMPRESSION="zstd"
#COMPRESSION="gzip"
#COMPRESSION="bzip2"
#COMPRESSION="lzma"
#COMPRESSION="xz"
#COMPRESSION="lzop"
#COMPRESSION="lz4"

# COMPRESSION_OPTIONS
# Additional options for the compressor
#COMPRESSION_OPTIONS=()

# MODULES_DECOMPRESS
# Decompress loadable kernel modules and their firmware during initramfs
# creation. Switch (yes/no).
# Enable to allow further decreasing image size when using high compression
# (e.g. xz -9e or zstd --long --ultra -22) at the expense of increased RAM usage
# at early boot.
# Note that any compressed files will be placed in the uncompressed early CPIO
# to avoid double compression.
#MODULES_DECOMPRESS="no"

It looks like it:

https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Pass_hibernate_location_to_initramfs

Chapter 4.3 in Arch Wiki

I was very surprised that there was not an error when I tried writing
resume=/dev/xyz
just somewhere in /etc/default/grub on it’s own line
and then generating the config

Looks like one can write just about anything in there - and not get an error.
That was new to me.
Strange.

I would have expected a syntax error …

1 Like

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