LaptopMode

Richard Hughes hughsient at gmail.com
Mon Sep 19 15:09:03 PDT 2005


On Mon, 2005-09-19 at 11:42 -0400, David Zeuthen wrote:
> Hi,
> 
> Sorry for jumping into this thread a bit late,
> 
> On Wed, 2005-09-14 at 16:05 +0100, Richard Hughes wrote:
> > Should we be doing:
> > 
> > echo 1 > /proc/sys/vm/laptop_mode
> > 
> > For SystemPowerManagement.SetPowerSave if 
> > 
> > smbios.chassis.type == Notebook 
> > 
> > Do you want a patch?
> 
> I think the layers above hal should figure out itself whether to invoke
> SetPowerSave(), e.g. in gnome-power-manager you would probably use
> system.formfactor (is more generic, e.g. all boxes don't have a SMBIOS)
> on the hal device object representing the computer. 

Yes, my point exactly - it makes no sense calling SetLowPowerMode on a
desktop or server.

> Btw, I think of this as a non-issue - on non-laptops, it would be a bug
> if software on the level of gnome-power-manager (wrt HAL) ever did a
> SetPowerSave() method invocation because it should be able to figure out
> that the system doesn't have any hal device objects of capability
> 'ac_adapter' or 'ups', e.g. there is no way to for the system to run on
> a battery source.
> 
> What I'm trying to say is this: HAL should provide the mechanism for
> enforcing policy, but we should never enforce policy. Yes, this means
> software can do things that doesn't make sense, like calling
> SetPowerSave() on a machine without battery sources, but what I'm trying
> to argue is that such software is broken. 

Yes, agreed. I will fix g-p-m to fix this.

> Of course, we also want to reduce power consumption on servers with AC
> power sources (in the litterature this is called "runtime power
> management") but from what I can tell this is all to be implemented in
> the kernel (at least on Linux, check out linux-pm at osdl.org) with
> optional e.g. sysfs knobs to control to e.g. control USB device state
> transition timeouts.

Sure.

Thanks for the feedback.

Richard.




More information about the hal mailing list