[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#863679: moreinfo on #863679 (pm-utils)



Hi,

TL;DR: This thing hit me, too, and I'd say it's not (directly) a bug
of pm-utils and it should be closed here.

Longer version: When it happened and my logs got filled up (I
actually noted it because for a continuous stream of "Anacron 2.3
started on ..." lines in syslog), I service stop-ed acpid and ran
acpid -dl instead.  That showed me that what triggered the behaviour
(for me) was a flood of

  acpid: received netlink event "battery PNP0C0A:01 00000080 00000001"

messages coming in at about one per second or so.  I've not checked,
but I suspect it's something like battery-full messages.  They are
always identical, though, and I don't think the ACPI BIOS (or the EC)
should be sending them, at least not at that rate.  If it had any
sense, I'd put the bug there.

For the record: This is on a Thinkpad X240.

Current resolution:  I believe the root of the trouble is that I
accidentally set charge limits like this:

	sudo tpacpi-bat -s ST 2 0
	sudo tpacpi-bat -s SP 2 0 

(tpacpi-bat is a perl hack that's not packaged AFAIK; see
http://www.thinkwiki.org/wiki/Tpacpi-bat).  This should have meant
that the EC should charge that particular battery unconditionally to
100% but instead probably made the EC shout something like "Battery
charged" or "Charging now" all the time (too lazy to decode the
message now).

I'm now setting the charge limits like this:

	sudo tpacpi-bat -s ST 2 0
	sudo tpacpi-bat -s SP 2 1 

and the flood of messages has stopped.

Btw, I'm running sysvinit, and the behaviour observed certainly will
affect systemd as well as pm-utils (though perhaps differently).

Now, given that the code that generates the ACPI messages on the EC
is rumored to be not necessarily always a model of great software
engineering, one could argue that either acpid or pm-utils could
introduce some rate-limiting functionality for repeated or flapping
events.  But that'd be a wishlist item, and I'm not even sure that'd
be a good idea.

       -- Markus


Reply to: