Re: [PATCH 0/2] platform/x86: ideapad-laptop: Fix unexpected charge_types on probe
From: Rong Zhang
Date: Sun Oct 18 2026 - 10:26:06 EST
Hi Derek,
Thanks for you information.
On Sat, 2026-10-17 at 22:30 -0700, Derek J. Clark wrote:
> On October 17, 2026 4:16:17 PM PDT, Rong Zhang <i@xxxxxxxx> wrote:
> > It was reported [1] that some unfortunate combinations of BIOS and
> > Lenovo utilities (e.g., Legion Go 2 + Legion Space) may enable Rapid
> > Charge and Conservation Mode at the same time, which is very out of
> > sepc.
> >
> > If both are enabled during a previous Windows boot, ideapad-laptop will
> > see both bits set and correctly shout "unexpected charge_types".
> >
> > A planned BIOS update will address this. Before that, if unexpected
> > charge_types are encountered on probe, enforce [Long_Life] to prevent
> > the device from operating in an out-of-spec state. On check or fix
> > failure, skip registering the battery hook and the conservation_mode
> > attribute.
> >
> > Note: the switches never enable themselves autonomously, so there is no
> > need to fix it during runtime.
> >
>
> Hi Rong,
>
> Note that this isn't strictly true. A known bug in multiple Lenovo devices is that querying the EC too quickly can cause it to reset into an invalid state. I.e. some games run under wine for check the state of the AC adapter multiple times a second. In such a case they can reset and then report both modes on.
>
Could you confirm if it's a completely different issue compared to
https://msgid.link/58586fa666f09c209f9d7fe8c692a8bdda6d4410.camel@xxxxxxxx
(i.e., an ACPI mutex ABBA deadlock cause the GBMD method to return
garbage data)?
> I don't believe the device re-enumerates in this case. This is documented in the driver [1].
The comments and the relevant fix was added in a patch of mine. They are
about yet another different issue, in which querying the EC with an
interval < 50 *us* causes the EC to shut down the platform.
Then the user must press the power button to power on the platform again.
It's a cold boot. All kernel drivers are loaded from scratch, so the
probe-time fix here takes effects.
That being said, as far as I can recall, running into the issue doesn't
set both modes to enabled. Besides, userspace checking the state of the
AC adapter multiple times a second must have an interval much larger than
50 us, so I don't think the issue you described is the same as the issue
described in the comments either.
>
> Lenovo ha mentioned to me a BIOS fix for this issue will be coming for the Go S and Go 2 at some point as well, but this isn't exclusive to Go models. It may be prudent to fix any time an invalid state is detected.
I am OK with the fix-whenever-seen approach, but in this manner it'd be
better to wait until
https://msgid.link/20261018122348.679126-1-aliamemis@xxxxxxxxxxx is
applied to solve the ABBA deadlock issue, so that false positives during
runtime are reduced.
Thanks,
Rong
>
> Thanks,
> - Derek
>
> [1] https://github.com/torvalds/linux/blob/32c52ec87d6245ee2d12ed5dd509e40062939b50/drivers/platform/x86/lenovo/ideapad-laptop.c#L286-L296
>
> > Fixes: 90430ea98f55 ("platform/x86: ideapad-laptop: Add charge_types:Fast (Rapid Charge)")
> > Closes: https://github.com/ValveSoftware/SteamOS/issues/2876 [1]
> > Signed-off-by: Rong Zhang <i@xxxxxxxx>
> > ---
> > Rong Zhang (2):
> > platform/x86: ideapad-laptop: Factor out charge_types methods for internal use
> > platform/x86: ideapad-laptop: Fix unexpected charge_types on probe
> >
> > drivers/platform/x86/lenovo/ideapad-laptop.c | 113 ++++++++++++++++++++-------
> > 1 file changed, 84 insertions(+), 29 deletions(-)
> > ---
> > base-commit: 58161ead29e50d70a317ea26b472e0c7508e69da
> > change-id: ef28eda4-ideapad-fix-charge-types-067d46d08945
> >
> > Thanks,
> > Rong
> >