Re: [ACPI-sppt] clock stops during S4 suspend

Micha Feigin <[email protected]> Fri, 9 Jan 2004 22:08:31 +0200
Newsgroups gmane.linux.acpi.support
Message-ID <[email protected]>
On Fri, Jan 09, 2004 at 10:11:55AM -0600, Rockefeller, Harry wrote:
> So, the RTC, i.e., hardware clock, i.e., BIOS clock, continues to
> run during suspend since it runs anyway when power is off.
> 
> The system clock, time kept by the kernel, is obviously suspended
> along with everyting else during S4.
> 
> During a normal full boot something like 'hwclock --hctosys'
> happens somewhere deep in the /etc/rc process startup commands,
> something which does not happen with a restore from suspend.
> 
> I use acpid to suspend my machine, but first I unmount my Samba
> mounts since those mounts do not restore cleanly.  In other words
> acpid allows me to run a script to do things before the actual
> 'echo 4 > /proc/acpi/sleep' command.  Is there a way to define a
> script which will immediately run after a resume, something
> like the /etc/rc.local which just happens?  It would be nice to
> grep my ifconfig eth0 output and remount the Samba mounts
> automatically too for whichever network I happen to be connected
> too.

If you are using acpid then can call a command from it, this command
can be a script, so you could write a script that basically does:

--------------------
#!/bin/sh

<commands to run before suspend>

echo 4 > /proc/acpi/sleep

<commands to run after suspend>
-------------------

You may need to check for the input though, as some acpi implementation
send a button down (for whatever button you are using) which causes a
suspend and then send a button up, which usually affects the script
being called again on resume which suspends the machine again.

> 
> > -----Original Message-----
> > From: S?rgio Monteiro Basto [mailto:[email protected]] 
> > Sent: Friday, January 09, 2004 8:59 AM
> > To: Rockefeller, Harry
> > Cc: acpi support
> > Subject: Re: [ACPI-sppt] clock stops during S4 suspend
> > 
> > hwclock --hctosys
> > if hangs your computer try: 
> > hwclock --directisa
> > 
> > On Fri, 2004-01-09 at 14:15, Rockefeller, Harry wrote:
> > > Notebook Computer: Uniwell N351S1
> > > Kernel: 2.6.0-mm2
> > > Suspend with 'echo 4 > /proc/acpi/sleep'
> > > works with no errors, but my clock goes to sleep as well.  When I 
> > > resume my clock starts up with the same time when
> > > S4 began.
> > > 
> > > Does anyone know how to fix this problem?
> > > I can include more info in a follow-up post.
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Perforce Software.
> Perforce is the Fast Software Configuration Management System offering
> advanced branching capabilities and atomic changes on 50+ platforms.
> Free Eval! http://www.perforce.com/perforce/loadprog.html
> _______________________________________________
> ACPI-support mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/acpi-support
> 


-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html