Bug#234889: acpid logs plug and unplug events (for me)

Ludovic Rousseau Ludovic Rousseau <rousseau@debian.org>, 234889@bugs.debian.org
Tue, 1 Jun 2004 13:25:20 +0200


Steve Fosdick wrote:
> When I re-connect the AC adaptor, acpid does not log any events at
> all, so either the kernel is not generating the event or acpid is
> somehow losing it.  As there is no battery event either I can't see
> how Ludovic's patch would fix the problem.

acpid works for me. I have in /var/log/acpid:

unplug
======

[Tue Jun  1 13:18:03 2004] received event "battery BAT1 00000080 00000001"
[Tue Jun  1 13:18:03 2004] executing action "/usr/local/bin/battery.sh"
[Tue Jun  1 13:18:03 2004] BEGIN HANDLER MESSAGES
Setting HD spindown to 20 seconds
Starting laptop_mode.
[Tue Jun  1 13:18:04 2004] END HANDLER MESSAGES
[Tue Jun  1 13:18:04 2004] action exited with status 0
[Tue Jun  1 13:18:04 2004] completed event "battery BAT1 00000080 00000001"

replug
======

[Tue Jun  1 13:18:11 2004] received event "battery BAT1 00000080 00000001"
[Tue Jun  1 13:18:11 2004] executing action "/usr/local/bin/battery.sh"
[Tue Jun  1 13:18:11 2004] BEGIN HANDLER MESSAGES
Setting HD spindown to 2 hours
Stopping laptop_mode.
[Tue Jun  1 13:18:11 2004] END HANDLER MESSAGES
[Tue Jun  1 13:18:11 2004] action exited with status 0
[Tue Jun  1 13:18:11 2004] completed event "battery BAT1 00000080 00000001"


I don't know what's wrong with your configuration. I have:
acpid: 1.0.3-18
kernel: 2.6.6 (my own compilation)


The idea of my patch is NOT to get the battery plug/unplug message but
to update the plug/unplug status every time the battery level is
updated. It's a bit waste of resources I agree but it works whatever
the event is named.

Regards,

-- 
 Dr. Ludovic Rousseau                        Ludovic.Rousseau@free.fr
 -- Normaliser Unix c'est comme pasteuriser le camembert, L.R. --