Ulrich Kuehn wrote:
> and this script I do actively call during boot, as the acpi event is
> only reported on a change.
I've now put a similar script in a minutely cron job. It checks whether
the system has been connected/disconnected to/from mains, and, if so,
takes the necessary measures. This works very reliable, AFAICS.
Also, I've discovered the laptop-mode-tools which seem to do just what
I've been asking for.