Skip to content

F13 AMD AI 300 - Battery charge limit ignored on subsequent boots #67

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
2 of 3 tasks
YLee42 opened this issue Apr 30, 2025 · 11 comments
Open
2 of 3 tasks

F13 AMD AI 300 - Battery charge limit ignored on subsequent boots #67

YLee42 opened this issue Apr 30, 2025 · 11 comments

Comments

@YLee42
Copy link

YLee42 commented Apr 30, 2025

Device Information

System Model or SKU

  • Framework Laptop 13 (AMD Ryzen™ AI 300 Series)

BIOS VERSION

3.03 (out-of-the-box and current)

DIY Edition information

Memory: Crucial DDR5-5600 2x16GB, CT2KG56C4635
Storage: Crucial P310 1TB

Standalone Operation

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:

  1. Boot up F13 while charger is plugged in.
  2. Set "Battery charge limit" to a new number lower than the current battery percentage.
  3. Save & exit. Boot continues and port LED should turn white.

Now, set up the conditions for reboot:

  1. Power off computer.
  2. Unplug charger.
  3. Wait 2 minutes.

Now, steps that produce the error:

  1. Plug in the charger. LED should turn white as the battery is at or above the charge limit.
  2. Turn on the PC. The LED eventually turns orange and stays there.
  3. Verify in the OS that the battery is charging above the set limit.
  4. 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.

  1. Charger plugged while powered off (works)
  2. Powered on while plugged in (issue)
  3. Charger plugged while powered on (issue)

Operating System (please complete the following information):

  • OS/Distribution: Windows 11
@GreyXor
Copy link

GreyXor commented Apr 30, 2025

I have the same issue. charge limit feature is broken now. It's not correctly respected.

@jcdutton
Copy link

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
Copy link
Author

YLee42 commented Apr 30, 2025

I found a Windows build of ectool here and ran it locally. Output here:

RO version:    lilac-3.0.3-413f018
RW version:    lilac-3.0.3-413f018
Firmware copy: RO
Build info:    lilac-3.0.3-413f018 2025-03-06 05:45:28 marigold2@ip-172-26-3-226
Tool version:  0.0.1-isolate Nov 13 2024 none

@jcdutton
Copy link

FW have not published any of the source code for the "lilac" EC Firmware.

@jcdutton
Copy link

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
Copy link
Author

YLee42 commented 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:

  • 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.

@Parsifal-2045
Copy link

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.

@jcdutton
Copy link

jcdutton commented 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 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.

@tlvince
Copy link

tlvince commented May 5, 2025

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%."

#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
Copy link

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%."

#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?

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
Copy link
Member

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.

FYI, prebuilt binaries of framework_tool are available for windows: https://github.com/FrameworkComputer/framework-system/releases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants