Repository navigation
Open
Description
Device Information
System Model or SKU
Please select one of the following
- Framework Laptop 13 (11th Gen Intel® Core™)
- Framework Laptop 13 (12th Gen Intel® Core™)
- Framework Laptop 13 (13th Gen Intel® Core™)
- Framework Laptop 13 (AMD Ryzen™ 7040 Series)
- Framework Laptop 13 (Intel® Core™ Ultra Series 1)
- Framework Laptop 13 (AMD Ryzen™ AI 300 Series)
- Framework Laptop 16 (AMD Ryzen™ 7040 Series)
BIOS VERSION
3.04
DIY Edition information
- Memory: Crucial CT2K16G56C46S5 32GB DDR5-5600 SODIMM
- Storage: SK hynix Platinum P41 1TB SSD
Port/Peripheral information
- USB-C expansion card: Framework 60W charger
- USB-C expansion card (no peripheral)
- USB-C expansion card (no peripheral)
- USB-C expansion card (no peripheral)
Standalone Operation
- Yes
- No
Describe the bug
Loading cros_charge-control with probe_with_fwk_charge_control=1 should provide /sys/class/power_supply/BAT1/charge_control_{start,end}_threshold for userspace charge control e.g. GNOME 48's Preserve Battery Health feature.
This used to work on BIOS 3.03, but regressed in 3.04.
With the BIOS limiter set to 100% and extender disabled and cros_charge-control enabled, in the EC logs, I see:
[238553.413200 Sustainer enabled: 75 ~ 100%]
[238553.423500 Sustainer updated: 75 ~ 80% (from 75 ~ 100%)]
[238553.552500 Sustainer disabled]
... which suggests the limits are being passed through correctly, but then being reset.
This looks like the culprit: FrameworkComputer/EmbeddedController@d2a654b#diff-c97fadb96709544efeb068ef6acb07cc573d36d2b4498033b7d5f84b8a24ae41L85-L141
Connects #70.
Operating System (please complete the following information):
- OS/Distribution: NixOS
- Version: 25
- Linux Kernel Version: 6.14.6
Reacted by Liam Hupfer, Eric Park, Lee245, Abdull, Daniel P, technobirb, Martin Vysny, Jerry, Kosta and Mitar
Reacted by iliana etaoin, Nicholas La Roux, Marcelo Hernandez, Liam Hupfer, Chris Kankiewicz, Eric Park and Søren Dalby Larsen
Metadata
Metadata
Assignees
Labels
No labels
Activity
X-m7 commentedon Aug 11, 2025
I'm also seeing this issue on my Framework 13 with an Intel Core Ultra 5 125H, BIOS 3.05, Arch Linux, kernel 6.15.9 with the mfd: cros_ec: Separate charge-control probing from USB-PD patch applied, I see the following in the EC logs when I change the charge limit via the KDE GUI:
X-m7 commentedon Sep 5, 2025
Still not fixed with BIOS 3.06 (released a few days ago for the Core Ultra FW13) and kernel 6.16.4 (which now includes the aforementioned patch at least), the EC logs still show the same behavior as my previous comment.
PHLAK commentedon Nov 12, 2025
I recently ran into this as well and like to see it resolved as my Framework 13 battery has started to bulge after a year of use. I've already ordered a replacement battery and enabled the charge limit via the BIOS but I'd prefer to allow the OS (Arch + GNOME) to control this so I can temporarily disable it when I would actually like the battery to charge to 100% (e.g. when I know I'm going to be using the laptop on battery for an extended period of time). Having to reboot to the BIOS to adjust the charge limit is annoying.
tlvince commentedon Nov 12, 2025
This can be achieved without a reboot via framework_tool (or ectool):
... although I agree; control via the OS/desktop environment is more convenient.
PHLAK commentedon Nov 12, 2025
Ahh, I forgot about that. Thank you!
JohnAZoidberg commentedon Jan 25, 2026
This should work again now with torvalds/linux@e40fc11 ?
t-8ch commentedon Jan 25, 2026
@JohnAZoidberg It got broken by a newer firmware version again.
JohnAZoidberg commentedon Jan 25, 2026
Ok, thanks, I will investigate
senz commentedon Mar 6, 2026
I might have a related issue: I can set and see
/sys/class/power_supply/BAT1/charge_control_{start,end}_thresholdbut after reboot, it resets back to 100. I was working on BIOS 3.03 and now I'm on 0.0.3.5System info:
technobirb commentedon Mar 14, 2026
Charge limit set by the
framework_toolalso resets to 100% after a reboot.Framework 13, Firmware 3.18, Arch Linux.
mvysny commentedon May 8, 2026
Seeing this on Framework Laptop 13 (AMD Ryzen™ AI 300 Series), BIOS 03.05, Ubuntu 26.04, kernel 7.0.0-15-generic.
With
probe_with_fwk_charge_control=Yset,charge_control_end_thresholdcorrectly reads back as 80, and GNOME 48's "Preserve Battery Health" appears in Settings → Power. However the EC ignores the threshold and the battery charges past 80%.Notably, 03.05 is the current latest firmware for the AI 300 board per fwupdmgr, so this regression from 3.03 is still present in the newest release.
The BIOS charge limit (set directly in firmware) does work correctly as a workaround, but it means losing the GNOME UI integration.
jm355 commentedon Jun 22, 2026
I'm also not seeing the gnome battery saver in settings on Secureblue linux.
gclawes commentedon Aug 4, 2026
Same dual-path mismatch as others (sysfs 75/80 via 0x96, framework_tool still 0–100). I didn’t capture EC logs here, but this matches the sustainer reset pattern in this issue.
KDE charge limit sets sysfs to 75/80 (EC_CMD_CHARGE_CONTROL / 0x96), but:
So the Framework path (
0x3E03/BBRAM) never gets updated. Same pattern as others: sustainer briefly applies, then gets cleared while Framework’s limit stays unlimited.Workaround that actually programs Framework’s limit:
sudo framework_tool --charge-limit 80Would be good if DE/sysfs charge control either stopped getting reset, or also updated the Framework charge-limit so it matches
framework_tool.aguano commentedon Oct 5, 2026
Same issue on a Framework Laptop 13 Pro (Intel Core Ultra Series 3, Core Ultra X7 358H), BIOS 03.02.
OS: Fedora Workstation 44, kernel 7.2.8-200.fc44, GNOME 50 "Preserve Battery Health" enabled
cros_charge_control loaded with probe_with_fwk_charge_control=Y (no "Framework charge control detected, preventing load" in the journal)
sysfs: charge_control_end_threshold = 80, charge_control_start_threshold = 75
BIOS: Battery Charge Limit 100, Battery Extender disabled
Result: on AC at 94 %, status = Charging; the battery previously charged to 95 %. The EC ignores the threshold.
framework_tool is not installed, so I could not read the Framework charge limit (0x3E03).
Pace17881 commentedon Nov 13, 2026
Root cause candidate (from the EC source): the EC re-clears the sustainer every second while the Framework limit (BBRAM / cmd 0x3E03) is 0 or 100
battery_extender()is aHOOK_SECONDhandler. Whilestage == BATT_EXTENDER_STAGE_0it callsbattery_percentage_control(), which onfwk-lilac-refresh(andfwk-lotus-azalea-19573,fwk-sakura-20260429,fwk-sunflower-dahlia-2026-09-30, same code) does:charging_maximum_levelonly mirrors the value stored through 0x3E03 (framework_tool --charge-limit, BIOS setup). A sustainer that was set through the genericEC_CMD_CHARGE_CONTROL(0x96), which is whatcros_charge-control, sysfs, TLP and KDE use, is therefore cleared again within at most one second, unless the Framework limit happens to be < 100.This matches the EC logs in this issue:
Sustainer enabled→Sustainer updated: 75 ~ 80%→Sustainer disabledroughly one HOOK_SECOND tick apart (e.g.1051.4892→1052.4726). It also explains the "sysfs says 80,framework_tool --charge-limitsays 100" mismatch reported above: the two paths are not merged, and the 0x3E03 path always wins.The
== 100condition was added by d2a654b (1d228d5 on the lilac branch). With BBRAM = 100 the old code setbattery_sustainer_set(95, 100)once and then left later 0x96 writes alone. That fits "worked on 3.03, regressed on 3.04".Data point (confirms it is still present on current firmware):
cros_charge_control probe_with_fwk_charge_control=1, TLP 1.11 withSTART/STOP_CHARGE_THRESH_BAT1=75/80charge_now2918 → 3142 mAh, which is also past 80 % of design capacity), and the EC itself reported 97 % about an hour laterframework_tool --charge-limitreportsMinimum 0%, Maximum 100%(Framework limit unset)EC console right after writing 80 to
charge_control_end_threshold(SB-RMI Errorlines filtered out):The sustainer is enabled (the battery is above 80 %, so the EC switches to DISCHARGE), and about 245 ms after the host command it is disabled again. That is consistent with the once-per-second
battery_extender()hook clearing it.Possible fix (untested on hardware, not flashed): only undo a sustainer this module configured itself, so a host-set (0x96) sustainer survives:
Going from e.g. 80 → 100 via 0x3E03 still clears it (
old_charger_limitis non-zero then). TheCHG_LIMIT_OVERRIDEbranch and the extender stages are unchanged. Related: #100 invalidatesold_charger_limiton SET, so the two changes should be looked at together.Happy to turn this into a PR against the relevant branch if that's useful.
mitar commentedon Nov 14, 2026
My workaround is to set in BIOS the firmware's own charge limit at 99% and Battery Extender disabled.
fwk: battery_extender: clear the sustainer only when the limit change…
fwk: battery_extender: clear the sustainer only when the limit change…
mitar commentedon Nov 22, 2026
Follow-up to my workaround above: the cause is in the EC.
battery_percentage_control()inbattery_extender.cruns every second, and while the firmware's own charge limit is 0 or 100 it callscharger_sustainer_reset()on every pass. That turns the sustainer off and sets the charge control mode to normal, so within a second it clears the thresholds which Linux'scros_charge_controlsets withEC_CMD_CHARGE_CONTROL.This commit clears the sustainer once, when the limit changes to 100%, the same way a limit below 100 is applied only when it changes. On a Laptop 13 Pro with the AMD Ryzen AI 300 Series mainboard, setting the limit to 100% then cleared the sustainer once, and thresholds which Linux set afterwards held without being cleared again. So with this firmware the BIOS limit can stay at 100% while Linux sets the thresholds: with the BIOS limit at 100%, GNOME's 40% and 60% were still in the EC four hours after Linux set them at boot (
EC_CMD_CHARGE_CONTROLGET returned the lower and upper limits 40 and 60, with the charge held in IDLE).To load
cros_charge_controlon these laptops at all, it needsoptions cros_charge_control probe_with_fwk_charge_control=1, because it stays away by default when the EC also offers Framework's own charge limit.