Limit USB-C port's PD power draw

Hello, I would like to ask whether it is technically possible to limit Framework Laptop 13(AMD 7040 series)'s power draw from the type-C port from software/firmware/embedded controller even if the power source support higher charging wattage.

I would like to prevent the laptop from draining my power bank too fast.

Thanks in advance!

It’ll just charge up the laptops battery, so it’s not as if the power is just gone. Or you’re actually using it because CPU/whatever is running and crunching whatever. So I think the proper question is what are you doing that’s causing the laptop to use more power. If you’re playing a game or doing number crunching, that’s just reality.

If you’re doing very little with modest screen brightness, might be something unexpected and possibly unwanted running in the background.Fix that, and your battery life will improve.

If there’s nothing to fix… Get a 2nd battery pack of a larger one. I can’t think of a reason why you’d be worried about an external battery pack having charge when it’s just going into the laptops battery. I’m curious if there is one that isn’t occurring to me.

I want my power bank to be able to charge my other devices while keeping the laptop’s battery at a relatively high capacity. I don’t need to charge the laptop to 100% while I’m outside.

Can’t you charge your other devices from the FW in that case?

Also, if it’s already at or near 100% before you put it on the external battery, it won’t use any more power than the laptop is actually using to run itself. Otherwise it’ll start to run down it’s internal battery.

Basically you’re talking about current (or voltage) limiting below the capabilities of external battery pack, which is not something USB-PD is really designed to do. Maybe, just maybe, with the EC FW can talk to the CC/CV charging chip in the laptop and tell it to pull less current. But I don’t know that anyone has ever thought that’d be something they want to do.

Alternatively…just unplug the laptop until it gets low, then plug it in. It’ll effectively be the same, more or less. Only draining the external battery when you want it to.

with “ectool” you can set “chargecurrentlimit”, see Exploring the Embedded Controller

2 Likes

Wow, I had no idea, that’s awesome.

Specifically this comment Exploring the Embedded Controller - #78 by Nils

And full documentation appears to be up at The Framework Laptop's Embedded Controller (EC) :: HowettNET

1 Like

The power bank supports more voltage/current combinations then the Framework Laptop’s type-C port and is preferred to be used.

But I don’t know that anyone has ever thought that’d be something they want to do.

It is quite common for (rooted) Android devices to expose a current_max sysfs entry to limit the input power.

While that option sure is helpful it is slightly different from what I needed in this post, which is to limit the maximum power draw instead of the maximum battery capacity to stop charging.

What I hope to see is the functionality to tell the PMIC to only draw as much as 30/45/60W, even if the power supply itself is capable of outputting more wattage like 100W.

It is in fact what you wanted - there is both!

  • “ectool chargecurrentlimit” is the power draw limit (… if you factor in the charge voltage)
  • “ectool fwchargelimit” is the battery level limit
3 Likes

I overlooked that one, thanks for mentioning it!