[Pm-utils] Re: pm-utils' 55battery: WTF?

Holger Macht hmacht at suse.de
Wed Mar 14 09:13:55 PDT 2007


On Wed 14. Mar - 12:05:50, Peter Jones wrote:
> On Wed, 2007-03-14 at 13:56 +0100, Olivier Blin wrote:
> > David Zeuthen <david at fubar.dk> writes:
> > > It tells HAL to rescan the battery - in case someone changed the battery
> > > we want the new serial number etc... if I recall Peter's reasoning
> > > correctly. I think this check is better done in HAL than in pm-utils; it
> > > doesn't make sense to make pm-utils call into HAL at all - Peter, is
> > > this fine with you? 
> > 
> > But what if pm-hibernate is run directly from command line and not
> > from hal-system-power-hibernate-linux ?
> > Or do you forget about command line users in pm-utils?
> 
> Yeah, that's certainly a valid point.  I think that we really should be
> (as bizarre as it seems) telling HAL when we're suspending and when
> we're resuming.

I don't think so IMHO. In many other places, we've already agreed on the
need for having a desktop applet (policy decision maker) to get the most
convenient functionality. Basically it means: Someone you is able to run
pm-suspend from the command line has to be able to care about changing
batteries. If he's not, he's better of with a graphical client.

If we're going to support things like that in pm-utils, we've to care
about lot of other things, too. For instance, what about unmounting
filesystems in pm-utils like the desktop session is supposed to do?

Why not just let the desktop applet trigger the battery rescan on HAL? It
knows at best when we're going to suspend.

Just my 2 cents,
  Holger


More information about the hal mailing list