Added swap partition, hibernation results in complete shutdown instead?

Hi, I’m trying to setup swap for hibernation and followed the instructions in the manjaro wiki for swap, including selecting a good size for hibernation, to add a swap partition. The hibernate button shows up, and so does swap space under htop, but pressing the hibernate results in the computer shutting down and not restoring anything on boot. Additionally, I have yet to see a single Kb of swap be used.

I believe the hibernate symptoms sound like the case where my system does not have swap as described by this archived forum post (i.e, attempting to hibernate causes shutdown of computer, accepted solution was adding swap to his system) which makes me think that the system not using the swap and hibernate not functioning is due to the same issue of the swap not functioning.

I’ve checked my swapiness value, and it seems to be at the default of 60.

swapon -v
NAME           TYPE      SIZE USED PRIO
/dev/nvme0n1p2 partition  20G   0B   -2
inxi --admin --verbosity=7 --filter --no-host --width                                                                                                                   INT ✘ 
System:
  Kernel: 5.15.2-2-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.15-x86_64
  root=UUID=5cd0efe7-0bc3-40fe-9334-0cb2d5228078 rw quiet apparmor=1
  security=apparmor udev.log_priority=3
  Desktop: KDE Plasma 5.23.3 tk: Qt 5.15.2 wm: kwin_x11 vt: 1 dm: SDDM
  Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Convertible System: LENOVO product: 81C4 v: Lenovo YOGA C930-13IKB
  serial: <superuser required> Chassis: type: 31 v: Lenovo YOGA C930-13IKB
  serial: <superuser required>
  Mobo: LENOVO model: LNVNB161216 v: SDK0J40709 WIN
  serial: <superuser required> UEFI: LENOVO v: 8GCN37WW date: 11/23/2020
Battery:
  ID-1: BAT1 charge: 42.6 Wh (94.7%) condition: 45.0/60.0 Wh (75.0%)
  volts: 8.5 min: 7.7 model: Simplo BASE-BAT type: Li-poly serial: <filter>
  status: Unknown
Memory:
  RAM: total: 15.37 GiB used: 3.56 GiB (23.2%)
  RAM Report: permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: Quad Core model: Intel Core i7-8550U bits: 64 type: MT MCP
  arch: Kaby Lake note: check family: 6 model-id: 8E (142) stepping: A (10)
  microcode: EA cache: L1: 256 KiB L2: 1024 KiB L3: 8 MiB bogomips: 32012
  Speed: 800 MHz min/max: 400/4000 MHz Core speeds (MHz): 1: 800 2: 799 3: 800
  4: 800 5: 800 6: 800 7: 800 8: 800
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat arch_perfmon art
  avx avx2 bmi1 bmi2 bts clflush clflushopt cmov constant_tsc cpuid
  cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm dts epb ept ept_ad erms est
  f16c flexpriority flush_l1d fma fpu fsgsbase fxsr ht hwp hwp_act_window
  hwp_epp hwp_notify ibpb ibrs ida intel_pt invpcid invpcid_single lahf_lm lm
  mca mce md_clear mmx monitor movbe mpx msr mtrr nonstop_tsc nopl nx pae pat
  pbe pcid pclmulqdq pdcm pdpe1gb pebs pge pln pni popcnt pse pse36 pti pts
  rdrand rdseed rdtscp rep_good sdbg sep sgx smap smep ss ssbd sse sse2 sse4_1
  sse4_2 ssse3 stibp syscall tm tm2 tpr_shadow tsc tsc_adjust
  tsc_deadline_timer vme vmx vnmi vpid x2apic xgetbv1 xsave xsavec xsaveopt
  xsaves xtopology xtpr
  Vulnerabilities: Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf
  mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: spec_store_bypass
  mitigation: Speculative Store Bypass disabled via prctl and seccomp
  Type: spectre_v1
  mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Full generic retpoline, IBPB: conditional,
  IBRS_FW, STIBP: conditional, RSB filling
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel UHD Graphics 620 vendor: Lenovo driver: i915 v: kernel
  bus-ID: 00:02.0 chip-ID: 8086:5917 class-ID: 0300
  Device-2: AMD Ellesmere [Radeon RX 470/480/570/570X/580/580X/590]
  vendor: XFX Pine driver: amdgpu v: kernel bus-ID: 3a:00.0 chip-ID: 1002:67df
  class-ID: 0300
  Device-3: Acer Integrated Camera type: USB driver: uvcvideo bus-ID: 1-1:2
  chip-ID: 5986:2115 class-ID: 0e02
  Device-4: Logitech Webcam C270 type: USB driver: snd-usb-audio,uvcvideo
  bus-ID: 1-6.1.2:7 chip-ID: 046d:0825 class-ID: 0102 serial: <filter>
  Display: x11 server: X.Org 1.21.1.1 compositor: kwin_x11 driver:
  loaded: amdgpu,intel unloaded: modesetting display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3840x1080 s-dpi: 96 s-size: 1015x285mm (40.0x11.2")
  s-diag: 1054mm (41.5")
  Monitor-1: HDMI-A-0 res: 1920x1080 hz: 60 dpi: 82
  size: 598x336mm (23.5x13.2") diag: 686mm (27")
  Monitor-2: eDP1 res: 1920x1080 hz: 60 dpi: 157 size: 310x170mm (12.2x6.7")
  diag: 354mm (13.9")
  OpenGL: renderer: AMD Radeon RX 580 Series (POLARIS10 DRM 3.42.0
  5.15.2-2-MANJARO LLVM 13.0.0)
  v: 4.6 Mesa 21.2.5 direct render: Yes
Audio:
  Device-1: Intel Sunrise Point-LP HD Audio vendor: Lenovo driver: snd_soc_skl
  v: kernel alternate: snd_hda_intel bus-ID: 00:1f.3 chip-ID: 8086:9d71
  class-ID: 0401
  Device-2: AMD Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590]
  vendor: XFX Pine driver: snd_hda_intel v: kernel bus-ID: 3a:00.1
  chip-ID: 1002:aaf0 class-ID: 0403
  Device-3: Logitech Webcam C270 type: USB driver: snd-usb-audio,uvcvideo
  bus-ID: 1-6.1.2:7 chip-ID: 046d:0825 class-ID: 0102 serial: <filter>
  Sound Server-1: ALSA v: k5.15.2-2-MANJARO running: yes
  Sound Server-2: sndio v: N/A running: no
  Sound Server-3: JACK v: 1.9.19 running: no
  Sound Server-4: PulseAudio v: 15.0 running: yes
  Sound Server-5: PipeWire v: 0.3.40 running: yes
Network:
  Device-1: Intel Wireless-AC 9260 driver: iwlwifi v: kernel bus-ID: 6b:00.0
  chip-ID: 8086:2526 class-ID: 0280
  IF: wlp107s0 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
  broadcast: <filter>
  IP v6: <filter> type: dynamic noprefixroute scope: global
  IP v6: <filter> type: noprefixroute scope: link
  Device-2: Realtek RTL8153 Gigabit Ethernet Adapter type: USB driver: r8152
  bus-ID: 4-1.2:4 chip-ID: 0bda:8153 class-ID: 0000 serial: <filter>
  IF: enp55s0u1u2 state: down mac: <filter>
  WAN IP: <filter>
Bluetooth:
  Device-1: Intel Wireless-AC 9260 Bluetooth Adapter type: USB driver: btusb
  v: 0.8 bus-ID: 1-8:5 chip-ID: 8087:0025 class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 3 state: down bt-service: enabled,running
  rfk-block: hardware: no software: yes address: see --recommends
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 462.05 GiB used: 92.81 GiB (20.1%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: MZVLB256HAHQ-000L2
  size: 238.47 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
  lanes: 4 type: SSD serial: <filter> rev: 0L1QEXD7 temp: 29.9 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 type: USB vendor: Kingston model: SA400S37240
  size: 223.57 GiB block-size: physical: 512 B logical: 512 B type: N/A
  serial: <filter> rev: SBFK scheme: GPT
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 218.21 GiB size: 214.54 GiB (98.32%)
  used: 42.79 GiB (19.9%) fs: ext4 dev: /dev/nvme0n1p5 maj-min: 259:3
  label: N/A uuid: 5cd0efe7-0bc3-40fe-9334-0cb2d5228078
  ID-2: /boot/efi raw-size: 260 MiB size: 256 MiB (98.46%)
  used: 3.5 MiB (1.4%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
  label: SYSTEM_DRV uuid: BAA4-116D
  ID-3: /run/timeshift/backup raw-size: 73.57 GiB size: 71.86 GiB (97.68%)
  used: 50.02 GiB (69.6%) fs: ext4 dev: /dev/sda2 maj-min: 8:2
  label: Snapshots uuid: 059799cb-c77b-4839-ab9a-519198ad7016
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 20.01 GiB used: 0 KiB (0.0%) priority: -2
  dev: /dev/nvme0n1p2 maj-min: 259:2 label: N/A
  uuid: 95511b64-13f4-4494-a420-eb3e5b78d85a
Unmounted:
  ID-1: /dev/sda1 maj-min: 8:1 size: 150 GiB fs: ext4 label: Dock
  uuid: 683a1c84-bcc8-4996-a49b-03162f5dcb72
USB:
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 12 rev: 2.0
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 1-1:2 info: Acer Integrated Camera type: Video driver: uvcvideo
  interfaces: 2 rev: 2.0 speed: 480 Mb/s power: 500mA chip-ID: 5986:2115
  class-ID: 0e02
  Device-2: 1-5:3 info: Synaptics type: <vendor specific> driver: N/A
  interfaces: 1 rev: 2.0 speed: 12 Mb/s power: 100mA chip-ID: 06cb:0081
  class-ID: ff00 serial: <filter>
  Hub-2: 1-6:4 info: VIA Labs VL813 Hub ports: 4 rev: 2.1 speed: 480 Mb/s
  chip-ID: 2109:2813 class-ID: 0900
  Hub-3: 1-6.1:6 info: Realtek RTS5411 Hub ports: 4 rev: 2.1 speed: 480 Mb/s
  chip-ID: 0bda:5411 class-ID: 0900
  Device-1: 1-6.1.2:7 info: Logitech Webcam C270 type: Video,Audio
  driver: snd-usb-audio,uvcvideo interfaces: 4 rev: 2.0 speed: 480 Mb/s
  power: 500mA chip-ID: 046d:0825 class-ID: 0102 serial: <filter>
  Hub-4: 1-6.1.3:8 info: Terminus Hub ports: 4 rev: 2.0 speed: 480 Mb/s
  power: 100mA chip-ID: 1a40:0101 class-ID: 0900
  Device-1: 1-6.1.3.1:9 info: Microdia USB DEVICE type: Keyboard,Mouse
  driver: hid-generic,usbhid interfaces: 2 rev: 2.0 speed: 12 Mb/s
  power: 100mA chip-ID: 0c45:8520 class-ID: 0301
  Device-2: 1-6.1.3.3:10 info: SINOWEALTH Game Mouse type: Mouse,Keyboard
  driver: hid-generic,usbhid interfaces: 2 rev: 1.1 speed: 12 Mb/s
  power: 480mA chip-ID: 258a:1007 class-ID: 0301
  Device-3: 1-8:5 info: Intel Wireless-AC 9260 Bluetooth Adapter
  type: Bluetooth driver: btusb interfaces: 2 rev: 2.0 speed: 12 Mb/s
  power: 100mA chip-ID: 8087:0025 class-ID: e001
  Hub-5: 2-0:1 info: Super-speed hub ports: 6 rev: 3.0 speed: 5 Gb/s
  chip-ID: 1d6b:0003 class-ID: 0900
  Hub-6: 3-0:1 info: Hi-speed hub with single TT ports: 2 rev: 2.0
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Hub-7: 4-0:1 info: Super-speed hub ports: 2 rev: 3.1 speed: 10 Gb/s
  chip-ID: 1d6b:0003 class-ID: 0900
  Hub-8: 4-1:2 info: VIA Labs VL813 Hub ports: 4 rev: 3.0 speed: 5 Gb/s
  chip-ID: 2109:0813 class-ID: 0900
  Hub-9: 4-1.1:3 info: Realtek Hub ports: 4 rev: 3.0 speed: 5 Gb/s
  chip-ID: 0bda:0411 class-ID: 0900
  Device-1: 4-1.2:4 info: Realtek RTL8153 Gigabit Ethernet Adapter
  type: Network driver: r8152 interfaces: 1 rev: 3.0 speed: 5 Gb/s
  power: 256mA chip-ID: 0bda:8153 class-ID: 0000 serial: <filter>
  Device-2: 4-1.3:5 info: VIA Labs VL817 SATA Adaptor type: Mass Storage
  driver: uas interfaces: 1 rev: 3.1 speed: 5 Gb/s power: 8mA
  chip-ID: 2109:0715 class-ID: 0806 serial: <filter>
Sensors:
  System Temperatures: cpu: 29.8 C pch: 41.0 C mobo: 27.8 C gpu: amdgpu
  temp: 52.0 C
  Fan Speeds (RPM): N/A gpu: amdgpu fan: 810
Info:
  Processes: 335 Uptime: 59m wakeups: 9 Init: systemd v: 249 tool: systemctl
  Compilers: gcc: 11.1.0 clang: 13.0.0 Packages: pacman: 1424 lib: 360
  flatpak: 0 Shell: Zsh v: 5.8 default: Bash v: 5.1.8 running-in: yakuake
  inxi: 3.3.09

Any help would be much appreciated!

Apologies if this isn’t the right category, I wasn’t sure if this could be considered kernel, or something else.

It looks like your resume function is not properly set.

You need a swap partition entry in your /etc/fstab,

then

resume=UUID=place here the swap partition UUID

somewhere after the first " in the line starting

GRUB_CMDLINE_LINUX_DEFAULT="

of your /etc/default/grub

and the resume hook set at the end of

HOOKS=(base .... resume)

within the brackets in your /etc/mkinitcpio.conf.

At the end run

sudo mkinitcpio -P
sudo update-grub

and reboot.

4 Likes

Thanks! Just tested and works.

In case anyone else wants more details regarding setting this up, here’s the Arch Wiki page for doing so (happened to find it around the same time as seeing the reply). Although Wollie’s is much more concise and I’m assuming would work for the more typical configurations.

1 Like

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