# Hibernate-ram -> system freezes 5 sec after resume [solved]

## chrisfreet

I've searched everywhere, and in topics where people have had similar problems, there are no solutions posted. So, I'm stuck.

Hibernate works correctly; hibernate-ram does not. in Xorg, hibernate-ram results in a proper resume from power down state, but after about 5 seconds the system freezes. The cursor is usable, but no response from X server or keyboard input.  At the console with NO modules loaded, system resumes the same way as when the X server is running: upon resume, the system appears normal, then 5-7 seconds later it freezes. System is then unusable and requires reboot.

Am using x86_64 with Suspend2 2.2.9 with gentoo kernel linux-2.6.18-suspend2-r3, nvidia-drivers-1.0.9631. But, Nvidia module version doesn't matter (neither does any module version) because I have tried and failed resuming from a pristine environment with no modules loaded.  I have followed the Gentoo Suspend2 wiki and implemented all recommended instructions, with minimal deviations.

Have attempted using vbetool, but with no success considering I have no idea what to do with it other than uncomment some of the vbetool commands in the hibernates scrpits. When implementing the vbetool, system will resume to a totally blank screen, but the LCD is powered up. The result is the same in Xorg and at the console with no modules loaded.

Pertinent information; if more info is desired, please feel free to request. I don't want to unnecessarily waste too much space.  I figure the problem must be kernel configuration since I've tried 2.6.16 through 2.6.19-suspend2 sources unsuccessfully. Perhaps it has to do with some sort of initrd capability? I don't compile initrd into the kernel.   I can post or email the entire .config file if requested.  Thanks in advance.

```

# cat /usr/src/linux/.config | grep ACPI

CONFIG_ACPI=y

CONFIG_ACPI_SLEEP=y

CONFIG_ACPI_SLEEP_PROC_FS=y

# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set

# CONFIG_ACPI_AC is not set

# CONFIG_ACPI_BATTERY is not set

CONFIG_ACPI_BUTTON=y

CONFIG_ACPI_VIDEO=y

# CONFIG_ACPI_HOTKEY is not set

# CONFIG_ACPI_FAN is not set

# CONFIG_ACPI_DOCK is not set

CONFIG_ACPI_PROCESSOR=y

CONFIG_ACPI_THERMAL=y

# CONFIG_ACPI_ASUS is not set

# CONFIG_ACPI_IBM is not set

# CONFIG_ACPI_TOSHIBA is not set

CONFIG_ACPI_BLACKLIST_YEAR=0

CONFIG_ACPI_DEBUG=y

CONFIG_ACPI_EC=y

CONFIG_ACPI_POWER=y

CONFIG_ACPI_SYSTEM=y

CONFIG_X86_PM_TIMER=y

# CONFIG_ACPI_CONTAINER is not set

# CONFIG_ACPI_SBS is not set
```

```
 cat /usr/src/linux/.config | grep SUSPEND2

CONFIG_SUSPEND2_CRYPTO=y

CONFIG_SUSPEND2=y

CONFIG_SUSPEND2_FILE=y

CONFIG_SUSPEND2_SWAP=y

CONFIG_SUSPEND2_DEFAULT_RESUME2=""

CONFIG_SUSPEND2_KEEP_IMAGE=y

CONFIG_SUSPEND2_REPLACE_SWSUSP=y
```

```
cat /usr/src/linux/.config|grep RAM 

CONFIG_INITRAMFS_SOURCE=""

CONFIG_BLK_DEV_RAM=y

CONFIG_BLK_DEV_RAM_COUNT=16

CONFIG_BLK_DEV_RAM_SIZE=4096

CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024

# CONFIG_NVRAM is not set

CONFIG_FRAMEBUFFER_CONSOLE=y

# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set

CONFIG_RAMFS=y

# CONFIG_CRAMFS is not set

# CONFIG_FRAME_POINTER is not set
```

I only have drivers for the SATA bus and IDE bus built into the kernel, the rest are modules. Here is output from lspci:

```

# lspci

00:00.0 Host bridge: VIA Technologies, Inc. VT8385 [K8T800 AGP] Host Bridge (rev 01)

00:01.0 PCI bridge: VIA Technologies, Inc. VT8237 PCI bridge [K8T800/K8T890 South]

00:07.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)

00:0b.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8169 Gigabit Ethernet (rev 10)

00:0d.0 RAID bus controller: Promise Technology, Inc. PDC20378 (FastTrak 378/SATA 378) (rev 02)

00:0e.0 FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host Controller (rev 80)

00:0f.0 RAID bus controller: VIA Technologies, Inc. VIA VT6420 SATA RAID Controller (rev 80)

00:0f.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)

00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)

00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)

00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)

00:10.3 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 81)

00:10.4 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 86)

00:11.0 ISA bridge: VIA Technologies, Inc. VT8237 ISA bridge [KT600/K8T800/K8T890 South]

00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 60)

00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration

00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map

00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller

00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control

01:00.0 VGA compatible controller: nVidia Corporation NV25 [GeForce4 Ti 4400] (rev a3)
```

Latest hibernate.log:

```
 # cat hibernate.log 

Starting suspend at Sun Jan 14 13:15:52 CST 2007

hibernate-ram: [01] Executing CheckLastResume ...

hibernate-ram: [01] Executing CheckRunlevel ...

hibernate-ram: [01] Executing LockFileGet ...

hibernate-ram: [01] Executing NewKernelFileCheck ...

hibernate-ram: [05] Executing XStatusSuspendBegin ...

hibernate-ram: [10] Executing EnsureSysfsPowerStateCapable ...

hibernate-ram: [20] Executing XStatusProgress ...

hibernate-ram: [30] Executing ServicesStop ...

Executing /etc/init.d/acpid stop

 * Stopping acpid ...                                                                                                                                                          [ ok ]

Executing /etc/init.d/net.ath0 stop

 * Stopping ath0

 *   Bringing down ath0

 *     Stopping dhcpcd on ath0 ...                                                                                                                                             [ ok ]

 *     Shutting down ath0 ...                                                                                                                                                  [ ok ]

 *     Stopping wpa_cli on ath0 ...                                                                                                                                            [ ok ]

 *     Stopping wpa_supplicant on ath0 ...                                                                                                                                     [ ok ]

Executing /etc/init.d/acpid stop

 * WARNING:  acpid has not yet been started.

hibernate-ram: [30] Executing XStatusProgress ...

hibernate-ram: [40] Executing XStatusProgress ...

hibernate-ram: [50] Executing XStatusProgress ...

hibernate-ram: [59] Executing RemountXFSBootRO ...

hibernate-ram: [60] Executing XStatusProgress ...

hibernate-ram: [70] Executing XStatusProgress ...

hibernate-ram: [80] Executing XStatusProgress ...

hibernate-ram: [89] Executing SaveKernelModprobe ...

Saved /proc/sys/kernel/modprobe is /sbin/modprobe

hibernate-ram: [90] Executing XStatusProgress ...

hibernate-ram: [91] Executing ModulesUnloadAll ...

Unloading module wlan_tkip...

Unloading module snd_pcm_oss...

Unloading module snd_seq_oss...

Unloading module raw1394...

Unloading module sbp2...

Unloading module usblp...

Unloading module usbhid...

Unloading module snd_via82xx...

Unloading module ath_pci...

Unloading module ohci1394...

Unloading module r8169...

Unloading module ehci_hcd...

Unloading module uhci_hcd...

Unloading module snd_mixer_oss...

Unloading module snd_seq_midi_event...

Unloading module wlan_scan_sta...

Unloading module snd_ac97_codec...

Unloading module snd_mpu401_uart...

Unloading module ath_rate_sample...

Unloading module ieee1394...

Unloading module snd_seq...

Unloading module snd_ac97_bus...

Unloading module snd_pcm...

Unloading module snd_rawmidi...

Unloading module wlan...

Unloading module ath_hal...

Unloading module snd_timer...

Unloading module snd_page_alloc...

Unloading module snd_seq_device...

Unloading module snd...

hibernate-ram: [91] Executing ModulesUnloadAll ...

Some modules failed to unload: nvidia i2c_core
```

Hibernate scripts:

```

# cat /etc/hibernate/ram.conf

TryMethod ususpend-ram.conf

TryMethod sysfs-ram.conf

RestartServices acpid

# cat /etc/hibernate/common.conf

Verbosity 3

LogFile /var/log/hibernate.log

LogVerbosity 1

AlwaysForce yes

Distribution gentoo

XDisplay :0

SaveClock restore-only

FullSpeedCPU yes

UnloadAllModules yes

LoadModules auto

StopServices acpid net.ath0

StartServices acpid

XStatus gnome

# cat /etc/hibernate/ususpend-ram.conf

USuspendMethod ram

Include common.conf

# cat /etc/hibernate/sysfs-ram.conf

UseSysfsPowerState mem

Include common.conf
```

Snippet from /var/log/messages after successful boot (there is no indication of failure upon unsuccessful resume from hibernate-ram):

```

Jan 14 13:22:14 gentoo-amd64 syslogd 1.4.1: restart.

Jan 14 13:22:15 gentoo-amd64 kernel: klogd 1.4.1, log source = /proc/kmsg started.

Jan 14 13:22:15 gentoo-amd64 kernel: Inspecting /boot/System.map-2.6.18-150107

Jan 14 13:22:15 gentoo-amd64 kernel: Loaded 26671 symbols from /boot/System.map-2.6.18-150107.

Jan 14 13:22:15 gentoo-amd64 kernel: Symbols match kernel version 2.6.18.

Jan 14 13:22:15 gentoo-amd64 kernel: Bootdata ok (command line is root=/dev/sda5 resume2=swap:/dev/sda3 ro video=vesafb:mtrr:3 quiet splash vga=794 )

Jan 14 13:22:15 gentoo-amd64 kernel: Linux version 2.6.18-150107 (root@gentoo-amd64) (gcc version 4.1.1 (Gentoo 4.1.1-r3)) #2 Sun Jan 14 13:05:33 CST 2007

Jan 14 13:22:15 gentoo-amd64 kernel: BIOS-provided physical RAM map:

Jan 14 13:22:15 gentoo-amd64 kernel:  BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)

Jan 14 13:22:15 gentoo-amd64 kernel:  BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)

Jan 14 13:22:15 gentoo-amd64 kernel:  BIOS-e820: 00000000000d4000 - 00000000000de000 (reserved)

Jan 14 13:22:15 gentoo-amd64 kernel:  BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)

Jan 14 13:22:15 gentoo-amd64 kernel:  BIOS-e820: 0000000000100000 - 000000003fff0000 (usable)

Jan 14 13:22:15 gentoo-amd64 kernel:  BIOS-e820: 000000003fff0000 - 000000003fff8000 (ACPI data)

Jan 14 13:22:15 gentoo-amd64 kernel:  BIOS-e820: 000000003fff8000 - 0000000040000000 (ACPI NVS)

Jan 14 13:22:15 gentoo-amd64 kernel:  BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved)

Jan 14 13:22:15 gentoo-amd64 kernel:  BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)

Jan 14 13:22:15 gentoo-amd64 kernel:  BIOS-e820: 00000000fff80000 - 0000000100000000 (reserved)

Jan 14 13:22:15 gentoo-amd64 kernel: DMI 2.3 present.

...

Jan 14 13:22:15 gentoo-amd64 kernel: Suspend2 Core.

Jan 14 13:22:15 gentoo-amd64 kernel: Suspend2 Userspace UI Support module loaded.

Jan 14 13:22:15 gentoo-amd64 kernel: Suspend2 Checksumming module loaded.

Jan 14 13:22:15 gentoo-amd64 kernel: Suspend2 Userspace Storage Manager module loaded.

Jan 14 13:22:15 gentoo-amd64 kernel: Suspend2 Compressor module loaded.

Jan 14 13:22:15 gentoo-amd64 kernel: Suspend2 Encryptor module loaded.

Jan 14 13:22:15 gentoo-amd64 kernel: Suspend2 Block I/O module loaded.

Jan 14 13:22:15 gentoo-amd64 kernel: Suspend2 Swap Allocator module loaded.

Jan 14 13:22:15 gentoo-amd64 kernel: Suspend2 File Allocator module loaded.

Jan 14 13:22:15 gentoo-amd64 kernel: ACPI: (supports S0 S1 S3 S4 S5)

Jan 14 13:22:15 gentoo-amd64 kernel: Suspend2 2.2.9: SwapAllocator: Signature found.

Jan 14 13:22:15 gentoo-amd64 kernel: Suspend2 2.2.9: Resuming enabled.

Jan 14 13:22:15 gentoo-amd64 kernel: Suspend2 2.2.9: Normal swapspace found.

Jan 14 13:22:15 gentoo-amd64 kernel: Suspend2 2.2.9: No image found.

...
```

----------

## pgolik

Do you have any ATA (not SATA) drives (HD or CD)? Does it happen when some process accesses an ATA device?

If so, then it may be related to this problem, there's a patch mentioned in one of the latest posts.

----------

## chrisfreet

 *pgolik wrote:*   

> Do you have any ATA (not SATA) drives (HD or CD)? Does it happen when some process accesses an ATA device?

 

I do have 1 ATA drive, but it has not been hooked up to the bus during the testing of the system. I haven't had the power hooked up to it for at least 6 months prior to this issue. Thanks anyway.

----------

## beatryder

Edit the /etc/hibernate/blacklisted-modules and comment out the one with nvidia on it.

----------

## chrisfreet

 *beatryder wrote:*   

> Edit the /etc/hibernate/blacklisted-modules and comment out the one with nvidia on it.

 

Let me get this straight: comment out the NVIDIA entry in the blacklisted-modules? At the time of asking for this confirmation, I have not tried this, so I have no idea what the effect would be.  I would guess this will have no effect since the nvidia module is successfully being unloaded at the time of both hibernate to disk and to ram, and being successfully reinserted when coming back from both.  But, what the hell, I'll try anyway.

Please keep in mind that, as I mentioned, I cannot successfully resume from hibernate-ram with even no modules installed, and without X running (basically init level of 2), with no services started, minimal processes running.

----------

## beatryder

 *chrisfreet wrote:*   

>  *beatryder wrote:*   Edit the /etc/hibernate/blacklisted-modules and comment out the one with nvidia on it. 
> 
> Let me get this straight: comment out the NVIDIA entry in the blacklisted-modules? At the time of asking for this confirmation, I have not tried this, so I have no idea what the effect would be.  I would guess this will have no effect since the nvidia module is successfully being unloaded at the time of both hibernate to disk and to ram, and being successfully reinserted when coming back from both.  But, what the hell, I'll try anyway.
> 
> Please keep in mind that, as I mentioned, I cannot successfully resume from hibernate-ram with even no modules installed, and without X running (basically init level of 2), with no services started, minimal processes running.

 

In regards to the nvidia module, read the last line of the logs that *you* posted. I am not here to argue with you. But I do wish to help.

Have you tried this from a console without X (yes I know you have tried init 2)

```

# echo mem > /sys/power/state

```

If that works, then you have a starting point. If it does not, Then you might have a buggy DSDT, and I have no idea how you can fix that.

I would check your computers manufacturers website for a BIOS update which might help.

----------

## chrisfreet

 *Quote:*   

> Have you tried this from a console without X (yes I know you have tried init 2)
> 
> ```
> 
> # echo mem > /sys/power/state
> ...

 

Have not tried this (why? I don't know), but that will be my next course. I don't expect it will resume correctly, but like I said, who the hell knows.

 *Quote:*   

> I would check your computers manufacturers website for a BIOS update which might help.

 

Yeah, I've been putting this off because I haven't had Winbloze installed for years, and I don't like the idea of making a boot CD with a DOS image just to accomplish this (I don't have a floppy drive, and installing Winbloze allows the ability to do the BIOS update without booting from a disc -- what a pain in the a$$).  I suppose a BIOS update is probably in order, though. Will update on progress as I make any.

----------

## chrisfreet

UPDATE:

After full BIOS update to current version, no change in the problem described in the original post above.

----------

## beatryder

I would look here then:

http://gentoo-wiki.com/HOWTO_Fix_Common_ACPI_Problems

----------

## chrisfreet

 *beatryder wrote:*   

> I would look here then:
> 
> http://gentoo-wiki.com/HOWTO_Fix_Common_ACPI_Problems

 

I'm willing to do the research and the work, but I wonder why you suggest this? Just curious.... Perhaps you have the same type of experience I am having with this? 

Thanks.

(And a small update: I attempted the initial diagnosis for the DSDT.  The result is that according to the website above, I have ACPI issues / bugs. Will continue and post result later.)

----------

## beatryder

When I get bored, I look through the HOWTO's on various sites. That one stuck in my head and considering your issue, I thought might be an appropriate jumping off point for you.

I hope it works out for you.

Also, keep the nvidia line commented out in the hibernate blacklisted-modules. Suspend to ram will never work if you don't.

----------

## chrisfreet

 *beatryder wrote:*   

> When I get bored, I look through the HOWTO's on various sites. That one stuck in my head and considering your issue, I thought might be an appropriate jumping off point for you.
> 
> I hope it works out for you.
> 
> Also, keep the nvidia line commented out in the hibernate blacklisted-modules. Suspend to ram will never work if you don't.

 

No dice.  I went through the process described at http://gentoo-wiki.com/HOWTO_Fix_Common_ACPI_Problems and addressed the issues that resulted from that process; incorporated all changes required into the kernel, and I am now running that very kernel.  There is no change using this kernel from using the kernel without the fix from the above quoted page.  So, I'm still searching for a resolution to the problem described in the first post in this thread.

----------

## chrisfreet

I finally got around to testing the memory in the machine having the problem described above. Apparently, according to memtest86, one of the memory sticks is bad. Will test to discover which is bad, remove it, and retest the machine. Will post result later.

----------

## chrisfreet

NO DICE again. Removing the apparently offending stick of memory, after confirming the other stick is viable, had no effect on the outcome of the resume from hibernate-ram.  Still looking for a solution.

----------

## chrisfreet

Have marked the topic solved.... But, only because I can't prove it's associated with Gentoo / the Linux kernel.

I believe I have found proof that the issue described above is a hardware issue on my end, but I have no idea what the issue really is.  After installing Win2k (ugh!) I attempted to suspend-to-ram and the same thing happened -- same result as the first post in this thread.  So, at least this seems to be proof that the issue is not associated with the Linux kernel, which is good news to me.

Now on to narrowing down the problem with the hardware.  Thanks to whomever posted.

----------

## Hypersniper

 *chrisfreet wrote:*   

> Have marked the topic solved.... But, only because I can't prove it's associated with Gentoo / the Linux kernel.
> 
> I believe I have found proof that the issue described above is a hardware issue on my end, but I have no idea what the issue really is.  After installing Win2k (ugh!) I attempted to suspend-to-ram and the same thing happened -- same result as the first post in this thread.  So, at least this seems to be proof that the issue is not associated with the Linux kernel, which is good news to me.
> 
> Now on to narrowing down the problem with the hardware.  Thanks to whomever posted.

 

Marking it as SOLVED when it isn't wasn't that nice.  :Sad: 

Any update on the situation ????

----------

## chrisfreet

 *Hypersniper wrote:*   

>  *chrisfreet wrote:*   Have marked the topic solved.... But, only because I can't prove it's associated with Gentoo / the Linux kernel.
> 
> I believe I have found proof that the issue described above is a hardware issue on my end, but I have no idea what the issue really is.  After installing Win2k (ugh!) I attempted to suspend-to-ram and the same thing happened -- same result as the first post in this thread.  So, at least this seems to be proof that the issue is not associated with the Linux kernel, which is good news to me.
> 
> Now on to narrowing down the problem with the hardware.  Thanks to whomever posted. 
> ...

 

It was a hardware problem. Since I haven't changed the hardware, there can be no solution via the forums (read: no change).  Sorry.

----------

## gregy

I had a similar problem. I ran a tail -f /var/log/messages from different machine and waited for the freeze. I found out that the harddrive is refusing access data. It was so becouse I had hard drive password enabled in bios. If you have similar feature in your machine try to disable it.

----------

