# Hibernation stalls 3 times before resuming

## impact0r

I am having trouble resuming from hibernation using TuxOnIce method.

The thing works, but in a very strange manner. Here's how it looks:

 1. Computer boots and finds resume image and starts resume. It reads image from disk (takes ~10 seconds)

Reading kernel & process data...

Atomic restore.

Doing atomic copy/restore.

 2.  Resume pauses for about ~30 seconds displaying above message. There is NO disk or any other activity visible.

 3. Screen goes blank, it beeps. and pauses for another ~30 seconds. There is NO disk or any other activity visible.

 4. It beeps and pauses for another ~30 seconds. There is NO disk or any other activity visible. The screen is blank.

 5. Screen blinks once, then it beeps and pauses for another ~30 seconds.  There is NO disk or any other activity visible.

 6. Resume continues normally without displaying any errors. Disk resumes activity. Desktop visible within seconds.

Post atomic.

Cleaning up...

Here is the logs: http://pastebin.com/dBRMpjd4

And my config files: http://pastebin.com/q727r6kR

Hibernate debug log: http://pastebin.com/hJb66Wi0

This is obviously not a question or reading image from the disk. The issue is elsewhere. It is the same if I unplug all external USB devices.

I am on my wits' end.

----------

## Hypnos

It seems that some device is not resuming properly, and from the beeping/blanking that it is likely the NVIDIA hybrid graphics.  

Do you get the same behavior hibernating without X running?

What if you only use the Intel GPU?

TuxOnIce works flawlessly on my Thinkpad X301, which has only the Intel GPU.

----------

## impact0r

I doubt it's a hybrid. I think I only have nvidia gpu, no intel.

Anyway, you were right - hibernating/resuming from console without X running goes smooth as butter. 

What can be done about it?

----------

## Hypnos

Well, you do have an i915 parameter in your kernel commandline, as well as GPU switching and Intel, Radeon and Nouveau DRM drivers enabled in your kernel config.  Anyway, your BIOS setup will tell you.

What is your laptop model?  You may need to enable some video quirk.  I use pm-utils because it takes care of these quirks for you to some extent.  You can look at what is done for your model, and duplicate it in your hibernate config:

http://cgit.freedesktop.org/pm-utils/tree/video-quirks/20-video-quirk-pm-lenovo.quirkdb?h=video-quirks

----------

## impact0r

I only put i915 stuff in my kernel cmd because I read it helps with battery life and it was unclear whether I need to actually have this chipset to get the benefit.

My laptop is ThinkPad R61 8918-DEG with Nvidia Quadro. Here's some details:

```
$ lspci

00:00.0 Host bridge: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub (rev 0c)

00:01.0 PCI bridge: Intel Corporation Mobile PM965/GM965/GL960 PCI Express Root Port (rev 0c)

00:19.0 Ethernet controller: Intel Corporation 82566MC Gigabit Network Connection (rev 03)

00:1a.0 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 (rev 03)

00:1a.1 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 03)

00:1a.7 USB controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 03)

00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)

00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03)

00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 03)

00:1c.2 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 3 (rev 03)

00:1c.3 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 4 (rev 03)

00:1c.4 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 5 (rev 03)

00:1d.0 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 03)

00:1d.1 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 03)

00:1d.2 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 03)

00:1d.7 USB controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03)

00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3)

00:1f.0 ISA bridge: Intel Corporation 82801HM (ICH8M) LPC Interface Controller (rev 03)

00:1f.1 IDE interface: Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) IDE Controller (rev 03)

00:1f.2 SATA controller: Intel Corporation 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AHCI mode] (rev 03)

00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 03)

01:00.0 VGA compatible controller: NVIDIA Corporation G86 [Quadro NVS 140M] (rev a1)

03:00.0 Network controller: Intel Corporation PRO/Wireless 4965 AG or AGN [Kedron] Network Connection (rev 61)

15:00.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ba)

15:00.1 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev 04)

15:00.2 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 21)

15:00.4 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 11)

15:00.5 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev 11)
```

I am running proprietary Nvidia drivers - last version of the 29x branch (3xx gives me issues with screen blanking).

I also removed pm-utils because I use a dedicated power script instead.

----------

## Hypnos

Did tuxonice work properly with pm-utils?  If so, then likely the problem is that you need to employ the quirks that pm-utils did for you.  For the R61, it looks like you need s3_bios and s3_mode .

Another thing to try, if you aren't doing it already, is to switch to text mode before hibernation and switching back after resume.  You can put it in your script with the "chvt" command.

----------

## impact0r

No, Tux was not working properly even with pm-utils although I never employed any quirks.

Switching to text mode is not an option because that means quitting X and loosing all my opened apps, which defeats the point of hibernation.

If it makes any difference, standard non-tux hibernation resumes just fine.

----------

## Hypnos

 *impact0r wrote:*   

> Switching to text mode is not an option because that means quitting X and loosing all my opened apps, which defeats the point of hibernation.

 

No.  "chvt N" just does the same thing as the "ctl-alt-FN" key combination.  If you switch to a text console X continues to operate merrily on console 7.

----------

## impact0r

Ah, that's right. I never thought about checking out tty7.

I just checked and switching to text mode doesn't change anything.

Do you have some other ideas?

----------

## Hypnos

The obvious thing is to try every quirk setting in hibernate.conf (or re-implement them in your script).

Also, da Google brought this up:  http://forums.lenovo.com/t5/R-and-L-Series-ThinkPad-Laptops/Error-post-hibernation-lenovo-r61/td-p/731169

A BIOS update could brick your computer, kill your dog or leave your sterile, but maybe it could also fix the issue.

----------

## impact0r

My BIOS is two years newer than the latest official. 

By quirk you mean setting? I tried all relevant settings I could find, but nothing helped.

----------

## Hypnos

If you read the hibernate.conf man page, there are many tweaks one can try.  Some potentially relevant ones:

*Vbe*

SwitchToTextMode

SwitchToTextModeOnResume

----------

## impact0r

I tried anything remotely relevant but to no avail.

----------

## Hypnos

It's entirely possible that the problem is inside the nVidia binary blob and there is no way to work around it.  You could try the open source nouveau drivers if you can tolerate the performance penalty.

It does seem a bit funny to me that you can hibernate/resume cleanly when not running X, but not when switching to a text console while running X ...

----------

## Hu

When you ran X and switched to the text console, what X applications did you have open?  Were you running anything that uses any of the advanced features of the card, such as 3D, compositing, etc.?  This could help us to narrow down whether the problem is related to specific functionality of the graphics driver.  Also, when you hibernated from text mode successfully, had you run X and exited it or booted directly to a text console?  On some systems, the nVidia driver may not be loaded until the first time you start X.

----------

## impact0r

In X, I have all various things running, most notably compiz. I am running XFCE but it is quit stripped down and compiz does the usual wundows management work, with 3d effects on.

When I hibernated from text mode, I did not run X, but booted directly to console. This was because I found no way of quitting X. Whenever I did - it would restart, so I removed SLIM from rc.conf and this way booted straight into console.

----------

## impact0r

I checked with the newest NVIDIA drivers and it's still the same issue.

----------

## khayyam

Note that impact0r is on Arch Linux ... and not Gentoo ... and has omited to mention this fact.

----------

## impact0r

What's more, my laptop is black and draws power from a 220V grid. Since this is just as relevant to the issues I asked about, why don't you go and add also that information to all my threads on this forum, however ancient they may be?

You strike me as a person well familiar with the phrase "get a life".

----------

## Hypnos

khayyam's motivations aside, it is indeed inappropriate to ask support questions on these forums if you are not using Gentoo.  There are two main reasons:

1) Everyone's time is limited, so the knowledgeable people here would prefer to spend it on Gentoo users' problems, to strengthen the Gentoo community.

2) It's annoying and a waste of time if a proposed solution cannot be implemented due to distribution differences. 

If you want distribution agnostic support, consider asking at LinuxQuestions.  Since you're using a ThinkPad, the Gentoo on R61 page at ThinkWiki maybe useful, though likely out of date.

Good luck.

----------

## khayyam

 *impact0r wrote:*   

> What's more, my laptop is black and draws power from a 220V grid. Since this is just as relevant to the issues I asked about, why don't you go and add also that information to all my threads on this forum, however ancient they may be?

 

impact0r ... what is relevant is that this is *also* not a "black laptop" support forum, though if you have a black laptop running gentoo then here would be the obvious place to ask for help. You have already wasted my time in another of your (three!) threads, and others would no doubt send you elsewhere if you were upfront from the start and stated that your a support vampire. Again, this is not a general support forum, its a "gentoo" support forum, so take your questions to the arch linux forum, linuxquestions, or someplace else.

 *impact0r wrote:*   

> You strike me as a person well familiar with the phrase "get a life".

 

... what, so you can suck all the blood from it? ... nah

khay

----------

