Hibernate fails ocassionally

I usually hibernate my laptop instead of shutting it down so that I can resume working on my stuff. It usually works fine, but every 4-5 hibernations later, it fails. Sometimes it even works for 10-12 hibernations, but it fails at some point. It stays on, draining battery. Coupled with this issue, it gets particularly annoying as it means I have to restart multiple times.

I’m not sure what causes this issue. I’m giving my system information, but please ask for any other info that I can provide which will help you help me with this issue. Thank you so much in advance.

System:
  Kernel: 5.13.5-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0 
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.13-x86_64 
  root=UUID=fe64fafd-1c2a-4b55-846f-c264196ff166 rw nomce "acpi_osi=Windows 
  2018" quiet resume=UUID=4517ac81-4ac6-42a0-8e7a-a5870b5f98df 
  Desktop: KDE Plasma 5.22.4 tk: Qt 5.15.2 wm: kwin_x11 vt: 1 dm: SDDM 
  Distro: Manjaro Linux base: Arch Linux 
Machine:
  Type: Laptop System: HP product: HP Pavilion Laptop 14-bf1xx 
  v: Type1ProductConfigId serial: <filter> Chassis: type: 10 serial: <filter> 
  Mobo: HP model: 83CE v: 59.38 serial: <filter> UEFI: Insyde v: F.31 
  date: 10/30/2017 
Battery:
  ID-1: BAT1 charge: 15.2 Wh (35.9%) condition: 42.3/42.3 Wh (100.0%) 
  volts: 12.2 min: 11.6 model: Hewlett-Packard PABAS0241231 type: Li-ion 
  serial: <filter> status: Charging 
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: L2: 8 MiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 bogomips: 32012 
  Speed: 800 MHz min/max: 400/1800 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 
  4: 800 5: 800 6: 800 7: 800 8: 800 
  Vulnerabilities: Type: itlb_multihit status: KVM: VMX unsupported 
  Type: l1tf mitigation: PTE Inversion 
  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: Hewlett-Packard driver: i915 
  v: kernel bus-ID: 00:02.0 chip-ID: 8086:5917 class-ID: 0300 
  Device-2: NVIDIA GM108M [GeForce 940MX] vendor: Hewlett-Packard 
  driver: nvidia v: 470.57.02 alternate: nouveau,nvidia_drm bus-ID: 01:00.0 
  chip-ID: 10de:134d class-ID: 0302 
  Device-3: Chicony HP Wide Vision HD Camera type: USB driver: uvcvideo 
  bus-ID: 1-5:4 chip-ID: 04f2:b5d6 class-ID: 0e02 
  Display: x11 server: X.Org 1.20.11 compositor: kwin_x11 driver: 
  loaded: modesetting,nvidia display-ID: :0 screens: 1 
  Screen-1: 0 s-res: 1920x1080 s-dpi: 115 s-size: 424x238mm (16.7x9.4") 
  s-diag: 486mm (19.1") 
  Monitor-1: eDP-1 res: 1920x1080 hz: 60 dpi: 158 size: 309x173mm (12.2x6.8") 
  diag: 354mm (13.9") 
  OpenGL: renderer: Mesa Intel UHD Graphics 620 (KBL GT2) v: 4.6 Mesa 21.1.5 
  direct render: Yes 
Audio:
  Device-1: Intel Sunrise Point-LP HD Audio vendor: Hewlett-Packard 
  driver: snd_hda_intel v: kernel alternate: snd_soc_skl bus-ID: 00:1f.3 
  chip-ID: 8086:9d71 class-ID: 0403 
  Sound Server-1: ALSA v: k5.13.5-1-MANJARO running: yes 
  Sound Server-2: JACK v: 1.9.19 running: no 
  Sound Server-3: PulseAudio v: 14.2 running: no 
  Sound Server-4: PipeWire v: 0.3.32 running: yes 
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet 
  vendor: Hewlett-Packard driver: r8168 v: 8.049.02-NAPI modules: r8169 
  port: 3000 bus-ID: 02:00.0 chip-ID: 10ec:8168 class-ID: 0200 
  IF: eno1 state: down mac: <filter> 
  Device-2: Intel Wireless 7265 driver: iwlwifi v: kernel port: 3000 
  bus-ID: 03:00.0 chip-ID: 8086:095a class-ID: 0280 
  IF: wlo1 state: up mac: <filter> 
  IF-ID-1: br-ab1ab553cc42 state: up speed: 10000 Mbps duplex: unknown 
  mac: <filter> 
  IF-ID-2: docker0 state: down mac: <filter> 
  IF-ID-3: veth410f937 state: up speed: 10000 Mbps duplex: full mac: <filter> 
  IF-ID-4: vethb28078f state: up speed: 10000 Mbps duplex: full mac: <filter> 
  IF-ID-5: vethc422e81 state: up speed: 10000 Mbps duplex: full mac: <filter> 
  IF-ID-6: wgpia0 state: unknown speed: N/A duplex: N/A mac: N/A 
Bluetooth:
  Device-1: Intel Bluetooth wireless interface type: USB driver: btusb v: 0.8 
  bus-ID: 1-4:3 chip-ID: 8087:0a2a class-ID: e001 
  Report: rfkill ID: hci0 rfk-id: 3 state: up address: see --recommends 
Drives:
  Local Storage: total: 1.03 TiB used: 640.89 GiB (61.0%) 
  SMART Message: Unable to run smartctl. Root privileges required. 
  ID-1: /dev/sda maj-min: 8:0 vendor: Seagate model: ST1000LM035-1RK172 
  size: 931.51 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s 
  type: HDD rpm: 5400 serial: <filter> rev: RSM7 scheme: GPT 
  ID-2: /dev/sdb maj-min: 8:16 vendor: SanDisk model: SD8SN8U-128G-1006 
  size: 119.24 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s 
  type: SSD serial: <filter> rev: 0006 scheme: GPT 
Partition:
  ID-1: / raw-size: 50 GiB size: 48.72 GiB (97.43%) used: 28.67 GiB (58.9%) 
  fs: ext4 dev: /dev/sdb5 maj-min: 8:21 
  ID-2: /boot/efi raw-size: 277 MiB size: 276.4 MiB (99.80%) 
  used: 280 KiB (0.1%) fs: vfat dev: /dev/sdb1 maj-min: 8:17 
  ID-3: /home raw-size: 60.87 GiB size: 59.67 GiB (98.02%) 
  used: 33.28 GiB (55.8%) fs: ext4 dev: /dev/sdb2 maj-min: 8:18 
Swap:
  Kernel: swappiness: 1 (default 60) cache-pressure: 100 (default) 
  ID-1: swap-1 type: partition size: 8.1 GiB used: 2.1 GiB (25.9%) 
  priority: -2 dev: /dev/sdb3 maj-min: 8:19 
Sensors:
  System Temperatures: cpu: 38.0 C mobo: 29.8 C 
  Fan Speeds (RPM): N/A 
Info:
  Processes: 344 Uptime: 21h 46m wakeups: 10 Memory: 7.69 GiB 
  used: 3.9 GiB (50.7%) Init: systemd v: 248 tool: systemctl Compilers: 
  gcc: 11.1.0 clang: 12.0.1 Packages: 1987 pacman: 1980 lib: 437 flatpak: 1 
  snap: 6 Shell: fish v: 3.3.1 running-in: tmux: inxi: 3.3.06 

Have you tried falling back to an LTS kernel already?

If yes, please provide the output from:

journalctl --system --boot=0 --priority=3 | tail --lines=50

when coming back from a failed hibernate

:+1:

Yes, I’ve tried both 5.10 and 5.4 and both give the same issue.
I’ll post the log when I encounter it next time.

1 Like

@Fabby Here’s the output you asked for:

-- Journal begins at Sat 2020-12-26 23:48:18 IST, ends at Tue 2021-08-03 02:37:12 IST. --
Aug 03 02:35:17 sintan-pc kernel: x86/cpu: VMX (outside TXT) disabled by BIOS
Aug 03 02:35:17 sintan-pc kernel: x86/cpu: SGX disabled by BIOS.
Aug 03 02:35:17 sintan-pc kernel: mce: Unable to init MCE device (rc: -5)
Aug 03 02:35:18 sintan-pc systemd-udevd[301]: sdb: /etc/udev/rules.d/60-schedulers.rules:2 Failed to write ATTR{/sys/devices/pci0000:00/0000:00:17.0/ata3/host2/target2:0:0/2:0:0:0/block/sdb/queue/scheduler}, ignoring: Invalid argument
Aug 03 02:35:18 sintan-pc kernel: 
Aug 03 02:35:42 sintan-pc avahi-daemon[547]: chroot.c: open() failed: No such file or directory
Aug 03 02:35:42 sintan-pc NetworkManager[536]: <error> [1627938342.8434] connectivity: invalid URI '1.1.1.1' for connectivity check.

Sorry, I was too conservative: that didn’t give me enough info.

  1. How do you recover from a failed hibernate?

    • REISUB?
    • It fails to hibernate, so there is no “recover”, just continue working
  2. If it happens again and you would have used REISUB, please execute:

    journalctl --system --boot=-1 --priority=3 | tail --lines=50
    

:thinking:

1 Like

I’ve used REISUB sometimes, but I’d shamefully admit that nowadays I just press the power button for a few seconds out of frustration. And no, I can’t just continue working. It doesn’t respond to anything.
Sure, I’ll give you the logs ASAP.

It looks to me like a swap problem. You have 8GB of memory and 8GB of swap. Usually, that’s okay but in your inxi output, your swap is already 25% filled.

You’re using a swap partition, so increasing that might not be possible. So I suggest, removing the swap partition and use a big enough (~12 GB?) swap file instead: Swap - ArchWiki

2 Likes

Please read this too on top of @mithrial 's excellent suggestion because every time you press the power button, you risk damaging the system more and more and more…:

:crossed_fingers:

1 Like

Is it possible to hibernate to a swap file? I knew that it wasn’t. Anyway, I think I can increase the swap partition.

EDIT : So, I found out that it’s possible to use a swapfile to hibernate, but I resized the partition (to 12 GB) anyway. Let’s see if it fixes the issue.

I know and I’m ashamed.

Also, why is the swap behaving like that? Swappiness is set to 1 in /proc/sys/vm/swappiness.

That is an entirely different question, so let’s focus on the issue at hand:

  • Did the extension to 12GB help?
  • If not:
    • REISUB

    • Execute below and provide the information:

      journalctl --system --boot=-1 --priority=3 | tail --lines=50
      

:crossed_fingers:

I can’t say for sure until I use it for a week or so. I’ll give you update.

1 Like

Looks like this was the solution. Hibernate’s been working flawlessly for the last few days.

1 Like

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