Better integration with power management scripts

Stefan Seyfried hughsient at gmail.com
Thu Apr 20 13:26:32 PDT 2006


On Tue, Apr 18, 2006 at 07:48:13PM -0400, David Zeuthen wrote:
 
> My position is that if a module needs to be unloaded and loaded again
> there is a bug in the module that needs to be fixed. We should never do
> this but providing the infrastructure for OS vendors, hardware/driver
> vendors and users is fine. After all, we all know it takes time to fix
> this.

One note:
Modules are not only unloaded because of broken drivers, but because it
is sometimes a convenient way to assert a certain system state.
Example: i am advising the unloading of usb-storage and sbp2, simply to
make sure that no stupid things are happening (mounted external disk is
unplugged during suspend => filesystem hosed) or i am unloading the uhci
and ohci drivers, just to make sure that the external mice and stuff
are properly unplugged and replugged after resume. Otherwise an plug/unplug
event during suspend would get lost (and no, "fixing" the drivers to always
rescan the bus and redetect all devices on suspend / resume might be the
wrong thing for some setups, where bus state is actually preserved
over a suspend cycle, if the module is _not_ unloaded IIUC).
Of course there might be different methods of doing this, other than un-
and reloading the modules, but this is a very easy to implement method.
 
> > * stopping and starting certain services
> 
> Ditto.

And the same applies here. As long as Linux is a general purpose OS it
might actually make more sense (and be less complicated) to just stop
and start some services before / after suspend instead of designing every
oh so esoteric service to be suspend-aware.

> > * making the ibm led blink (echo "7 blink" > /proc/acpi/ibm/led)
> 
> Yea, this is cute.

Hm. Works ootb for me, just use "platform" mode.

> Possible objections and my take
> 
>  - "HAL is becoming the kitchen sink"
>    No, we're just trying to get all vendors to use the same software
>    and format so everyone benefits.

And everyone is limited to the (very limited, right now :-) set of
suspend functionality HAL provides.
-- 
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