[Bug 221065] ideapad_acpi: unexpected charge_types spam on Yoga Pro 7 14ASP9

bugzilla-daemon
2026-02-13T13:20:25Z

--- Comment #33 from Rong Zhang (i@rong.moe) ---
(In reply to Avraham Hollander from comment #32)
> Actually, it just seems to be really intermittent.

That's expected. These error logs are due to two reasons:

#1

Many ACPI methods need to acquire the ECMT mutex while executing. Most of them
are helper methods, meant to be called by outer methods.

When the laptop is connected to or disconnected from AC power, a bunch of
events is generated simultaneously, causing the corresponding ACPI methods to
be invoked simultaneously and to compete for the mutex. After several seconds,
some methods have waited for too long and timed out, causing them to return an
error.

However, some outer methods don't confirm if the helper method succeeded. They
blindly propagate the helper methods' return values, even if they are error
codes or nonsense. If an outer method calls a helper method multiple times, it
will end up returning a half-valid-half-nonsense value.

That's how the ideapad-laptop and ucsi_acpi errors are produced.

#2

Some helper methods are not implemented properly. They release the ECMT mutex
even if they have failed to acquire it due to the timeout. When they are
unlucky and time out, releasing the mutex (even if they do not own it) causes
the ACPI error.

Hence, not seeing the mutex error simply means that the ECCC method was lucky
and didn't time out.