[Pm-utils] Re: Better integration with power management scripts

Stefan Seyfried seife at suse.de
Thu Apr 27 13:35:42 PDT 2006


Hi,

On Thu, Apr 27, 2006 at 04:42:07PM +0100, Matthew Garrett wrote:
> On Thu, Apr 27, 2006 at 04:31:23PM +0200, Holger Macht wrote:
> 
> > And exactly that it the crucial point: "we care about". Who is this "we"?
> > You? Me? Someone else? And exactly because you don't know who "we" is and
> > which application he is using, IMO it is most desireable to support as
> > many applications as possible. Because also users which aren't programmers
> > and aren't able to fix programs use applications ;-)
> 
> We've got two options here:
> 
> 1) We (the distributions) are shipping the software. We can fix it, so 
> this is unneeded.
> 2) Third party vendors are providing the software. They can either (a) 
> provide a drop-in file that fudges with power management, or (b) fix 
> their code to properly conform to the new interfaces.

There's a third party involved here: users. See below.

> > You need this feedback definitely at least at one point: You need to know
> > if the suspend succeeded or not.
> 
> Naively, that's trivial - you're still executing and time has passed in 
> a continuous manner.

No, i need to know if the machine actually was powered off and resumed
before "echo disk > /sys/power/state" returned. If one driver refuses to
suspend or there is not enough swap space, or ..., this does not have
to be true. Again, the "battery critical suspend" case is an example:
if suspend fails in this case, i'd like to shut down.
This can be deduced from the return value of echo in this case (or better
from the return code of write(2) which gives the exact error), but we need
to propagate this to the policy-deciding program.
But this will not be a problem - everybody will easily agree that this needs
to be propagated :-)

> No, now you're arguing "We need this feedback because we're providing 
> the ability for people to do broken things". A better solution is "Don't 
> provide the ability for people to do broken things". Figure out what 
> vendors need, and then design for that - don't leave the design so open 
> that people can ship completely crack-addled addons, because they'll do 
> so and the world will be a worse place.

I have to disagree here. People use linux because it allows them to do small
hacks easily for stuff they need and that none of the developers had
anticipated. Calling all this special stuff "broken" is a bit arrogant IMO :-)

This is not about "vendors" - i do not care too much what "vendors" need.
They can provide patches and if they are good it can be integrated. This is
about "users". I know the famous A'rpi quote "my software runs just fine
without users", but i do not think it is wise to apply it here ;-)

IMO we should have some places, where people can easily hook in their "broken
things". If we can't agree on feedback being useful, we should at least try to
agree on "custom hooks" so that users can do stuff that is useful for them.

I always was surprised how creative people were when it came to (ab-)using
the software i wrote, but i do not think this is necessarily a bad thing :-)
-- 
Stefan Seyfried                  \ "I didn't want to write for pay. I
QA / R&D Team Mobile Devices      \ wanted to be paid for what I write."
SUSE LINUX Products GmbH, Nürnberg \                    -- Leonard Cohen


More information about the hal mailing list