Bug 441057 - Support 60% Charge Limit threshold for Lenovo Ideapad and Legion laptops
Summary: Support 60% Charge Limit threshold for Lenovo Ideapad and Legion laptops
Status: ASSIGNED
Alias: None
Product: Powerdevil
Classification: Plasma
Component: general (show other bugs)
Version: 5.24.0
Platform: Manjaro Linux
: NOR wishlist
Target Milestone: ---
Assignee: Fabian Arndt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-16 19:37 UTC by Tornado99
Modified: 2024-01-01 15:20 UTC (History)
13 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tornado99 2021-08-16 19:37:39 UTC
SUMMARY


STEPS TO REPRODUCE
1. Ideapad and Legion Lenovo laptops have BIOS setting to stop charging at 60% (toggled by echo 1 >/sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode)
2. Option for this is missing in Charge Limit Settings PAnel (https://invent.kde.org/plasma/powerdevil/-/merge_requests/5#note_288786). It is only implemented for Thinkpads.

Can this be extended to these other laptops?
Comment 1 Fabian Arndt 2023-09-12 19:44:57 UTC
I worked on an implementation some time ago, but it needs further testing, polish and maybe a port to Plasma 6.
It also lacks a feature that restores the setting on reboot, as the conservation mode gets reset sometimes.

One further question: Is there any way to know the target state of charge? Or can you set multiple targets?
My laptop (15IAH7H) charges to 80%, not 60%. This should be represented by the UI, if possible.

I will open a merge request the coming days. I hope it makes the Plasma 6 release.
Comment 2 FreeLibre 2023-10-20 07:18:37 UTC
> the conservation mode gets reset sometimes

That's a BIOS bug, can be fixed by reverting to an older version.

> know the target state of charge

Only works if your machine has the proper full version that allows you to limit it to any value you want and not just "conservation mode on/off", which is not the case for the Legion series.

Although you can likely guess it by how much it charges.
Comment 3 Fabian Arndt 2023-11-01 15:16:37 UTC
Quick update, the merge request has landed some weeks ago: https://invent.kde.org/plasma/powerdevil/-/merge_requests/248

------

(In reply to FreeLibre from comment #2)
> That's a BIOS bug, can be fixed by reverting to an older version.

Hm.. I didn't know that, but I'm already working on a restore function: https://invent.kde.org/plasma/powerdevil/-/merge_requests/253
The Thinkpad implementation also resets the charge thresholds. So it is a good thing to have, nonetheless. I wonder why the behaviour should differ though.

> Only works if your machine has the proper full version that allows you to
> limit it to any value you want and not just "conservation mode on/off",
> which is not the case for the Legion series.

I know, but it would be nice to have some indicator. The driver does not offer this information and there is no documentation from Lenovo.
Comment 4 FreeLibre 2023-11-01 16:25:39 UTC
https://github.com/johnfanv2/LenovoLegionLinux:
> Lenovo Legion Linux (LLL) brings additional drivers and tools for Lenovo Legion series laptops to Linux.
It allows you to control features like the fan curve, power mode, power limits, rapid charging, and more. This has been achieved through reverse engineering and disassembling the ACPI firmware, as well as the firmware and memory of the embedded controller (EC).

@Fabian Arndt Could you make a feature request in the above repo?
Maybe they could extract the battery threshold from the embedded controller.

It will be submitted for upstream Linux after the 2022 and 2023 Legion models are supported.
Comment 5 Fabian Arndt 2023-11-01 17:42:16 UTC
(In reply to FreeLibre from comment #4)
> https://github.com/johnfanv2/LenovoLegionLinux:

I found out about the repo yesterday and had a similar idea. I just don't know if there is such information available.
Before bothering other people with feature request, I wanted to validate it first.

Do you know if the Windows software features anything like this? For example telling you the actual limit?
I have never had Windows installed on my laptop.