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

David Zeuthen david at fubar.dk
Wed Mar 14 09:13:39 PDT 2007


On Wed, 2007-03-14 at 12:05 -0400, 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.
> 
> David, what do you think about this?

I kinda don't like that idea. The fact we need to rescan some devices is
simply just a bug with the kernel and I don't like introducing new deps
because of bugs. 

Keep in mind too that suspending the box normally originates from the
desktop session power management daemon and in the future programs can
register with said daemon to be able to run hooks (for e.g. setting
away / signing off IRC) just before the suspend is initiated. 

For the record, I'd much rather that pm-suspend went away (e.g. moved
into /usr/sbin) and command line users started used something like
xdg-suspend (that don't exist yet, but look at Portland) to poke the
desktop session power management daemon via e.g. the mythical
o.fd.PowerManagement D-Bus session bus interface (that we _still_
haven't standardized on). Notably this command could fall back to poking
HAL for the really bizarre use cases where you're not running in a
desktop session.

Hope this clarifies.

     David




More information about the Pm-utils mailing list