Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Jul 2012 01:21:06 +1000 (EST)
From:      Ian Smith <smithi@nimnet.asn.au>
To:        Piotr Czachur <zimnyx@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Waking system up from suspend-to-ram at specified time.
Message-ID:  <20120730231933.V37097@sola.nimnet.asn.au>
In-Reply-To: <20120729120033.23506106568C@hub.freebsd.org>
References:  <20120729120033.23506106568C@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In freebsd-questions Digest, Vol 425, Issue 13, Message: 13
On Sat, 28 Jul 2012 21:37:48 +0200 Piotr Czachur <zimnyx@gmail.com> wrote:
 > Dear users,
 > 
 > Does FreeBSD support waking system up from S3 (suspend to RAM) state
 > at specified time? On Linux, it can be achieved using rtcwake command
 > that uses RTC support in kernel.

Not yet, unless I've missed something since 2010 (not impossible :) 

 > If it's not supported, maybe I can somehow enable waking from S3 using
 > BIOS autoresume option? It powers my box on from complete off, but
 > fails to wake it up from S3. What works for now is waking from S3
 > using Wake-on-LAN.
 >
 > Cheers,
 > Piotrek

On my Thinkpad T23, BIOS autostart (not autoresume) time setting also 
works only from a cold start.  WoL also worked from 'off' but not from 
S3, but that was on 8.1-STABLE.  What version are you running, and on 
what machine?  Some reports indicate success may depend on which BIOS.

I'll forward you offlist a couple of never-completed drafts that turned 
up in postponed messages from 2010 while hunting mail about this, to 
(bcc'd) avg@, brucec@ and mav@, after researching this in response to an 
ACPI PR: http://www.freebsd.org/cgi/query-pr.cgi?pr=kern%2F73823&cat=

Then at least, you also had to modify Linux shutdown behaviour to avoid 
writing the clocktime back to the RTC if a wake time had been set, as 
RTC writes did not preserve the RTC wake interrupt bit, for some reason.

FreeBSD also does not preserve (gratuitously zeroes) that bit on all RTC 
writes, which is easily enough fixable, mostly in writertc.c, with few 
other places needing mods that I could see.  Ah yes, plus a (cleanroom) 
utility not unlike rtcwake, but once writertc() is fixed that should be 
relatively trivial, without needing to mess with the shutdown code.

Present circumstances don't permit me to work on this further, but I do
think it could be a worthwhile and not so hard project for 'someone' :)

cheers, Ian



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