Refresh ACPI APM and PMU devices on resume

Holger Macht hmacht at suse.de
Thu Mar 30 14:24:16 PST 2006


On Do 30. Mär - 20:23:11, Richard Hughes wrote:
[...]
> 2006-03-30  Richard Hughes <richard at hughsie.com>
>  * tools/hal-system-power-hibernate, tools/hal-system-power-suspend:
> Refresh device types button, battery and ac_adapter on resume, as a
> suspend or hibernate can do funny things to ACPI. This fixes a common
> problem where HAL forgets the value of the lid button when it is
> resuming and may fix other related problems also.

Well, you can't be sure that this is done after resume! Hal suspend
scripts support different ways of actually doing the suspend. You do not
know if the system already finished resume just a few lines later in the
script. What about other calls to do the suspend other then the pm-scripts
on fedora core which do not block? On a non-blocking suspend execution,
it's likely that the device rescan is triggered _before_ the real call to
/sys/power/state or whatever and hence could cause unexpected
behaviour. Imagine some related modules are already unloaded when the
rescan is done...

The best solution IMO would be to let the responsible application/script
which does the suspend, trigger the rescan if it thinks that this is
needed. BTW, I never experienced such problems after resume you mentioned.

Regards,
	Holger


More information about the hal mailing list