Battery charge limit hidden on laptops that only expose charge_types / conservation_mode (e.g. Lenovo Yoga) #37

Closed
opened 2026-10-01 22:24:54 +08:00 by Breadway · 0 comments
Owner

How I found it

Power & battery on hermes (Yoga Slim 7 14AKP10) shows no charge limit control although the page subtitle says "Brightness, battery, and charge limits". set_charge_threshold in src/src/commands/power.rs only looks for charge_control_start/end_threshold, which this machine lacks. It does expose /sys/class/power_supply/BAT*/charge_types ([Standard] Long_Life) and /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode.

Confidence

High that the control is missing on this hardware (observed + code). Medium on the exact semantics per vendor.

Explanation

Many laptops (Lenovo IdeaPad/Yoga, some ASUS/Huawei) only offer a fixed battery protection mode, not arbitrary thresholds. Users then need a terminal (echo 1 | sudo tee .../conservation_mode) to protect the battery.

Expected: a single "Protect battery (stop charging around 80%)" switch that uses thresholds when available, else charge_types Long_Life, else ideapad conservation_mode, and hides itself only when none exist.

## How I found it Power & battery on hermes (Yoga Slim 7 14AKP10) shows no charge limit control although the page subtitle says "Brightness, battery, and charge limits". `set_charge_threshold` in `src/src/commands/power.rs` only looks for `charge_control_start/end_threshold`, which this machine lacks. It does expose `/sys/class/power_supply/BAT*/charge_types` (`[Standard] Long_Life`) and `/sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode`. ## Confidence High that the control is missing on this hardware (observed + code). Medium on the exact semantics per vendor. ## Explanation Many laptops (Lenovo IdeaPad/Yoga, some ASUS/Huawei) only offer a fixed battery protection mode, not arbitrary thresholds. Users then need a terminal (`echo 1 | sudo tee .../conservation_mode`) to protect the battery. Expected: a single "Protect battery (stop charging around 80%)" switch that uses thresholds when available, else `charge_types` Long_Life, else ideapad `conservation_mode`, and hides itself only when none exist.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Breadway/bos-settings#37
No description provided.