[Pm-utils] Making cron run after resume?

Nigel Cunningham ncunningham at crca.org.au
Fri May 16 16:47:33 PDT 2008


Hi again.

On Sat, 2008-05-17 at 01:28 +0200, Stefan Seyfried wrote:
> Victor Lowther wrote:
> > On Fri, 2008-05-16 at 10:42 +0200, Stefan Seyfried wrote:
> 
> > That functionality is still supported, and I have no plans to remove or
> > alter it.  Think of the proposed functionality as not so much as "the
> > hook signalled that that we should not suspend", it is more of "the hook
> > crashed, it is handling a vital suspend/resume related task, so assume
> > that suspend/resume will not work and abort".
> 
> Does this really happen in real usage scenarios? I have not seen it happen.
> Well, apart from the bug when libx86 crashed on 2.6.25, but that is a plain
> bug and i fixed it.
> 
> So for the "Some application we need during suspend is buggy and crashes"
> case, i'd prefer to just fix the application.
> 
> I am really after a implementation that is as simple and easy to understand as
> possible - once you start pushing out hooks into packages, people that are
> less experienced than you and me will start writing hooks. And the simpler the
> interface, the better ;-)

I like the simplicity argument, but I have to admit at the same time
that I'd like to see pm-utils catch up to the hibernate script in terms
of functionality. The hibernate script has support for:

- unloading modules and refusing to suspend if they can't be unloaded
- stopping, starting and restarting services
- umounting and remounting partitions
- modifying the grub/lilo menu to help ensure we resume
  for resuming (yes, shouldn't be needed now)
- running vga tools
- X screensaver locking
- running arbitrary scripts at arbitrary points in the suspend/resume 
  process (on[suspend|resume] nn command)
- setting the cpu frequency to full speed while hibernating
- setting the various tuxonice options via a generic
	'procsetting file_name value'
  interface. (Yeah, it's not /proc anymore)
- disabling disk write caches
- taking down and bringing back up network interfaces
- muting/pausing audio
- ejecting pcmcia cards
- refusing to suspend/hibernate if particular programs are running
- getting gaim to logout/restore status etc

I'm not an expert on how the script works (I didn't write it), but I
know it uses scriptlets that register hooks to make this all happen
without being (too?) ugly.

Regards,

Nigel



More information about the Pm-utils mailing list