# suspend2: hibenate & hibernate-ram problems [solved]

## menschmeier

Hi,

I am trying to make suspend2 working on amd64. I am using vanilla-kernel-2.6.9.2 with suspend2. I have a SATA drive. 

 *Quote:*   

> 
> 
> # uname -rm
> 
> 2.6.19-suspend2-r1 x86_64
> ...

 

My problem is that hibernate-ram is supending well but does not resume; hibernate hangs while suspending.

I configured it in the kernel this way:

 *Quote:*   

> # grep SUSPEND .config
> 
> # CONFIG_SOFTWARE_SUSPEND is not set
> 
> CONFIG_SUSPEND_SMP=y
> ...

 

A hibernate-ram -n shows no errors, just the wlan stays down, but this is not a problem, I can restart it manually. When I try to resume from suspend-to-ram the disk and fan are restarting, but the screen stays black. So I think it is not a SATA problem.I expected my graphics card (intel 945 gma with i810 driver) to work, I read that it should be supported. 

I tried using vbetool version 0.7 to get the graphics card work, but a hibernate-ram -n shows then:

 *Quote:*   

> Save video state failed
> 
> Calling INT 0x15 (F000:F859)
> 
>  EAX is 10005F00
> ...

  So I think vbetool is not working for me.

Here is my hardware list.

 *Quote:*   

> # lspci
> 
> 00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express Memory Controller Hub (rev 03)
> 
> 00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller (rev 03)
> ...

 

Suspend-to-disk hangs while suspending. But make suspend-to-ram work has higher priority for me right now.

So I am quite frustrated after shutting down the system the very hard way and rebooting. Does anyone has an idea what I should do?

Edit: I tried both from S run-level (single user mode) - no success.

menschmeier

----------

## menschmeier

Hi,

see here https://forums.gentoo.org/viewtopic-p-3886451.html#3886451

menschmeier

----------

## cgmd

Hi, menschmeier...

I'm currently struggling with hibernate on my Thinkpad X60s, operating with sudpend2-sources-2.6.18.r1. My hibernate repeatedly hangs upon resume.

You stated:  *Quote:*   

> Edit: I tried both from S run-level (single user mode) - no success. 

 

I want to try from S run-level, and I have tried the method described at www.suspend2.net.

I'm unable , however, to get completely through the described protocol to get to the S run-level, failing just after # swapon -a: *Quote:*   

> # You may need to start devfsd or udev too:
> 
>     * # /etc/init.d/devfsd start
> 
> And now try running the hibernate script to see if it succeeds. If so, you can blame a module and now the process begins to load modules one by one until hibernation breaks.
> ...

 

 I have no defvsd or udev in my /etc/init.d, to start, and I know not what to do next to get into S run-level.  :Sad: 

Any tips?

Thanks!

----------

## menschmeier

Hi,

without udev - how do you handle your device files? Manually?

Because a kernel >2.6.13 does not support devfs, you must have udev. Check if you have sys-fs/udev installed?

In my case the bad configured SATA controller caused the trouble?

Do you have a SATA controller?

menschmeier

----------

## cgmd

menshmeier...

I didn't mean to imply that I have no udev. Only that there is no listing for it in /etc/init.d. I know it starts early in the boot process by loading udevd, but I don't know how I would manually start udevd (for the intent of running from S run level, as I wish to do).

I do, indeed, have a sata controller, :

```

*-ide

             description: IDE interface

             product: 82801G (ICH7 Family) IDE Controller

             vendor: Intel Corporation

             physical id: 1f.1

             bus info: pci@0000:00:1f.1

             version: 02

             width: 32 bits

             clock: 33MHz

             capabilities: ide bus_master

             configuration: driver=PIIX_IDE latency=0

        *-storage

             description: SATA controller

             product: 82801GBM/GHM (ICH7 Family) SATA AHCI Controller

             vendor: Intel Corporation

             physical id: 1f.2

             bus info: pci@0000:00:1f.2

             logical name: scsi0

             version: 02

             width: 32 bits

             clock: 66MHz

             capabilities: storage msi pm ahci_1.0 bus_master cap_list emulated

             configuration: driver=ahci latency=0

           *-disk

                description: SCSI Disk

                product: ST910021AS

                vendor: ATA

                physical id: 0.0.0

                bus info: scsi@0:0.0.0

                logical name: /dev/sda

                version: 4.06

                serial: 3MH1089Z

                size: 93GB

                capabilities: partitioned partitioned:dos

                configuration: ansiversion=5
```

Unfortunately, I know nothing about configuring that controller.   :Sad: 

Any thoughts, regarding either starting udevd or dealing with the sata controller?

Thanks!

----------

## menschmeier

Hi,

udevd is not started by an explicit /etc/init.d script ...

But it is there, see:

ps -aef | grep udev

root      1089     1  0 11:08 ?        00:00:00 /sbin/udevd --daemon

The problem you have might be cause by the SATA controller config. I have the same controller. So you have to rebuild a kernel with a proper SATA config, do not include any old IDE controller config stuff in. So do not set anything on ATA/ATAPI/MFM/RLL support!

Here is a part of my config:

 *Quote:*   

> #
> 
> # ATA/ATAPI/MFM/RLL support
> 
> #
> ...

 

Try this, after I changed the config to this hibernate worked.

menschmeier

----------

## cgmd

menschmeier...

Thank you for sharing the above information. I can confirm that un-setting ATA/ATAPI/MFM/RLL does allow suspend-resume to work properly. On the other hand, it knocks out the cdrom/dvd. At a minimum, for the cdrom/dvd to work, my config must contain:

```

# ATA/ATAPI/MFM/RLL support

#

CONFIG_IDE=y

CONFIG_BLK_DEV_IDE=y

#

# Please see Documentation/ide.txt for help/info on IDE drives

#

# CONFIG_BLK_DEV_IDE_SATA is not set

# CONFIG_BLK_DEV_HD_IDE is not set

# CONFIG_BLK_DEV_IDEDISK is not set

# CONFIG_IDEDISK_MULTI_MODE is not set

# CONFIG_BLK_DEV_IDECS is not set

CONFIG_BLK_DEV_IDECD=y

# CONFIG_BLK_DEV_IDETAPE is not set

# CONFIG_BLK_DEV_IDEFLOPPY is not set

# CONFIG_BLK_DEV_IDESCSI is not set

# CONFIG_IDE_TASK_IOCTL is not set

#

# IDE chipset support/bugfixes

#

CONFIG_IDE_GENERIC=y

# CONFIG_BLK_DEV_CMD640 is not set

CONFIG_BLK_DEV_IDEPCI=y

# CONFIG_IDEPCI_SHARE_IRQ is not set

# CONFIG_BLK_DEV_OFFBOARD is not set

# CONFIG_BLK_DEV_GENERIC is not set

# CONFIG_BLK_DEV_OPTI621 is not set

# CONFIG_BLK_DEV_RZ1000 is not set

CONFIG_BLK_DEV_IDEDMA_PCI=y

# CONFIG_BLK_DEV_IDEDMA_FORCED is not set

# CONFIG_IDEDMA_PCI_AUTO is not set

# CONFIG_BLK_DEV_AEC62XX is not set

# CONFIG_BLK_DEV_ALI15X3 is not set

# CONFIG_BLK_DEV_AMD74XX is not set

# CONFIG_BLK_DEV_ATIIXP is not set

# CONFIG_BLK_DEV_CMD64X is not set

# CONFIG_BLK_DEV_TRIFLEX is not set

# CONFIG_BLK_DEV_CY82C693 is not set

# CONFIG_BLK_DEV_CS5520 is not set

# CONFIG_BLK_DEV_CS5530 is not set

# CONFIG_BLK_DEV_CS5535 is not set

# CONFIG_BLK_DEV_HPT34X is not set

# CONFIG_BLK_DEV_HPT366 is not set

# CONFIG_BLK_DEV_SC1200 is not set

CONFIG_BLK_DEV_PIIX=y

# CONFIG_BLK_DEV_IT821X is not set

# CONFIG_BLK_DEV_NS87415 is not set

# CONFIG_BLK_DEV_PDC202XX_OLD is not set

# CONFIG_BLK_DEV_PDC202XX_NEW is not set

# CONFIG_BLK_DEV_SVWKS is not set

# CONFIG_BLK_DEV_SIIMAGE is not set

# CONFIG_BLK_DEV_SIS5513 is not set

# CONFIG_BLK_DEV_SLC90E66 is not set

# CONFIG_BLK_DEV_TRM290 is not set

# CONFIG_BLK_DEV_VIA82CXXX is not set

# CONFIG_IDE_ARM is not set

# CONFIG_IDE_CHIPSETS is not set

CONFIG_BLK_DEV_IDEDMA=y

# CONFIG_IDEDMA_IVB is not set

# CONFIG_IDEDMA_AUTO is not set

# CONFIG_BLK_DEV_HD is not set

#

# SCSI device support

#
```

That, in turn knocks out suspend-resume.   :Sad: 

The only alternative with which I can manage seems to be 2 differently configured kernels from which to choose in the bootloader menu. 

Might there be other choices, as well?

Thanks!

----------

## menschmeier

Hi,

I don't know if it is posssible, but can you compile the driver for your dvd a a module, unload it before hibernating and reload it after resume ... ?

menschmeier

----------

## menschmeier

BTW, check out the mailing list of kernel.org for that stuff, maybe they can help you. Alan Cox is always around there.  :Smile: 

menschmeier

----------

