Skip to content

--charge-rate-limit SoC threshold is latched, changing the threshold doesn't re-evaluate or clear the active limit #342

@ozturkkl

Description

@ozturkkl

Summary

The battery_soc argument to --charge-rate-limit <rate> <soc> (which maps to EC_CMD_CHARGE_CURRENT_LIMIT v1, EcRequestCurrentLimitV1) is documented as:

Battery state of charge is the minimum charge percentage at which the battery charge current limit will apply. When not set, the limit will apply regardless of state of charge.

Once a limit with a SoC threshold is active, changing the threshold to a new value does not re-evaluate it. The EC stays limited below the new threshold and never returns to the default charging speed, even across a reboot. The limit appears to be latched and is only cleared by explicitly removing the SoC argument first.

Environment

Tool Version:     0.6.3
OS Version:       Linux 7.0.10 #1-NixOS SMP PREEMPT_DYNAMIC Sat May 23 11:09:44 UTC 2026 x86_64
Mainboard Hardware
  Type:           Laptop 16 (AMD Ryzen AI 300 Series)
  Revision:       MassProduction
UEFI BIOS
  Version:        03.04
  Release Date:   11/06/2025
EC Firmware
  Build version:  tulip-3.0.4-ea09e7a 2025-11-06 10:52:13 lotus@ip-172-26-3-226
  Current image:  RO
PD Controllers
  Right (01):       0.0.22 (MainFw)
  Left  (23):       0.0.22 (MainFw)
Intel Retimers (Potential)
USB Hub RTL5432
  Firmware Version: 0.0.7
Laptop 16 Keyboard Module - ANSI
  Firmware Version: 0.3.1
  Location: [X] [ ] [ ]       [ ] [ ]
LED Matrix
  Firmware Version: 0.2.0
  Location: [ ] [ ] [ ]       [ ] [X]
LED Matrix
  Firmware Version: 0.2.0
  Location: [ ] [ ] [ ]       [X] [ ]
Touchpad
  Firmware Version: v0905
NVMe Device: /dev/nvme0
 Model Number:     WDC PC SN810 SDCPNRY-1T00
 Firmware Version: 61506000

Reproduction

  1. sudo framework_tool --charge-rate-limit 0.2 40 — limit applies as expected around 40%.
  2. sudo framework_tool --charge-rate-limit 0.2 90 (only the threshold changed; rate can be the same or different).
  3. Battery is now stuck at 0.2C below 90% and never returns to default charging speed.
  4. A reboot does not clear it.
  5. Workaround: issue --charge-rate-limit <rate> without a SoC argument first (clears/flattens the limit), then re-issue --charge-rate-limit <rate> <soc> to "bake in" the new threshold.

Expected

Changing the SoC threshold should re-evaluate immediately: below the threshold the EC should charge at full speed (that is safe for the current %), and the previously-set limit should not persist after the parameters change.

Repro On FW 16


[kemal@laptop:~]$ sudo framework_tool --charge-rate-limit 1.0
Requested Rate:      1C
Design Current:      5491mA
Limiting Current to: 5491mA

[kemal@laptop:~]$ sudo framework_tool --power
Charger Status
  AC is:            connected
  Charger Voltage:  17600mV
  Charger Current:  5488mA
                    1.00C
  Chg Input Current:5250mA
  Battery SoC:      83%
Battery Status
  AC is:            connected
  Battery is:       connected
  Battery LFCC:     5203 mAh (Last Full Charge Capacity)
  Battery Capacity: 4304 mAh
                    74.575 Wh
  Charge level:     82%
  Battery charging

[kemal@laptop:~]$ sudo framework_tool --charge-rate-limit 0.1 40
Requested Rate:      0.1C
Design Current:      5491mA
Limiting Current to: 549mA

[kemal@laptop:~]$ sudo framework_tool --power
Charger Status
  AC is:            connected
  Charger Voltage:  17600mV
  Charger Current:  544mA
                    0.10C
  Chg Input Current:5250mA
  Battery SoC:      83%
Battery Status
  AC is:            connected
  Battery is:       connected
  Battery LFCC:     5203 mAh (Last Full Charge Capacity)
  Battery Capacity: 4314 mAh
                    72.634 Wh
  Charge level:     82%
  Battery charging

[kemal@laptop:~]$ sudo framework_tool --charge-rate-limit 0.2 90
Requested Rate:      0.2C
Design Current:      5491mA
Limiting Current to: 1098mA

[kemal@laptop:~]$ sudo framework_tool --power
Charger Status
  AC is:            connected
  Charger Voltage:  17600mV
  Charger Current:  544mA
                    0.10C
  Chg Input Current:5250mA
  Battery SoC:      83%
Battery Status
  AC is:            connected
  Battery is:       connected
  Battery LFCC:     5203 mAh (Last Full Charge Capacity)
  Battery Capacity: 4317 mAh
                    72.693 Wh
  Charge level:     82%
  Battery charging
#    -> EXPECTED: back to full charge rate (you're at 84%, below the 90% threshold)
#    -> ACTUAL:   still limited (~0.10C), stuck below the new threshold

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions