You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
F13 AMD AI 300 - Battery charge limit ignored on subsequent boots #67
Are you running your mainboard as a standalone device. Is standalone mode enabled in the BIOS?
Yes
No
Describe the bug
"Battery charge limit" setting is ignored after reboot, after the PC is turned on. This was observed while Battery Life Extender is disabled to isolate the issue.
Steps To Reproduce
First, a check to verify Battery charge limit works:
Boot up F13 while charger is plugged in.
Set "Battery charge limit" to a new number lower than the current battery percentage.
Save & exit. Boot continues and port LED should turn white.
Now, set up the conditions for reboot:
Power off computer.
Unplug charger.
Wait 2 minutes.
Now, steps that produce the error:
Plug in the charger. LED should turn white as the battery is at or above the charge limit.
Turn on the PC. The LED eventually turns orange and stays there.
Verify in the OS that the battery is charging above the set limit.
Unplug and plug the charger again. Verify that the LED is orange and that the battery continues to charge above the set limit.
Video demonstrating behavior during boot, showing LED as well as power draw:
4940462277422745037.mp4
Powering off, unplugging, and waiting re-sets the issue, but the issue re-occurs if the PC starts.
Expected behavior
Battery charge limit is honored regardless of the combination of events.
Charger plugged while powered off (works)
Powered on while plugged in (issue)
Charger plugged while powered on (issue)
Operating System (please complete the following information):
OS/Distribution: Windows 11
Reacted by Grégoire Stein Greyxor, Tom Vincent, zovt, BlipBloop, laminar-oss and arthurs
Are you able to run "ectool version". It is a Linux command, but there might be a Windows equivalent.
Maybe the FW tool can be made to work on Windows. It is a rust program that you might be able to compile on windows.
Alternatively, use a Linux Live USB stick.
Would you be able to clarify.
Say you set the charge limit to 80% and the current charge is 80%.
You then set the charge limit to 60%. What are you expecting?
FYI, FW expect it to immediately discharge to 60%, even with the AC plugged in.
I did not like that, so part of the reason I wrote my own bug fixes to the EC Firmware for my FW16 AMD 7840HS.
Whether the laptop discharges or relies on AC power is not high-priority on my list of concerns; the issue here is that objectively incorrect behavior happens, which is charging to 100%. It defeats the whole point of a battery charging limit if the limit is only enforced during that session for the EC.
As for how it looks at the BIOS setting level:
The BIOS does remember what the entered charging limit was; re-entering the BIOS shows the limit as entered.
The BIOS does not re-inforce the setting even after you re-enter the BIOS settings. I need to enter a different limit in order for the EC to enforce a charging limit, and of course a power-down makes the limit ineffective again.
Reacted by Grégoire Stein Greyxor and Luca Ferragina
Whether the laptop discharges or relies on AC power is not high-priority on my list of concerns; the issue here is that objectively incorrect behavior happens, which is charging to 100%. It defeats the whole point of a battery charging limit if the limit is only enforced during that session for the EC.
As for how it looks at the BIOS setting level:
* The BIOS does remember what the entered charging limit was; re-entering the BIOS shows the limit as entered.
* The BIOS does _not_ re-inforce the setting even after you re-enter the BIOS settings. I need to enter a different limit in order for the EC to enforce a charging limit, and of course a power-down makes the limit ineffective again.
I've observed the same issue since I got the laptop, running Fedora 42. To slightly expand, the setting is correctly maintained if rebooting or if the period of time the laptop stays off is "short enough" but any longer shutdown will not enforce the limit.
The messaging from the BIOS to the EC is via HC (Host Commands).
At boot up the BIOS sends an HC to the EC telling it what the charge limit is.
The EC then just has some bugs in its code that cause it to accidentally not take it into account in particular edge cases.
If you wish you can download and install my version of the "ectool". Instructions here: https://github.com/jcdutton/EmbeddedController/wiki/ectool
To stop it charging or discharging: sudo ectool chargecontrol idle
To cause it to start discharging down to the BIOS set Battery Limit level. sudo ectool chargecontrol discharge
To cause it to start charging, if it is below the BIOS set Battery Limit level: sudo ectool chargecontrol discharge
They are not fixes for the bugs, but at least let you bring the charge back to where you want it.
Due to EC bugs, the above commands have limited success, but might help.
I have written a version of the EC firmware that fixes all the bugs, but it currently has only been tested on FW16 AMD 7840HS and FW13 AMD 7840U/7640U.
I don't have a version that would work on the FW13 AMD AI 300.
Presumably, this is the same issue as found on the 7040 series, BIOS v3.07:
We found a known issue that "If the battery extender mode is disabled, and charge limit is set below 100%, the charge limit will not be enforced causing the battery to charge to 100%."
Presumably, this is the same issue as found on the 7040 series, BIOS v3.07:
We found a known issue that "If the battery extender mode is disabled, and charge limit is set below 100%, the charge limit will not be enforced causing the battery to charge to 100%."
Are you able to run "ectool version". It is a Linux command, but there might be a Windows equivalent. Maybe the FW tool can be made to work on Windows. It is a rust program that you might be able to compile on windows. Alternatively, use a Linux Live USB stick.
I have a similar issue, my GaN charger stays at the 80% charging limit, but my dock doesn't care and charges over 80%. Hoping the upcoming BIOS update fixes this too
batch 4 FW13 AMD AI 340.
Thank you for the heads-up—confirming that while booted in Windows the issue is circumvented by executing from terminal (assuming same directory as .exe):
.\framework_tool --charge-limit [INTEGER OTHER THAN PREVIOUSLY SET LIMIT]
This acts similar to re-entering a different battery limit in the BIOS as I previously documented.
There may be other options that work too, but didn't want to fuss around too much with hardware I don't understand.
@quinchou77
Would you be able to tell us which git branch/tag was used for the AI 300 firmware release. (for the EC part)
It would be useful to view the source code of what was released.
As the issue opener, I wanted to update that upgrading to 3.04 stable appears to have fixed the issue. It's also recognized by Windows as "smart charging":
As the issue opener, I wanted to update that upgrading to 3.04 stable appears to have fixed the issue. It's also recognized by Windows as "smart charging":
This version adds a smart charging icon feature, based on the ACPI spec definition.
Activity
jcdutton commentedon Apr 30, 2025
Are you able to run "ectool version". It is a Linux command, but there might be a Windows equivalent.
Maybe the FW tool can be made to work on Windows. It is a rust program that you might be able to compile on windows.
Alternatively, use a Linux Live USB stick.
framework_tool --versions
Post the output here.
YLee42 commentedon Apr 30, 2025
I found a Windows build of ectool here and ran it locally. Output here:
jcdutton commentedon Apr 30, 2025
FW have not published any of the source code for the "lilac" EC Firmware.
jcdutton commentedon Apr 30, 2025
Would you be able to clarify.
Say you set the charge limit to 80% and the current charge is 80%.
You then set the charge limit to 60%. What are you expecting?
FYI, FW expect it to immediately discharge to 60%, even with the AC plugged in.
I did not like that, so part of the reason I wrote my own bug fixes to the EC Firmware for my FW16 AMD 7840HS.
YLee42 commentedon Apr 30, 2025
Whether the laptop discharges or relies on AC power is not high-priority on my list of concerns; the issue here is that objectively incorrect behavior happens, which is charging to 100%. It defeats the whole point of a battery charging limit if the limit is only enforced during that session for the EC.
As for how it looks at the BIOS setting level:
Parsifal-2045 commentedon May 3, 2025
I've observed the same issue since I got the laptop, running Fedora 42. To slightly expand, the setting is correctly maintained if rebooting or if the period of time the laptop stays off is "short enough" but any longer shutdown will not enforce the limit.
jcdutton commentedon May 3, 2025
The messaging from the BIOS to the EC is via HC (Host Commands).
At boot up the BIOS sends an HC to the EC telling it what the charge limit is.
The EC then just has some bugs in its code that cause it to accidentally not take it into account in particular edge cases.
If you wish you can download and install my version of the "ectool". Instructions here:
https://github.com/jcdutton/EmbeddedController/wiki/ectool
To stop it charging or discharging:
sudo ectool chargecontrol idleTo cause it to start discharging down to the BIOS set Battery Limit level.
sudo ectool chargecontrol dischargeTo cause it to start charging, if it is below the BIOS set Battery Limit level:
sudo ectool chargecontrol dischargeThey are not fixes for the bugs, but at least let you bring the charge back to where you want it.
Due to EC bugs, the above commands have limited success, but might help.
I have written a version of the EC firmware that fixes all the bugs, but it currently has only been tested on FW16 AMD 7840HS and FW13 AMD 7840U/7640U.
I don't have a version that would work on the FW13 AMD AI 300.
tlvince commentedon May 5, 2025
Presumably, this is the same issue as found on the 7040 series, BIOS v3.07:
#52 (comment)
It was fixed in BIOS v3.09. @quinchou77, could you confirm? Will the same fix be brought over to the AI 300 series?
quinchou77 commentedon May 5, 2025
Yes, it will also be fixed in the next AI 300 Series BIOS. We are planning for each product update. I will update the schedule for AI 300 Series.
JohnAZoidberg commentedon May 6, 2025
FYI, prebuilt binaries of framework_tool are available for windows: https://github.com/FrameworkComputer/framework-system/releases
wturgeonw commentedon May 15, 2025
I have a similar issue, my GaN charger stays at the 80% charging limit, but my dock doesn't care and charges over 80%. Hoping the upcoming BIOS update fixes this too
batch 4 FW13 AMD AI 340.
YLee42 commentedon May 16, 2025
Could you note here which dock you are using to charge? Probably good to have that data point.
wturgeonw commentedon May 16, 2025
Right, good idea. It's a Plugable UD-CA1A. https://plugable.com/products/ud-ca1a/
YLee42 commentedon May 25, 2025
Thank you for the heads-up—confirming that while booted in Windows the issue is circumvented by executing from terminal (assuming same directory as .exe):
.\framework_tool --charge-limit [INTEGER OTHER THAN PREVIOUSLY SET LIMIT]This acts similar to re-entering a different battery limit in the BIOS as I previously documented.
There may be other options that work too, but didn't want to fuss around too much with hardware I don't understand.
quinchou77 commentedon Jul 4, 2025
Sorry for late reply. Since we are waiting for AMD PI update for a USB4 issue, so it is delay. The ETA for beta version is 7/10.
quinchou77 commentedon Jul 11, 2025
F13 AMD AI300 BIOS 3.04 beta is in community, here is the link of the forum.
https://community.frame.work/t/framework-laptop-13-ryzen-ai-300-bios-3-04-release-beta/71934
GreyXor commentedon Jul 11, 2025
Thanks!
Upgrade completed successfully. The charge limit issue appears to be resolved.
jcdutton commentedon Jul 11, 2025
@quinchou77
Would you be able to tell us which git branch/tag was used for the AI 300 firmware release. (for the EC part)
It would be useful to view the source code of what was released.
tlvince commentedon Jul 16, 2025
I assume it's fwk-lilac-27116, specifically:
FrameworkComputer/EmbeddedController@96071d4
FrameworkComputer/EmbeddedController@d2a654b
quinchou77 commentedon Jul 17, 2025
The latest code of this version has not push to external. We will push it when this version gets stable next week.
YLee42 commentedon Jul 22, 2025
As the issue opener, I wanted to update that upgrading to 3.04 stable appears to have fixed the issue. It's also recognized by Windows as "smart charging":
wturgeonw commentedon Jul 24, 2025
Issue is also fixed using my dock, smart charging icon appears and it never goes over my set limit. The setting persists after rebooting. Well done!
quinchou77 commentedon Jul 24, 2025
This version adds a smart charging icon feature, based on the ACPI spec definition.
arthursimonyantsaero commentedon Jul 25, 2025
I can also report that successful update over LVFS fixed the issue.
quinchou77 commentedon Aug 15, 2025
Issue is fixed with the latest bios 3.04, closed.