[ltp] how does apm operate?

linux-thinkpad@linux-thinkpad.org linux-thinkpad@linux-thinkpad.org
Tue, 13 Apr 2004 22:04:15 +0545


On Tue, Apr 13, 2004 at 04:49:21PM +0300, Marius Gedminas wrote:
> On Tue, Apr 13, 2004 at 06:57:39AM -0500, Ivarsson, Torbjorn (T) wrote:
[snip]

> I also had problems with crash-a-few-seconds-AFTER-resume.  I finally
> figured out it was due to hwclock --hctosys call in one of the resume
> scripts.  I do not know the reason, but accessing the hardware clock
> (even when you just try to see the time on the screen) crashes my T23
> after a single suspend/resume cycle.  I commented out all calls to
> hwclock in my APM scripts and now very rarely have crashes on resume.

here, /etc/init.d/hwclock stop/start is called, and I have no problem
such as you describe (this is on a T22).

> 
> I also added a script called /etc/apm/suspend.d/99sync with the
> following contents:
> 
>   #!/bin/sh
>   if [ "$1" = "suspend" ]; then
>     sync
>   fi

heh, I have three syncs

> It flushes the disk cache just before suspend and thus reduces the
> chances of data corruption somewhat.  Before I added that script, my
> /etc/modules.conf used to get corrupted on each crash and the system
> wouldn't boot (that's why I ditched reiserfs and went back to ext3).

so far, I've had no problems with reiserfs here, apart from the fact
that it seems you can't make it flush at intervals longer than 30
secs.

[snip]

rgrds

_
A