# hibernate enabled drastically increases boot time

## harp

I just set-up hibernation for my X220.

It works pretty decent but as the title says it slows down the kernel boot time by some seconds if booting without going to hibernation before.

I think the time is consumed by searching for a hibernation image.

But i do not understand why it takes so much time searching for something that does not exist.

If i boot with the noresume kernel parameter the boot is fast again.

Any ideas?

----------

## Randy Andy

harp

I don't know if this could accelerate you boot process, if the kernel knows exactly which swap device it hast to pick, instead of searching around until he found some empty one and only knows then, there is nothing to resume...

So you could try to declare your swap partition into this second new kernel option (I guess since 3.9.2) and check if it boot as fast as before under the conditions you mentioned.

[*] Hibernation (aka 'suspend to disk')                                                             │

      ()  Default resume partition (NEW

```

CONFIG_PM_STD_PARTITION:                                              │                            │

 │                            │                                                                       │                            │

 │                            │ The default resume partition is the partition that the suspend-       │                            │

 │                            │ to-disk implementation will look for a suspended disk image.          │                            │

 │                            │                                                                       │                            │

 │                            │ The partition specified here will be different for almost every user. │                            │

 │                            │ It should be a valid swap partition (at least for now) that is turned │                            │

 │                            │ on before suspending.                                                 │                            │

 │                            │                                                                       │                            │

 │                            │ The partition specified can be overridden by specifying:              │                            │

 │                            │                                                                       │                            │

 │                            │       resume=/dev/<other device>                                      │                            │

 │                            │                                                                       │                            │

 │                            │ which will set the resume partition to the device specified.          │                            │

 │                            │                                                                       │                            │

 │                            │ Note there is currently not a way to specify which device to save the │                            │

 │                            │ suspended image to. It will simply pick the first available swap      │                            │

 │                            │ device.                                                               │                            │

 │                            │                                                                       │                            │

 │                            │ Symbol: PM_STD_PARTITION [=]                                          │                            │

 │                            │ Type  : string                                                        │                            │

 │                            │ Prompt: Default resume partition                                      │                            │

 │                            │   Defined at kernel/power/Kconfig:72                                  │                            │

 │                            │   Depends on: HIBERNATION [=y]                                        │                            │

 │                            │   Location:                                                           │                            │

 │                            │     -> Power management and ACPI options
```

So maybe you would like to try it.

Best, Andy.

----------

## harp

Hi Andy, thanks for the fast replay.

I already set this to /dev/sda7 (my swap). I think if it is not set this hibernate will not work at all?

Do you have hibernate enabled and see the boot slow down as well?

----------

## Randy Andy

 *harp wrote:*   

> Hi Andy, thanks for the fast replay.
> 
> I already set this to /dev/sda7 (my swap). I think if it is not set this hibernate will not work at all?

 

I presume that it also work, if it's not set. Then it will pick the first swap device it could find.

I'm not using hibernate, so I can't answer your second question.

Andy.

----------

## Hu

What method do you use to hibernate and resume your system?

----------

## Randy Andy

Yes Hu.

Harp, did you consider that: (kernel help text).

 *Quote:*   

> 
> 
> CONFIG_HIBERNATION:                                                                           │                │
> 
>  │                │                                                                                               │                │
> ...

 

Regards, Andy.

----------

## khayyam

harp ...

Not much help but I'm using hibernation, tuxonice rather than swsusp, and don't notice any delay when booting. Are you sure that this is swsusp related, or rather what makes you think its specificly hibernation, others have reported delays with the current udev so I wouldn't rule out that something else may be the cause.

best ... khay

----------

