LaptopMode

Danny Kukawka danny.kukawka at web.de
Thu Sep 15 12:27:21 PDT 2005


On Thursday 15 September 2005 17:59, Richard Hughes wrote:
> > Not sure if this is a good idea in conjunction with smbios.chassis.type
> > because this key is not a really reliable information about the system
> > type.
>
> What about checking for battery.type == primary? That's only laptops I
> guess - or not checking at all, and let the program (i.e. g-p-m) do the
> filtering.

Maybe, but not complete sure.

> > Laptop mode on its own is not very usefull. You have to adjust the rest
> > of your system, too (e.g. by using the laptop-mode script).
>
> Yes, but there is *lots* of extra stuff in the laptop-mode script.
> re-mounting disks, setting hdd spindowns, and lots of kernel foo.

Yes, but I don't understand, why you would implement this in HAL. Why do we 
need this e.g. on a desktop system or on a server (e.g. s390/s390x). 

> Spindowns have already been discussed, and remounting disks seems a bit
> drastic.
>
> I wanted to concentrate on the kernel-foo.

This is the problem. If you implement this in HAL, it's IMO a little  
maintainance nightmare. On one site you need this only on laptops (and not 
all user and distibutions want this) on the other you must permanently check 
for each new kernel if there is something changed in the kernel parameter.

> Shouldn't we just get some sane default values for these sorted out (the
> ones laptop-mode seem sane), and then let all this be transparent to the
> user?
>
> Adding this little bit of code lets us to do the kernel cleverness,
> without packaging the laptop-mode scripts, and having hal depend on
> them.

But what about add this to special script on your distro or to a special 
little daemon only for such distro and maybe also desktopenviroment specific 
things? We implemented this for example already (at SUSE and ALTLinux) to the 
powersave daemon which do this and all other powersave issues for us (now 
with D-BUS support, too).

Cheers,

Danny 


More information about the hal mailing list