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).
There is. At least for the fw13 but I suppose fw16 works the same as fw13 amd.
Take a look at:
- GitHub - FrameworkComputer/framework-system: Rust libraries and tools to interact with the Framework Computer systems
- discussion about ec: Exploring the Embedded Controller - #122 by DHowett
- daemon + gnome extension(develop by @stefanho): GitHub - stefanhoelzl/frameworkd
- same topic/question but regarding fw13: Can the battery charge limit be set from Linux?
On Intel FW everything works fine, but today (as of linux 6.9) this tools are not working out of the box for AMD:
- the
cros-ec
driver won’t work on amd systems (I confirm with regards to amd FW13 but iirc for FW16 is the same) until Re: [PATCH v3 0/4] platform/chrome: cros_ec_lpc: add support for AMD Framework Laptops - patchwork-bot+chrome-platform is merged (you can build your kernel) - the
portio
driver won’t work when kernel lockdown is enforced (always when SecureBoot is active unless you have some custom module or patch the kernel), see Framework 13 AMD Support on Linux · Issue #20 · FrameworkComputer/framework-system · GitHub
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.
Thanks to Aperion! And the Framework commands are listed in include/framework_oem_ec_commands.h · main · Dustin L. Howett / ectool · GitLab.