[RESOLVED] Change battery max charge from OS?

The UEFI BIOS has a setting for a maximum charge level for if the laptop is primarily plugged in. Is there a way to change this setting from the OS? It would be useful to, say, set the limit to 60% but be able to (using ectool as an example) ectool batterylimit 100 to charge to full in preparation for an extended time on battery and then setting it back later, but I haven’t been able to find any mechanism for doing this (if there is one).

1 Like

There is. At least for the fw13 but I suppose fw16 works the same as fw13 amd.

Take a look at:

On Intel FW everything works fine, but today (as of linux 6.9) this tools are not working out of the box for AMD:

3 Likes

Seems my problem was that it isn’t listed in ectool help so I didn’t know the fwchargelimit existed when I went searching for a way to do this yesterday.

Thanks for the help Ulmondil. It works out-of-the-box for me as my version of ectool has DHowett’s patches [1] for working around missing Framework support in upstream cros_ec[_lpc]. Because of this, the need of portio is solved.

[1] There’s a ectool-only repo on GitLab by DHowett for anyone who stumbles on this thread later.

1 Like

Thanks to Aperion! And the Framework commands are listed in include/framework_oem_ec_commands.h · main · Dustin L. Howett / ectool · GitLab.

1 Like