You are not logged in.

#1 2017-08-24 06:19:45

sitwano
Member
Registered: 2017-07-07
Posts: 83

Hibernation fails on resume and OS crashes.

Hello all,

I've got hibernation setup exactly as specified in the arch-wiki over here : https://wiki.archlinux.org/index.php/Po … ibernation

My system:
Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
Thinkpad x250
Gnome 3.24.2 on wayland
Arch Linux
kernel: 4.9.46-1-lts

However, this is not working properly. Sometimes it works, but most often it does not. I have looked at the journalctl and this is what I get when I resume from hibernation:

Aug 24 11:36:07 harish-x250 bluetoothd[609]: RFCOMM server failed for Headset Voice gateway: rfcomm_bind: Address a
Aug 24 11:39:41 harish-x250 kernel: Uhhuh. NMI received for unknown reason 2c on CPU 0.
Aug 24 11:39:41 harish-x250 kernel: Do you have a strange power saving mode enabled?
Aug 24 11:39:41 harish-x250 kernel: Dazed and confused, but trying to continue
Aug 24 11:39:42 harish-x250 bluetoothd[609]: RFCOMM server failed for Headset Voice gateway: rfcomm_bind: Address a
Aug 24 11:40:03 harish-x250 kernel: ecryptfs_decrypt_page: Error attempting to read lower page; rc = [-4]
Aug 24 11:40:03 harish-x250 kernel: ecryptfs_readpage: Error decrypting page; rc = [-4]
Aug 24 11:40:03 harish-x250 gnome-session-binary[1186]: Unrecoverable failure in required component org.gnome.Shell
Aug 24 11:40:26 harish-x250 gnome-session-binary[813]: Unrecoverable failure in required component org.gnome.Shell.
Aug 24 11:40:38 harish-x250 bluetoothd[609]: RFCOMM server failed for Headset Voice gateway: rfcomm_bind: Address a

Please note that I have ecrypt encryption set up for my home directory. I am almost certain that I have configured hibernation correctly, because on rare occassions it just works.  Does anyone have any ideas as to why this may be happening? I also see a few kernel errors in the log.

On the occassion that hibernation does somewhat work, I'm presented with a lockscreen from which I am able to unlock my desktop again. All my apps are open as expected and I am able to interact with them. However after a few seconds, gnome seems to crash and I end up getting logged out as the computer asks me to login again.

Thanks for the help in advance guys!

Btw, can a moderator please move this thread/post to Laptop Issues page?

Last edited by sitwano (2017-09-04 09:56:02)

Offline

#2 2017-08-24 06:28:56

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Hibernation fails on resume and OS crashes.

sitwano wrote:
Aug 24 11:39:41 harish-x250 kernel: Do you have a strange power saving mode enabled?
Aug 24 11:39:41 harish-x250 kernel: Dazed and confused, but trying to continue

Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2017-08-24 07:59:29

sitwano
Member
Registered: 2017-07-07
Posts: 83

Re: Hibernation fails on resume and OS crashes.

Ok I feel stupid now. I had tlp and thermald installed. I uninstalled both and hibernation seems to work fine so far now. Weird. I am now using powertop to autotune power saving settings. Will report soon whether or not hibernation continues to work!

Offline

#4 2017-09-03 12:53:13

sitwano
Member
Registered: 2017-07-07
Posts: 83

Re: Hibernation fails on resume and OS crashes.

Unfortunately, hibernation has failed again. I've uninstalled or disabled all power-saving utilities including powertop. Not sure what to do. I looked at the journal but I still get the same messages as before.

Right now I seem to be getting more success if I do the following exactly in this order:

1.) hibernate
2.) close lid
3.) open lid (automatically boots/ resumes OS)
4.) Presented with the lockscreen.


However, if I do the following I get less success:

1.) hibernate
2.) keep lid open
3.) Press power button to boot/resume OS
4.) Open resumption, I get presented with either the gnome lockscreen or the desktop. In both instances the computer hangs and sometimes gnome restarts itself.


I havn't checked yet what effect filling up my ram has on succesful hibernation yet. For this I've loaded up a lot of applications and a game. Together they eat up about 87% of my RAM. I will report back on how this affects hibernation.

Update: It seems that this has nothing to do with the laptop lid. See the following posts below for details.

Last edited by sitwano (2017-09-04 09:56:52)

Offline

#5 2017-09-03 13:12:20

adesh
Member
Registered: 2016-10-05
Posts: 167

Re: Hibernation fails on resume and OS crashes.

sitwano wrote:

3.) open lid (automatically boots/ resumes OS)

That means system did not go into hibernation but sleep mode.
How do you hibernate? Try to reproduce problem without starting graphical environment.

Offline

#6 2017-09-03 14:41:02

sitwano
Member
Registered: 2017-07-07
Posts: 83

Re: Hibernation fails on resume and OS crashes.

No it definitely goes into hibernation. The laptop shuts down. Also after hibernation, my previous desktop is sometimes briefly visible and audio from youtube plays from the previous session. Gnome them proceeds to crash shortly afterwards. Other times I just see a black screen, and after a long while gnome crashes and restarts.

Last edited by sitwano (2017-09-03 15:11:27)

Offline

#7 2017-09-03 15:35:54

adesh
Member
Registered: 2016-10-05
Posts: 167

Re: Hibernation fails on resume and OS crashes.

SInce you earlier stated that Gnome crashes after resume, look for anything suspicious in Xorg log.

Offline

#8 2017-09-04 04:34:32

sitwano
Member
Registered: 2017-07-07
Posts: 83

Re: Hibernation fails on resume and OS crashes.

It seems that hibernation crashes on resume when ram usage is high. The problem seems to be that the default hibernation image size is around 2/5 of the installed ram on the computer as stated in the arch wiki https://wiki.archlinux.org/index.php/Po … _hibernate

I've tried setting /sys/power/image_size to 0. However, that didn't work reliably for heavy ram useage. Setting it to roughly the size of the actual swap partition (which is supposed to be as big or bigger than ram size) seems to do the trick. In my case the ram was 8Gb and my swap partition was 11.3Gb. So I made the image_size equal to 11.2Gb. I will do some further tests and report back.

I set my swap partition size based on https://access.redhat.com/documentation … space.html

Offline

#9 2017-09-04 04:56:16

sitwano
Member
Registered: 2017-07-07
Posts: 83

Re: Hibernation fails on resume and OS crashes.

It seems that hibernation is somewhat consistent now. I've so far hibernated with ram loaded up to 55%. Need to check how it handles hibernating when a large program is loaded into memory. I also need to check whether hibernation on critical battery is successful. In any case, I highly recommend making hibernation image_size as big as RAM, as long as swap partition is as big.

Update 1: I've succesfully resumed from hibernation with around 70% ram load. However, I experienced a lot of lag for a few minutes, especially unresponsive behaviour with firefox. This should be MUCH better and possibly non-existant on machines using SSD harddrives. I will mark this post as solved once the computer hibernates succesfully on critical battery warning.

Update 2: So unfortunately, I've run into the same problem again, even with low memory useage. I checked dmesg to see whether hibernation was successful and this is what I got:

[  177.723252] PM: Creating hibernation image:
[  178.015609] PM: Need to copy 870014 pages
[  178.015614] PM: Normal pages needed: 870014 + 1024, available pages: 1149144
[  177.725224] PM: Restoring platform NVS memory
[  179.137084] PM: noirq restore of devices complete after 80.134 msecs
[  179.137848] PM: early restore of devices complete after 0.718 msecs
[  180.987389] PM: restore of devices complete after 1727.964 msecs
[  180.987554] PM: Image restored successfully.
[  180.987568] PM: Basic memory bitmaps freed

It seems that hibernation image was created and restored to ram successfully. However, I think I found out why gnome crashes.  I also get these messages on dmesg:

[  192.832617] [drm] GPU HANG: ecode 8:0:0xcfdf999d, in gnome-shell [874], reason: Hang on render ring, action: reset
[  192.832618] [drm] GPU hangs can indicate a bug anywhere in the entire gfx stack, including userspace.
[  192.832618] [drm] Please file a _new_ bug report on bugs.freedesktop.org against DRI -> DRM/Intel
[  192.832619] [drm] drm/i915 developers can then reassign to the right component if it's not a kernel issue.
[  192.832619] [drm] The gpu crash dump is required to analyze gpu hangs, so please always attach it.
[  192.832620] [drm] GPU crash dump saved to /sys/class/drm/card0/error
[  192.832647] drm/i915: Resetting chip after gpu hang
[  204.667690] drm/i915: Resetting chip after gpu hang
[  216.822868] drm/i915: Resetting chip after gpu hang
[  228.738386] drm/i915: Resetting chip after gpu hang

Furthermore, looking at the journal, I find that gnome crashes.

Sep 04 12:24:48 harish-x250 gnome-session-binary[843]: Unrecoverable failure in required component org.gnome.Shell.desktop
Sep 04 12:25:38 harish-x250 gnome-session-binary[488]: Unrecoverable failure in required component org.gnome.Shell.desktop

A bug report has been filed at https://bugs.freedesktop.org/show_bug.cgi?id=102534

If anyone has any feedback or advice, please do share!

Last edited by sitwano (2017-09-04 09:57:41)

Offline

#10 2017-09-05 11:27:44

sitwano
Member
Registered: 2017-07-07
Posts: 83

Re: Hibernation fails on resume and OS crashes.

So it appears that this is an issue with LTS kernel since the patch https://bugs.freedesktop.org/show_bug.cgi?id=96526 is probably not applied to it. A way around this is to use the latest non-lts kernel and use early kms start to load i915 and intel_agp modules as shown in https://wiki.archlinux.org/index.php/Po … _hibernate.

Offline

Board footer

Powered by FluxBB