Hybrid sleep doesn't resume after battery drain

If I hibernate the laptop or put it to sleep, it resumes/wakes just fine. However, if I put it to hybrid sleep and then the battery drains out, it doesn’t resume later; it only restarts, doing the usual file system checks due to an improper shutdown.

As an experiment, I tried putting it to hybrid sleep and then long-pressing the power button to kill the power. Turning it back on has the same effect: restart instead of resume.

What could be wrong?

System information:

inxi --full --verbosity=7 --filter --no-host                                                                                                            ✔ 
System:
  Kernel: 5.19.1-3-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.1.1
    Desktop: KDE Plasma v: 5.24.6 tk: Qt v: 5.15.5 wm: kwin_x11 vt: 1 dm: SDDM
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Convertible System: LENOVO product: 20JES01U2C v: ThinkPad X1 Yoga
    2nd serial: <superuser required> Chassis: type: 31
    serial: <superuser required>
  Mobo: LENOVO model: 20JES01U2C v: SDK0J40697 WIN
    serial: <superuser required> UEFI: LENOVO v: N1NET54W (1.41 )
    date: 08/17/2021
Battery:
  ID-1: BAT0 charge: 28.2 Wh (62.4%) condition: 45.2/56.0 Wh (80.7%)
    volts: 16.7 min: 15.3 model: SMP 01AV441 type: Li-poly serial: <filter>
    status: charging cycles: 510
  Device-1: wacom_battery_0 model: Wacom Pen and multitouch sensor
    serial: N/A charge: 0% rechargeable: yes status: N/A
Memory:
  RAM: total: 15.37 GiB used: 3.64 GiB (23.7%)
  RAM Report: permissions: Unable to run dmidecode. Root privileges
    required.
CPU:
  Info: dual core model: Intel Core i7-7600U bits: 64 type: MT MCP
    smt: enabled arch: Amber/Kaby Lake note: check level: v3 rev: 9 cache:
    L1: 128 KiB L2: 512 KiB L3: 4 MiB
  Speed (MHz): avg: 1325 high: 2900 min/max: 400/3900 cores: 1: 800 2: 2900
    3: 800 4: 800 bogomips: 23209
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat
    arch_capabilities 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 smx 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
Graphics:
  Device-1: Intel HD Graphics 620 vendor: Lenovo driver: i915 v: kernel
    arch: Gen-9.5 ports: active: eDP-1 empty: DP-1, DP-2, HDMI-A-1, HDMI-A-2
    bus-ID: 00:02.0 chip-ID: 8086:5916 class-ID: 0300
  Device-2: Chicony Integrated Camera type: USB driver: uvcvideo
    bus-ID: 1-8:3 chip-ID: 04f2:b5ce class-ID: 0e02
  Display: x11 server: X.Org v: 21.1.4 compositor: kwin_x11 driver: X:
    loaded: modesetting alternate: fbdev,vesa gpu: i915 display-ID: :0
    screens: 1
  Screen-1: 0 s-res: 2560x1440 s-dpi: 96 s-size: 677x381mm (26.65x15.00")
    s-diag: 777mm (30.58")
  Monitor-1: eDP-1 model: Lenovo 0x4140 res: 2560x1440 hz: 60 dpi: 210
    size: 310x175mm (12.2x6.89") diag: 356mm (14") modes: 2560x1440
  OpenGL: renderer: Mesa Intel HD Graphics 620 (KBL GT2) v: 4.6 Mesa 22.1.6
    direct render: Yes
Audio:
  Device-1: Intel Sunrise Point-LP HD Audio vendor: Lenovo
    driver: snd_hda_intel v: kernel bus-ID: 00:1f.3 chip-ID: 8086:9d71
    class-ID: 0403
  Sound Server-1: ALSA v: k5.19.1-3-MANJARO running: yes
  Sound Server-2: JACK v: 1.9.21 running: no
  Sound Server-3: PulseAudio v: 16.1 running: yes
  Sound Server-4: PipeWire v: 0.3.56 running: yes
Network:
  Device-1: Intel Ethernet I219-LM vendor: Lenovo driver: e1000e v: kernel
    port: N/A bus-ID: 00:1f.6 chip-ID: 8086:15d7 class-ID: 0200
  IF: enp0s31f6 state: down mac: <filter>
  Device-2: Intel Wireless 8265 / 8275 driver: iwlwifi v: kernel pcie:
    speed: 2.5 GT/s lanes: 1 bus-ID: 04:00.0 chip-ID: 8086:24fd class-ID: 0280
  IF: wlp4s0 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  WAN IP: <filter>
Bluetooth:
  Message: No bluetooth data found.
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 953.87 GiB used: 87.83 GiB (9.2%)
  ID-1: /dev/sda vendor: SanDisk model: SD9SN8W-1T00-1006 size: 953.87 GiB
    speed: 6.0 Gb/s type: SSD serial: <filter> rev: 4006 scheme: GPT
  Message: No optical or floppy data found.
Partition:
  ID-1: / size: 920.87 GiB used: 87.83 GiB (9.5%) fs: ext4 dev: /dev/sda2
    label: N/A uuid: 2c6dd6cd-0652-407b-a5ad-bca998619889
  ID-2: /boot/efi size: 299.4 MiB used: 300 KiB (0.1%) fs: vfat
    dev: /dev/sda1 label: NO_LABEL uuid: D685-454B
Swap:
  ID-1: swap-1 type: partition size: 16.92 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/sda3 label: swap
    uuid: 9bf47d72-3a49-42a5-b9b2-f3d0841ee34e
Unmounted:
  Message: No unmounted partitions found.
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-8:3 info: Chicony Integrated Camera type: Video
    driver: uvcvideo interfaces: 2 rev: 2.0 speed: 480 Mb/s power: 500mA
    chip-ID: 04f2:b5ce class-ID: 0e02
  Device-2: 1-9:6 info: Validity Sensors type: <vendor specific>
    driver: N/A interfaces: 1 rev: 2.0 speed: 12 Mb/s power: 100mA
    chip-ID: 138a:0097 class-ID: ff00 serial: <filter>
  Device-3: 1-10:5 info: Wacom Pen and multitouch sensor type: HID
    driver: usbhid,wacom interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 400mA
    chip-ID: 056a:5087 class-ID: 0300
  Hub-2: 2-0:1 info: Super-speed hub ports: 6 rev: 3.0 speed: 5 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
Sensors:
  System Temperatures: cpu: 52.0 C pch: 51.0 C mobo: N/A
  Fan Speeds (RPM): cpu: 65535 fan-1: 0
Info:
  Processes: 191 Uptime: 30m wakeups: 7 Init: systemd v: 251
  default: graphical Compilers: gcc: 12.1.1 clang: 14.0.6 Packages: 1523
  pm: pacman pkgs: 1507 pm: flatpak pkgs: 9 pm: snap pkgs: 7 Shell: Zsh
  v: 5.9 default: Bash v: 5.1.16 running-in: yakuake inxi: 3.3.21

if you just put it to sleep, does it wake up properly?

Concerning the hard reset please read this (Trust me it makes life easier).

May you also show your “/etc/systemd/sleep.conf” file ??

Yes. I’ve edited my post since you asked.

Sure!

#  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 by creating "drop-ins" in
# the sleep.conf.d/ subdirectory. The latter is generally recommended.
# Defaults can be restored by simply deleting this file and all drop-ins.
#
# See systemd-sleep.conf(5) for details.

[Sleep]
#AllowSuspend=yes
#AllowHibernation=yes
#AllowSuspendThenHibernate=yes
#AllowHybridSleep=yes
#SuspendMode=
#SuspendState=mem standby freeze
#HibernateMode=platform shutdown
#HibernateState=disk
#HybridSleepMode=suspend platform shutdown
#HybridSleepState=disk
#HibernateDelaySec=120min

May you also provide more info :

show /etc/mkinitcpio.conf

Also Run journalctl --system --boot=0 | grep “sleep” after your case happens to show the log.

I also recommend this article :

Fabby’s Style

# 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=(piix ide_disk reiserfs)
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 block filesystems)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev block filesystems)
#
##   This setup assembles a pata mdadm array with an encrypted root FS.
##   Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
#    HOOKS=(base udev block mdadm encrypt filesystems)
#
##   This setup loads an lvm2 volume group on a usb device.
#    HOOKS=(base udev block lvm2 filesystems)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr, fsck and shutdown hooks.
HOOKS="base udev autodetect modconf block keyboard keymap resume filesystems fsck"

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

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

Sure, I’ll wait till it’s on very low battery. Then I’ll enter hybrid sleep and let the battery drain itself out. I’ll recharge for a bit and then boot the machine. After this, I’ll run the above command.

I don’t wanna try the manual hard-reset-while-hybrid-sleeping trick because I notice that during hybrid sleep, when I’m holding the power button pressed, the laptop starts to wake up. I suppose that changes the state from what I’m trying to simulate: an unexpected hard reset while hybrid sleeping.

Looks like the issue has been “resolved” automatically. This time, the laptop resumed just fine post the battery drain during hybrid sleep. ¯ \ _ (ツ)_/¯

No result after running that; it’s a blank prompt right after.

1 Like

I think I’ve stumbled upon the root cause.

My theory is that under Advanced Power Settings, At critical level: was configured to Sleep.

So the computer might’ve gone to sleep on reaching critical battery level, causing the improper shutdown when the battery drained out.

For reasons beyond me, there’s no option to Hybrid sleep.

I’ve asked another question to understand why:

My best bet for now is to select Hibernate for that option.

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