# (solved) Problem with hibernation (ususpend)

## Uzytkownik

I have problem with hibernation. 

1. When I hibernate the screen is blank. I have Intel i915 card, KMS and fbcon.

2. I cannot resume. When I turn on the power it prints message as if resume command was run but boots normally.

init script:

```
#!/bin/busybox ash

local X ROOT RUNLEVEL INIT

# Preliminary stuff

mkdir -p /proc /sys /mnt

mount -t proc proc /proc

mount -t sysfs sysfs /sys

mdev -s

echo "TEST"

# Try to resume. This never returns if it succeeds

resume

# Parse the command line for relevant options.

INIT=/sbin/init

for X in `cat /proc/cmdline`

do

   case "$X" in

      root=*) ROOT=${X#root=} ;;

      [0-6Ss]) RUNLEVEL=${X} ;;

      init=*) INIT=${X#init=} ;;

   esac

done

# Mount and switch root.

mount -o ro ${ROOT} /mnt

umount -f /sys || umount -l /sys

umount -f /proc || umount -l /proc

exec switch_root /mnt ${INIT} ${RUNLEVEL}

```

initrd:

```
dir   /bin                  0755   0 0

file   /bin/busybox      /bin/busybox      0755   0 0

file   /bin/resume      /usr/lib/suspend/resume   0755   0 0

dir   /dev                  0755   0 0

nod   /dev/console               0600   0 0   c  5   1

nod   /dev/snapshot               0660   0 0   c 10 231

dir   /etc                  0755   0 0

file   /etc/suspend.conf   /etc/suspend.conf   0644   0 0

file   /init         /usr/src/init      0755   0 0

```

suspend.conf:

```
snapshot device = /dev/snapshot

resume device = /dev/sda9

#image size = 350000000

#suspend loglevel = 2

compute checksum = y

compress = y

#encrypt = y

#early writeout = y

#splash = y

```

Any ideas?

----------

## jbarnes8

This is not my area of expertise, but try looking at acpi or apm (advanced power management). acpi is the newer technology. I'm not sure of it's exact acronymn though. Maybe I don't know what I'm talking about...but anyhow, run make menuconfig on your kernel and see if you have either acpi or apm configured. If not, then in my newbie opinion, that would be a good place to start looking for the solution.

----------

## Uzytkownik

 *jbarnes8 wrote:*   

> This is not my area of expertise, but try looking at acpi or apm (advanced power management). acpi is the newer technology. I'm not sure of it's exact acronymn though. Maybe I don't know what I'm talking about...but anyhow, run make menuconfig on your kernel and see if you have either acpi or apm configured. If not, then in my newbie opinion, that would be a good place to start looking for the solution.

 

I have ACPI enabled but I don't see how would it affect either of problems...

----------

## jbarnes8

 *Uzytkownik wrote:*   

>  *jbarnes8 wrote:*   This is not my area of expertise, but try looking at acpi or apm (advanced power management). acpi is the newer technology. I'm not sure of it's exact acronymn though. Maybe I don't know what I'm talking about...but anyhow, run make menuconfig on your kernel and see if you have either acpi or apm configured. If not, then in my newbie opinion, that would be a good place to start looking for the solution. 
> 
> I have ACPI enabled but I don't see how would it affect either of problems...

 

Sorry. I mean. Power Management->Hibernation. I was thinking that was under acpi and apm. 

I don't know. You probably know more than I do

----------

## Uzytkownik

 *jbarnes8 wrote:*   

>  *Uzytkownik wrote:*    *jbarnes8 wrote:*   This is not my area of expertise, but try looking at acpi or apm (advanced power management). acpi is the newer technology. I'm not sure of it's exact acronymn though. Maybe I don't know what I'm talking about...but anyhow, run make menuconfig on your kernel and see if you have either acpi or apm configured. If not, then in my newbie opinion, that would be a good place to start looking for the solution. 
> 
> I have ACPI enabled but I don't see how would it affect either of problems... 
> 
> Sorry. I mean. Power Management->Hibernation. I was thinking that was under acpi and apm. 
> ...

 

ACPI/APM works ok - for example suspend works OK. I belive that hibernation works but for some reasons it is not resuming. I managed to get hibernation once but not since I migrated into newer computer.

----------

## Hu

To clarify, hibernate has never worked on the current hardware configuration, yes?  Have you tried hibernating from text mode?  Have you tried using text mode in a kernel without KMS or fbcon?

When you hibernate, does the system power down?  If not, then the hibernation failed somewhere, and there may not be enough of a saved image to be able to resume.

Why do you make the directories at initrd runtime, rather than include them in the initramfs?

----------

## Uzytkownik

 *Hu wrote:*   

> To clarify, hibernate has never worked on the current hardware configuration, yes?  Have you tried hibernating from text mode?  Have you tried using text mode in a kernel without KMS or fbcon?
> 
> When you hibernate, does the system power down?  If not, then the hibernation failed somewhere, and there may not be enough of a saved image to be able to resume.
> 
> Why do you make the directories at initrd runtime, rather than include them in the initramfs?

 

1. Yes

2. Yes

3. I'll try (edit: tried - the same results)

-------------------

4. It is powering down - that the reason I belive it's problem with configuration

-------------------

5. I don't know  :Wink: . I just copied a script from this forum to old computer and from there to new computer. I changed it now.

----------

## Uzytkownik

Missing default partition in configuration - /etc/suspend.conf is not enought  :Wink: 

----------

