[Pm-utils] Re: s2both
Stefan Seyfried
seife at suse.de
Mon Mar 12 00:52:30 PDT 2007
On Sun, Mar 11, 2007 at 11:25:22AM +0100, Holger Macht wrote:
> CCing the pm-utils list for more input.
>
> Holger
>
> On Sun 11. Mar - 11:22:21, Holger Macht wrote:
> > On Sun 11. Mar - 01:13:09, Tim Dijkstra wrote:
> > > Hi,
> > >
> > > Both suspend.sf.net and suspend2 have a notion of s2both. That is,
> > > before suspending to ram, the state of the system is saved to disk just
> > > like would happen for hibernate.
> > > This has the obvious benefit of being able to resume in case you
> > > deplete your batteries while you laptop is suspended.
> > >
> > > I think it would really be useful to have the possibility to do that
> > > instead of plain s2ram when one suspends. We can of course just make
> > > use of the possibility in pm-utils when it is available, but I guess a
> > > checkbox in g-p-m would be nice. For that to work we also need another
> > > attribute in hal.
> > >
> > > Comments?
> >
> > Yes, something like this would be nice, indeed. Thanks for bringing this
> > up. But rather then a checkbox or the like, I think something more
> > intelligent is suitable for gpm. For instance, when the system is already
> > low on battery, like < 10%, and the user is about to do a suspend to ram,
> > he should be warned that the system could run out of battery during
> > sleep. In this case, one could automatically offer an option to do a
> > suspend to both. These are implementation details for the higher level
> > applications of course.
> >
> > Ok, what we already have is this:
> >
> > power_management.can_hibernate = true (bool)
> > power_management.can_suspend = true (bool)
> >
> > These values are just a reflexion of what the kernel thinks, namely
> > /sys/power/state. Another key like
> >
> > power_management.can_suspend_to_both = true (bool)
> >
> > would be needed. This key would come from userland though, so it can't be
> > treated like the others. So what about pm-utils installing a fdi file
> > containing the xml rule to add this key and to execute a script like the
> > ones from hibernate and suspend (hal-system-power-hibernate, etc.). Would
> > this be feasible?
Do not even think about s2both in upstream pm-utils, since there is apparently
no interest in including userspace-suspend support (at least my patches get
silently dropped all the time) at all.
--
Stefan Seyfried
"Any ideas, John?"
"Well, surrounding them's out."
More information about the hal
mailing list