-
Notifications
You must be signed in to change notification settings - Fork 132
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
bat.d/framework: Add initial support for framework laptop #728
bat.d/framework: Add initial support for framework laptop #728
Conversation
Hi, thanks. I'll take a look at this soon. I'm just busy at the moment with necessary changes that have resulted from testing the macbook plugin. Stay tuned please. |
Sorry for the overly long delay. See my review for required changes. |
* Requires framework_laptop kernel module (currently out-of-tree) * Stop threshold only * Force discharge not supported * Requires Framework Laptop 13/16 Intel/AMD * charge_control_end_threshold: - Valid values: 1..100 - Default value: 100 Credits: * #728 Reference: * https://github.com/DHowett/framework-laptop-kmod/tree/main
@chutz due to your lack of response, i have created my own implementation -> https://github.com/linrunner/TLP/tree/feature/bat.d/framework @Simerax can you test it? |
FYI I wrote a generic ChromeOS EC charge control driver [0] It would be great if TLP could be compatible with that driver. [0] https://lore.kernel.org/lkml/20240616-cros_ec-charge-control-v4-0-74d649a9117d@weissschuh.net/T/#t |
@t-8ch I'm very pleased to hear from you on this topic. I would have emailed you otherwise. In principle, I would prefer to support your generic driver instead of framework_laptop, which is currently out-of-tree. I had my share of trouble with ThinkPad out-of-tree modules, I don't necessarily need that again. However, the connections are not yet clear to me:
|
The driver will (most likely) be called It supports start/stop thresholds and The hardware has all of the features, as proven by the upstream commands being supported and functional. For some reason Framework reinvented their own downstream commands. I plan on writing some patches for the EC firmware to unify both command sets, so the vanilla CrOS EC driver can work on the Framework without user intervention. |
Yes! Just checked out your branch and will now test it. :) I will probably comment my findings tomorrow or sometime over the weekend :) |
Just realized it needs the out of tree module..would it maybe make more sense to wait for t-8ch driver in the kernel instead of now "quickly" getting the support with an out of tree module? |
@Simerax you're knocking down open doors. However, I wouldn't mind if you could test the current plugin with the out-of-tree module. |
@linrunner Okay I tested it with the current master of the Battery Care detects the plugin and the Are there any other settings I should test? Do you want/need any stat outputs? |
* Requires framework_laptop kernel module (currently out-of-tree) * Stop threshold only * Force discharge not supported * Requires Framework Laptop 13/16 Intel/AMD * charge_control_end_threshold: - Valid values: 1..100 - Default value: 100 Credits: * #728 Reference: * https://github.com/DHowett/framework-laptop-kmod/tree/main
@Simerax Thanks so far. I need the output of
Please also run the automatic test script and show the output: It requires the tool clitest to be installed. Should be available as a package in most distributions. |
Clitest doesn't seem to be available on void. Is this the tool and repository you are referring to? https://github.com/aureliojargas/clitest Output of
|
Yes. |
sorry for the delay. Output of clitest:
|
Wow. It actually fitted perfectly on the first try. Thank you very much. Let's just save this in the back of our minds. Now I'll wait for the |
* Requires framework_laptop kernel module (currently out-of-tree) * Stop threshold only * Force discharge not supported * Requires Framework Laptop 13/16 Intel/AMD * charge_control_end_threshold: - Valid values: 1..100 - Default value: 100 Credits: * #728 Reference: * https://github.com/DHowett/framework-laptop-kmod/tree/main
* Requires framework_laptop kernel module (currently out-of-tree) * Stop threshold only * Force discharge not supported * Requires Framework Laptop 13/16 Intel/AMD * charge_control_end_threshold: - Valid values: 1..100 - Default value: 100 Credits: * #728 Reference: * https://github.com/DHowett/framework-laptop-kmod/tree/main
This requires the currently out of tree module for the framework laptop available at https://github.com/DHowett/framework-laptop-kmod
13efc85
to
3f0c428
Compare
Sorry about disappearing for awhile here. I have updated this MR to handle the |
@chutz : thanks so far. I would prefer your PR to be based on my branch https://github.com/linrunner/TLP/tree/feature/bat.d/framework . It already includes my changes to the TEMPLATE for 1.7. But before you do that, we need to clarify some points:
The condition is also met by the What about checking for /sys/module/cros_charge_control?
They are used for |
Really? No way TLP will implement that :-D. |
If the cros_charge_ctl module is used, should the TLP functionality still be called "framework"?
Not saying that it's reasonable, only possible. |
* Requires framework_laptop kernel module (currently out-of-tree) * Stop threshold only * Force discharge not supported * Requires Framework Laptop 13/16 Intel/AMD * charge_control_end_threshold: - Valid values: 1..100 - Default value: 100 Credits: * #728 Reference: * https://github.com/DHowett/framework-laptop-kmod/tree/main
* Requires framework_laptop kernel module (currently out-of-tree) * Stop threshold only * Force discharge not supported * Requires Framework Laptop 13/16 Intel/AMD * charge_control_end_threshold: - Valid values: 1..100 - Default value: 100 Credits: * #728 Reference: * https://github.com/DHowett/framework-laptop-kmod/tree/main
* Requires framework_laptop kernel module (currently out-of-tree) * Stop threshold only * Force discharge not supported * Requires Framework Laptop 13/16 Intel/AMD * charge_control_end_threshold: - Valid values: 1..100 - Default value: 100 Credits: * #728 Reference: * https://github.com/DHowett/framework-laptop-kmod/tree/main
This requires the currently out of tree module for the framework laptop available at https://github.com/DHowett/framework-laptop-kmod
This started with the template and added support for the framework laptop.