Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Aug 2010 16:07:24 +1000 (EST)
From:      Ian Smith <smithi@nimnet.asn.au>
To:        Depo Catcher <depocatcher@gmail.com>
Cc:        Bruce Cran <bruce@cran.org.uk>, freebsd-questions@freebsd.org
Subject:   Re: Hibernation
Message-ID:  <20100819151057.R45487@sola.nimnet.asn.au>
In-Reply-To: <20100819012607.2D9BE1065745@hub.freebsd.org>
References:  <20100819012607.2D9BE1065745@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In freebsd-questions Digest, Vol 324, Issue 6, Message: 29
On Wed, 18 Aug 2010 18:07:13 -0500 Depo Catcher <depocatcher@gmail.com> wrote:
 > On 8/18/2010 5:26 AM, Bruce Cran wrote:
 > > On Wed, 18 Aug 2010 03:55:12 -0500
 > > Depo Catcher<depocatcher@gmail.com>  wrote:
 > >
 > >    
 > >> I can't find any good docs or guides to this.  I checked the
 > >> handbook, but had a bunch of references to 5.x.
 > >> Can anyone point me to the right direction?
 > >>
 > >> I'd like to go with FreeBSD 8.1 amd64 for my next system.
 > >> Hibernation and Wake on Lan would both be useful.
 > >>      
 > > The only support for hibernation is via the BIOS with a special
 > > partition. Unfortunately as far as I know it rarely, if ever, works.
 > > Windows (I don't know about Linux) bypasses the BIOS/ACPI and just
 > > dumps the contents of memory to disk before powering off.

 > My current system (6.4, really old hardware) shows this:
 > 
 >     sysctl -a | grep -i hw.acpi
 >     hw.acpi.supported_sleep_state: S1 S4 S5

No S3 (suspend to RAM) support.  This is a desktop box, right?

 >     hw.acpi.power_button_state: S5

S5 is power-off.

 >     hw.acpi.sleep_button_state: S1

S1 probably does nothing that you'll notice, if you have a sleep button.

 >     hw.acpi.lid_switch_state: NONE
 >     hw.acpi.standby_state: S1
 >     hw.acpi.suspend_state: S3

N/A since S3 isn't supported.  Few desktops support suspend-to-RAM.

 >     hw.acpi.sleep_delay: 1
 >     hw.acpi.s4bios: 0

No BIOS support for S4 (hibernate) state, so no hibernation support.

 >     hw.acpi.verbose: 0

This can be informative, if set to 1, about what ACPI is doing.

 >     hw.acpi.disable_on_reboot: 0
 >     hw.acpi.handle_reboot: 0
 >     hw.acpi.reset_video: 0
 >     hw.acpi.cpu.cx_lowest: C1
 > 
 > ampd is the command I'm looking for ?

apmd is only useful if you disable ACPI and enable APM instead.  This 
can be useful on some older hardware, eg this old ('99) Compaq laptop 
runs APM very well, but ACPI poorly.  Setup for this (at freebsd 5.5):

/boot/loader.conf:
apm_load="YES"		# or build it into kernel
hint.apm.0.disabled=0
hint.apm.0.flags="0"	# hint.apm.0.flags="0x20" # (broken statclock?)

/etc/rc.conf:
apm_enable="YES"
blanktime="120"
apmd_enable="YES"
apmd_flags="-v"
saver="apm"
#% 11/11/7 Turn off ad0 APM spindowns (Load_Cycle_Count) (see also rc.resume)
ataidle_enable="YES"
ataidle_device="ad0"
ataidle_ad0="-P 0 0 0"

But this is a laptop .. apmd is not likely of much use for a desktop, 
unless it would support S3 (suspend-to-RAM) under ACPI also.

 > Also what is the differences between Sleep, Stand By, Hibernation and 
 > Suspend?

Language depends on manufacturer to some extent.  M$ (and so most BIOS) 
refer to suspend-to-RAM (S3 sleep state) as StandBy, FreeBSD calls this 
suspend, and standby (S1) is likely just a stop-clock state.  Hibernate 
(S4) means writing all system state to disk and powering off, and so far 
requires BIOS support (it actually works on my old laptop using APM, but 
not ACPI, and requires a pre-allocated hibernation file in an MSDOS disk 
slice).  Someone was working on S4(OS) for FreeBSD a couple of years ago 
for a Google SoC project, but I don't think it was ever completed.

cheers, Ian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100819151057.R45487>