You are not logged in.

#1 2018-01-13 18:34:35

plp
Member
Registered: 2013-01-24
Posts: 29

laptop sometimes fails to hibernate

Hi all,

I was wondering if you could help me with this. My laptop sometimes (quite frequently) fails to hibernate when calling 'systemctl hibernate'. Usually, hibernation works fine the first 3-4 times following a reboot. Then the laptop goes into this weird mode, in which it tries to hibernate but instantly wakes up again.

Relevant journalctl extract:

Jan 13 20:12:07 saxonia systemd[1]: Starting Hibernate...
Jan 13 20:12:07 saxonia systemd-sleep[24255]: Suspending system...
Jan 13 20:12:07 saxonia kernel: PM: hibernation entry
Jan 13 20:12:07 saxonia kernel: PM: Syncing filesystems ... 
Jan 13 20:12:08 saxonia kernel: PM: done.
Jan 13 20:12:08 saxonia kernel: Freezing user space processes ... (elapsed 0.260 seconds) done.
Jan 13 20:12:08 saxonia kernel: OOM killer disabled.
Jan 13 20:12:08 saxonia kernel: PM: Marking nosave pages: [mem 0x00000000-0x00000fff]
Jan 13 20:12:08 saxonia kernel: PM: Marking nosave pages: [mem 0x0009c000-0x000fffff]
Jan 13 20:12:08 saxonia kernel: PM: Marking nosave pages: [mem 0x9b93c000-0xffffffff]
Jan 13 20:12:08 saxonia kernel: PM: Basic memory bitmaps created
Jan 13 20:12:08 saxonia kernel: PM: Preallocating image memory... 
Jan 13 20:12:08 saxonia kernel: PM: Basic memory bitmaps freed
Jan 13 20:12:08 saxonia kernel: OOM killer enabled.
Jan 13 20:12:08 saxonia kernel: Restarting tasks ... done.
Jan 13 20:12:08 saxonia kernel: thermal thermal_zone9: failed to read out thermal zone (-61)
Jan 13 20:12:08 saxonia kernel: PM: hibernation exit
Jan 13 20:12:08 saxonia systemd[1]: systemd-hibernate.service: Main process exited, code=exited, status=1/FAILURE
Jan 13 20:12:08 saxonia kernel: IPv6: ADDRCONF(NETDEV_UP): wlp1s0: link is not ready
Jan 13 20:12:08 saxonia systemd[1]: systemd-hibernate.service: Failed with result 'exit-code'.
Jan 13 20:12:08 saxonia systemd[1]: Failed to start Hibernate.
Jan 13 20:12:08 saxonia systemd[1]: Dependency failed for Hibernate.
Jan 13 20:12:08 saxonia systemd-logind[432]: Operation 'sleep' finished.
Jan 13 20:12:08 saxonia systemd[1]: hibernate.target: Job hibernate.target/start failed with result 'dependency'.
Jan 13 20:12:08 saxonia systemd[1]: sleep.target: Unit not needed anymore. Stopping.
Jan 13 20:12:08 saxonia systemd[1]: Stopped target Sleep.

Relevant dmesg extract:

PM: hibernation entry
PM: Syncing filesystems ... 
PM: done.
Freezing user space processes ... (elapsed 0.260 seconds) done.
OOM killer disabled.
PM: Marking nosave pages: [mem 0x00000000-0x00000fff]
PM: Marking nosave pages: [mem 0x0009c000-0x000fffff]
PM: Marking nosave pages: [mem 0x9b93c000-0xffffffff]
PM: Basic memory bitmaps created
PM: Preallocating image memory... 
PM: Basic memory bitmaps freed
OOM killer enabled.
Restarting tasks ... done.
thermal thermal_zone9: failed to read out thermal zone (-61)
PM: hibernation exit
IPv6: ADDRCONF(NETDEV_UP): wlp1s0: link is not ready
IPv6: ADDRCONF(NETDEV_UP): wlp1s0: link is not ready
IPv6: ADDRCONF(NETDEV_UP): wlp1s0: link is not ready
wlp1s0: authenticate with 4a:d9:e7:67:75:49
wlp1s0: send auth to 4a:d9:e7:67:75:49 (try 1/3)
wlp1s0: authenticated
wlp1s0: associate with 4a:d9:e7:67:75:49 (try 1/3)
wlp1s0: RX AssocResp from 4a:d9:e7:67:75:49 (capab=0x431 status=0 aid=2)
wlp1s0: associated
IPv6: ADDRCONF(NETDEV_CHANGE): wlp1s0: link becomes ready
acpi INT3400:00: Unsupported event [0x86]

My laptop is a Dell Inspiron 15-7568 (06FF), serial no. 6GCXB82.

Thanks in advance!

Offline

#2 2018-01-13 19:56:23

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,384

Re: laptop sometimes fails to hibernate

How exactly have you configured hibernate and resume? Is your swap file/partition big enough to hold the RAM?

Offline

#3 2018-01-13 22:21:43

plp
Member
Registered: 2013-01-24
Posts: 29

Re: laptop sometimes fails to hibernate

Yes, it is:

              total        used        free      shared  buff/cache   available
Mem:           7.5G        3.2G        2.6G        677M        1.6G        3.5G
Swap:          8.0G          0B        8.0G

Swap partition sits on LVM, which sits on dm-crypt, which sits on the physical device. This is a setup I've been using for years on various computers  (sometimes with an extra software RAID layer) without any problems.

Last edited by plp (2018-01-13 22:23:33)

Offline

#4 2018-01-14 09:30:13

seth
Member
Registered: 2012-09-03
Posts: 5,414

Re: laptop sometimes fails to hibernate

There're issues with lvm backed swap, https://bbs.archlinux.org/viewtopic.php?pid=1758127
But to be sure, you've added the resume hook and device parameter?

Offline

#5 2018-01-14 13:45:25

plp
Member
Registered: 2013-01-24
Posts: 29

Re: laptop sometimes fails to hibernate

Yes, 'resume' is in my initcpio.conf hooks, right after 'block encrypt lvm2'. And I have 'resume=/dev/mapper/cryptlvm-swap' (my swap device) in my kernel boot parameters.

This setup works OK on other laptops, so I don't think there's a configuration issue. And it works fine on this one, too, except when it doesn't. I was suspecting this might be a BIOS issue, so I updated the BIOS and CPU microcode as well, without any luck.

The LVM backed swap issue you mention is a system freeze / starvation issue during memory heavy operations. I don't believe it's related to my problem, though I could be wrong. Like most people, I don't know much about the kernel.

Offline

#6 2018-01-14 13:49:58

plp
Member
Registered: 2013-01-24
Posts: 29

Re: laptop sometimes fails to hibernate

BTW, this might be a hardware issue. The laptop also has a problem of dying when suspended every couple of days, requiring a hard reset in order to boot again (as in either taking the battery out, or unplugging the charger and pressing the power button for 30 seconds).

Offline

#7 2018-01-14 14:13:35

seth
Member
Registered: 2012-09-03
Posts: 5,414

Re: laptop sometimes fails to hibernate

Reading the behavior description, what happens if you release memory (kill needless bloat, ie. you browser ;-) and drop caches)?

Offline

#8 Yesterday 13:29:25

plp
Member
Registered: 2013-01-24
Posts: 29

Re: laptop sometimes fails to hibernate

Well, I tried this many times, and... randomness happens.

Sometimes, quitting lots of memory heavy applications does indeed solve the problem, allowing the laptop to go into hibernation. Other times, doing the exact opposite (ie, firing up lots of memory hungry apps) can achieve the same result. But, most of the time, such tricks have no effect. Once hibernation fails once, it usually keeps failing until the next reboot.

Offline

#9 Yesterday 15:46:47

seth
Member
Registered: 2012-09-03
Posts: 5,414

Re: laptop sometimes fails to hibernate

firing up lots of memory hungry apps

And quitting them afterwards?

==============================================================

drop_caches

Writing to this will cause the kernel to drop clean caches, as well as
reclaimable slab objects like dentries and inodes.  Once dropped, their
memory becomes free.

To free pagecache:
	echo 1 > /proc/sys/vm/drop_caches
To free reclaimable slab objects (includes dentries and inodes):
	echo 2 > /proc/sys/vm/drop_caches
To free slab objects and pagecache:
	echo 3 > /proc/sys/vm/drop_caches

This is a non-destructive operation and will not free any dirty objects.
To increase the number of objects freed by this operation, the user may run
`sync' prior to writing to /proc/sys/vm/drop_caches.  This will minimize the
number of dirty objects on the system and create more candidates to be
dropped.

This file is not a means to control the growth of the various kernel caches
(inodes, dentries, pagecache, etc...)  These objects are automatically
reclaimed by the kernel when memory is needed elsewhere on the system.

Use of this file can cause performance problems.  Since it discards cached
objects, it may cost a significant amount of I/O and CPU to recreate the
dropped objects, especially if they were under heavy use.  Because of this,
use outside of a testing or debugging environment is not recommended.

You may see informational messages in your kernel log when this file is
used:

	cat (1234): drop_caches: 3

These are informational only.  They do not mean that anything is wrong
with your system.  To disable them, echo 4 (bit 3) into drop_caches.

==============================================================

Offline

#10 Yesterday 16:01:38

plp
Member
Registered: 2013-01-24
Posts: 29

Re: laptop sometimes fails to hibernate

Well, I've made lots of random experiments: starting apps, stopping apps, doing the drop_caches thing, doing sync, etc.

Like I said, the results were random but mostly negative. That is, most of the time, hibernation would still not work.

Offline

#11 Yesterday 16:35:03

ugjka
Member
From: Latvia
Registered: 2014-04-01
Posts: 958

Re: laptop sometimes fails to hibernate


Github | Soundcloud

Simplicity is the ultimate sophistication ~ Leonardo da Vinci
.

Offline

#12 Yesterday 17:56:32

plp
Member
Registered: 2013-01-24
Posts: 29

Re: laptop sometimes fails to hibernate

That's a treasure trove, ugjka, thanks ever so much.

The thread also provides two useful links for debugging suspend/hibernate:
https://01.org/linuxgraphics/documentat … ume-issues
https://01.org/blogs/rzhang/2015/best-p … ate-issues

I'll go through them and see what I can do.

Offline

Board footer

Powered by FluxBB