# Shutdown vs hibernate [4 desktop]

## lordcris

Hello,

I'm thinking on switching to hibernation on my workstation instead of the usual shutdown.

Is it safe, reliable and fast or I should stick to the good old "halt"?

thank you

----------

## baeksu

That really depends on your hardware. Some systems are better supported than others.

I'm using hibernate on my desktop and laptops, and have never had data loss (even failure is very, very rare). I use tuxonice (you can get the 'tuxonice-sources' from portage) for suspension.

I only have had to reboot for kernel updates, but as I said, your mileage will vary depending on your hardware.

----------

## dmpogo

 *lordcris wrote:*   

> Hello,
> 
> I'm thinking on switching to hibernation on my workstation instead of the usual shutdown.
> 
> Is it safe, reliable and fast or I should stick to the good old "halt"?
> ...

 

Why do you want any for desktop ? Save electricity ?

----------

## lordcris

 *dmpogo wrote:*   

> 
> 
> Why do you want any for desktop ? Save electricity ?

 

Actually to save some time ( a couple of seconds ).

Does it save electricity? I would be more inclined to think it uses more ( to monitor the keyboard activity ).

 @baeksu

i read the howto's and i also think tuxonice is the safest choice.

As for my hw I don't really have much

Asus p5q, Intel quad core and nvidia geforce.

Don't you also have to rebuild for the system (dhcp, coreutils ..) and X packages?

----------

## ppurka

 *lordcris wrote:*   

> 
> 
> Asus p5q, Intel quad core and nvidia geforce.

 That might be a problem. There is a bug in nvidia's drivers where it takes over 2 minutes for the system to return from hibernation.

 *Quote:*   

>  Does it save electricity? I would be more inclined to think it uses more ( to monitor the keyboard activity ).

 Of course, hibernation saves electricity. Your entire system is shutdown and the memory is written to swap partition. Nothing is running after you have done hibernation.

----------

## Hu

Assuming it works reliably, hibernation is superior to halt.  Both allow shutting down the hardware, so they should have equal power savings[1].  Hibernation will allow you to retain state in all your applications when you restore the system later.  Since the hardware is powered down, you can even remove wall power without losing state.

It is important to distinguish hibernation from S3 sleep.  S3 mode leaves RAM powered, and so consumes more power than hibernation.  On the other hand, S3 can resume more quickly than hibernation.

With regard to nVidia, I have had no problems with slow resume behavior using the open nVidia Xorg driver nv.  I suspect from the phrasing that ppurka was referring to the proprietary nVidia drivers pulled in by setting VIDEO_CARDS="nvidia".

Using hibernation does not require you to rebuild the system with special support in core applications.  I have used both TuxOnIce and the in-kernel suspend support.  I now prefer the in-kernel suspend support since it has been a bit more reliable for me.  TuxOnIce had good versions and bad versions for me.

Regarding why hibernate a desktop: since hibernation allows the system to become unpowered, it can be a good alternative if a UPS has insufficient charge to cover you through a power outage.  I have also seen people who prefer to halt their systems at night because the fans are too noisy.

[1] Some devices, such as network cards with wake-on-LAN support, consume power while the main machine is off.  Such cards may not default into exactly the same idle state by halt versus hibernation.  Even so, you will reduce power consumption versus leaving the system fully active.

----------

## dmpogo

 *lordcris wrote:*   

>  *dmpogo wrote:*   
> 
> Why do you want any for desktop ? Save electricity ? 
> 
> Actually to save some time ( a couple of seconds ).
> ...

 

I mean, why do you switch desktop off at all ?  I never do, neither in the office, nor at home.

----------

## devsk

 *dmpogo wrote:*   

>  *lordcris wrote:*    *dmpogo wrote:*   
> 
> Why do you want any for desktop ? Save electricity ? 
> 
> Actually to save some time ( a couple of seconds ).
> ...

 save few greens, save the planet, save my ears...particularly, when running an overclocked (OC'ed by 60% and that too on air) system with 6 hard drives.

----------

## dmpogo

 *devsk wrote:*   

>  save few greens, save the planet, save my ears...particularly, when running an overclocked (OC'ed by 60% and that too on air) system with 6 hard drives.

 

Greens  - sure, although I live in cold climate, need to heat the house one way or another.  And I made a special effort to have my home system quiet  :Smile: 

----------

## lordcris

I've tried hibernation, but I am a little disappointed.

It took more time than the normal boot up , and in also hanged a coupe of times ( i suspect it was due to the nvidia driver ).

I have 8GB of ram and i use preload, so maybe that is why it uses more time to write the system state to the swap partition 

(the restore file is 1GB).

Anyways I feel like sticking to the poweroff command for now.

----------

## devsk

 *dmpogo wrote:*   

>  *devsk wrote:*    save few greens, save the planet, save my ears...particularly, when running an overclocked (OC'ed by 60% and that too on air) system with 6 hard drives. 
> 
> Greens  - sure, although I live in cold climate, need to heat the house one way or another.  And I made a special effort to have my home system quiet 

 makes sense in your case. No need to invest in heaters or even turn them on if they are there. just overclock the damn thing and leave it on.

----------

## dmpogo

 *lordcris wrote:*   

> I've tried hibernation, but I am a little disappointed.
> 
> It took more time than the normal boot up , and in also hanged a coupe of times ( i suspect it was due to the nvidia driver ).
> 
> I have 8GB of ram and i use preload, so maybe that is why it uses more time to write the system state to the swap partition 
> ...

 

You can also consider 'suspend to RAM'

----------

## depontius

 *Hu wrote:*   

> Using hibernation does not require you to rebuild the system with special support in core applications.  I have used both TuxOnIce and the in-kernel suspend support.  I now prefer the in-kernel suspend support since it has been a bit more reliable for me.  TuxOnIce had good versions and bad versions for me.
> 
> Regarding why hibernate a desktop: since hibernation allows the system to become unpowered, it can be a good alternative if a UPS has insufficient charge to cover you through a power outage.  I have also seen people who prefer to halt their systems at night because the fans are too noisy..

 

What userspace ebuild(s) are you using to control hibernation and resumption?

I've never gotten into it, at least partly because I prefer to stick to vanilla/gentoo kernels, and partly because the userspace situation seems a bit chaotic.

----------

## dmpogo

 *depontius wrote:*   

>  *Hu wrote:*   Using hibernation does not require you to rebuild the system with special support in core applications.  I have used both TuxOnIce and the in-kernel suspend support.  I now prefer the in-kernel suspend support since it has been a bit more reliable for me.  TuxOnIce had good versions and bad versions for me.
> 
> Regarding why hibernate a desktop: since hibernation allows the system to become unpowered, it can be a good alternative if a UPS has insufficient charge to cover you through a power outage.  I have also seen people who prefer to halt their systems at night because the fans are too noisy.. 
> 
> What userspace ebuild(s) are you using to control hibernation and resumption?
> ...

 

on laptop I just use sys-power/hibernate-script.  I set acpid to do call it on Fn-F12 (hibernate) and Fn-F4,  so it is totally independent on any desktop enivironments (and I do not ran HAL).

----------

