[Pm-utils] Making cron run after resume?

Nigel Cunningham ncunningham at crca.org.au
Fri May 16 02:01:54 PDT 2008


Hi.

On Fri, 2008-05-16 at 10:42 +0200, Stefan Seyfried wrote:
> Victor Lowther wrote:
> 
> > The current behavior is (effectivly) "ignore everything".  I would like
> > to make pm-utils a little smarter about how to handle things when (say)
> > needed video quirks don't get applied causing the system to hardlock on
> > resume.
> 
> In my implementation (no idea how the current code does it), i just touch the
> $INHIBIT file (or even write some meaningful error message into it, which can
> be displayed to the user later) and suspending will not happen.
> 
> Remember, refusing to suspend should only happen in very rare cases, i
> currently only have a few for suspend to disk:
> - the kernel changed (security update), so we know before suspend that we
> can't resume

Some code went into vanilla around 2.6.23 IIRC which allows us to resume
from a different kernel version, so this shouldn't be an issue anymore.

> - there is no swap partition or more generally no storage for s2disk
> configured => configuration error

Mmm. Not necessarily an issue for TuxOnIce though, as the user can be
writing to a file rather than swap (yeah, I know you don't care Stefan,
but maybe the others do).

> "Being unable to apply video workarounds before s2ram" generally cannot happen
> IMVHO (but i'm ready to be convinced the other way round).
> 
> Right now, just refusing to suspend and then later exiting with != 0 exit
> code, so that the GUIs can display a "suspend had a problem, do you want to
> look at the Log file / file a bugreport?" message was pretty effective and
> worked very well for me.

Sounds good to me, too.

Nigel



More information about the Pm-utils mailing list