[Pm-utils] Re: Dealing with suspend/resume failures

Holger Macht hmacht at suse.de
Sat Nov 11 15:12:12 PST 2006


On Sat 11. Nov - 23:32:51, Holger Macht wrote:
> On Thu 09. Nov - 14:48:29, David Zeuthen wrote:
> > 
> > Hi,
> > 
> > Sorry for being slow in responding. 
> > 
> > Attached are the patches I put in the RHEL beta, been tested somewhat
> > thoroughly and appears to work fine insorfar that the user gets a dialog
> > if suspend fails.
> > 
> >  diffstat hal-0.5.8.1-powermgmt-output-4.patch 
> >  fdi/policy/10osvendor/10-power-mgmt-policy.fdi |   10 ++++++++++
> >  tools/Makefile.am                              |    6 ++++++
> >  tools/hal-system-power-hibernate-clear-error   |    3 +++
> >  tools/hal-system-power-suspend-clear-error     |    3 +++
> >  tools/linux/hal-system-power-hibernate-linux   |   13 +++++++++++--
> >  tools/linux/hal-system-power-suspend-linux     |   13 +++++++++++--
> >  6 files changed, 44 insertions(+), 4 deletions(-)
> > 
> >  diffstat gnome-power-manager-2.16.0-resume-failed-ui-3.patch 
> >  gpm-hal.c         |   45 +++++++++++++++++++++++++++++++++++++++++
> >  gpm-hal.h         |    5 ++++
> >  gpm-main.c        |   16 ++++++++++++--
> >  gpm-manager.c     |   59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >  gpm-manager.h     |    2 +
> >  gpm-screensaver.c |   12 ++++++++++
> >  6 files changed, 137 insertions(+), 2 deletions(-)
> > 
> > Richard: sorry, the patch is a bit rough but does the idea look fine to you?
> > 
> > > 1. Desktop calls PM-utils via HAL to suspend. The suspend preparation/
> > >    resume cleanup hooks fail due to whatever reason. Two possibilities:
> > > 
> > >    (1) PM-utils returns with error. Desktop calls SuspendGetLastError() on
> > >        HAL to get the failure reason.
> > > 
> > >    (2) PM-utils sends out a D-Bus signal with the reason the destop can
> > >        catch
> > 
> > We already do one but right; we throw the exception
> > 
> >  org.freedesktop.Hal.Device.Error
> > 
> > with a useless message we may want to clean up. We now (with the patch)
> > _always_ create the file /var/lib/hal/system-power-suspend-output in
> > addition that can be inspected when the caller of Suspend() is told the
> > method returns.
> 
> Why can't we use /var/log/pm-{suspend,hibernate}.log created by pm-utils
> instead? We are currently working on pm-utils being more verbose.

I just see that your patch is actually doing this, redirecting the output
of pm-utils (which is the same as the content of the logfile) to the
suspend-output file. But maybe we still should just copy it because I like
to always have a /var/log/pm-suspend.log file.

Regards,
	Holger



More information about the Pm-utils mailing list