From owner-freebsd-questions@FreeBSD.ORG Thu Aug 19 06:07:34 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3945010656A5 for ; Thu, 19 Aug 2010 06:07:34 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [115.70.110.159]) by mx1.freebsd.org (Postfix) with ESMTP id 8E9A28FC0C for ; Thu, 19 Aug 2010 06:07:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id o7J67OFr029421; Thu, 19 Aug 2010 16:07:24 +1000 (EST) (envelope-from smithi@nimnet.asn.au) Date: Thu, 19 Aug 2010 16:07:24 +1000 (EST) From: Ian Smith To: Depo Catcher In-Reply-To: <20100819012607.2D9BE1065745@hub.freebsd.org> Message-ID: <20100819151057.R45487@sola.nimnet.asn.au> References: <20100819012607.2D9BE1065745@hub.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Bruce Cran , freebsd-questions@freebsd.org Subject: Re: Hibernation X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Aug 2010 06:07:34 -0000 In freebsd-questions Digest, Vol 324, Issue 6, Message: 29 On Wed, 18 Aug 2010 18:07:13 -0500 Depo Catcher wrote: > On 8/18/2010 5:26 AM, Bruce Cran wrote: > > On Wed, 18 Aug 2010 03:55:12 -0500 > > Depo Catcher 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