
Ask HN: Any tips on debugging Linux hibernate issues? - war1025
I tried posting on r&#x2F;linuxquestions but the only response I got was generally unhelpful. I thought I would try here since this seems like a more professional crowd.<p>I have two laptops: Thinkpad T540p, Dell Insprion.<p>I&#x27;ve had the thinkpad for ~2 years. Hibernate has never worked consistently on it. I can usually get it to resume once or twice, but after I try to do anything useful, it will freeze when waking up.<p>About a month ago I bought the Inspiron for my wife. It seems to have the same issue. I had always assumed that the Thinkpad had issues because it had a dedicated Nvidia graphics card. But the inspiron only has onboard Intel, so that seems to not be the issue.<p>I found [this article](https:&#x2F;&#x2F;01.org&#x2F;blogs&#x2F;rzhang&#x2F;2015&#x2F;best-practice-debug-linux-suspend&#x2F;hibernate-issues) and set the `no_console_suspend` boot parameter on both laptops.<p>Both go through the resume process and everything seems to go fine until they get stuck at a call to `lapic_suspend`. It looks like to me that is the call that starts hibernate, and it is trying to come back out of it and resume execution. Except for whatever reason, both laptops get hung instead.<p>Has anyone experienced this issue? Any tips? Hibernate has always worked great for me up until these two laptops.<p>Both are running Debian Unstable.
This is the current `uname -a`: `Linux Babel 4.7.0-1-amd64 #1 SMP Debian 4.7.8-1 (2016-10-19) x86_64 GNU&#x2F;Linux`<p>I am a software developer by trade and wouldn&#x27;t mind digging through source code if it came to that, but I&#x27;m just not even sure where to start.
======
amboar
This is a shot in the dark but some nasty hibernation bugs are fixed in
4.8[1]. It's probably worth booting a kernel from that series to see if it
helps.

[1] [https://lwn.net/Articles/701639/](https://lwn.net/Articles/701639/)

~~~
war1025
So far it looks like this may have been the issue. I've done some stress
testing of things that always made it fail to resume in the past, and it has
successfully woken up each time.

Thanks for the tip!

~~~
amboar
Great! Thanks for taking the time to reply. Unresolved questions always bug
me.

------
officialchicken
Start with a pendrive / USB boot and try different distro. Try both older and
newer debian-based distros like mint or ubuntu which usually have better
laptop support than vanilla debian to see if you can narrow down the problem.

------
war1025
I found [this thread]([http://www.gossamer-
threads.com/lists/linux/kernel/2306799](http://www.gossamer-
threads.com/lists/linux/kernel/2306799)) and it seems to describe basically
what I am running in to. Unfortunately it drops off and I haven't found if it
picks up again in a different thread.

Both laptops are only using the onboard Intel card.

------
war1025
An update a week later: The 4.8 kernel appears to have fixed the issue. I have
not had a single issue all week.

------
tortasaur
Perhaps use smartctl to run a long test on the drive you're hibernating to.

------
Raed667
Might be a GPU driver issue. Are using the Nvidia binary?

~~~
war1025
Only one of the laptops has an Nvidia card, and I've used `bbswitch` to
disable it.

------
eqyiel
I have the same problem with a Thinkpad x240. Never managed to figure it out,
instead I just use suspend which works reliably.

~~~
war1025
I normally just use suspend too.

I would definitely suggest trying the 4.8 kernel as mentioned in another
comment. So far I haven't been able to make it fail.

~~~
sigjuice
By any chance, do you know which kernel commit(s) fixed your issue? Maybe git
bisect can pinpoint the commit? It would be interesting to know what the exact
bug was.

~~~
war1025
This is the article:
[https://lwn.net/Articles/701639/](https://lwn.net/Articles/701639/)

