dell / libsmbios

library for interacting with Dell SMBIOS tables
Other
192 stars 39 forks source link

Discharge battery while AC is connected #81

Closed awehrfritz closed 4 years ago

awehrfritz commented 4 years ago

Is there an option or a command in libsmbios to (fully) discharge the battery while AC is connected?

Similarly, is there an option to force the battery to be fully charge irrespective of the threshold settings or battery charge configuration - i.e. a single full recharge after which the usual battery settings are in effect again.

These two options/commands have long been available for Lenovo ThinkPads and would be great to have also for high-end Dell laptops. This inquiry is in part due to an effort to extend the TLP utility to Dell laptops for advanced power management under Linux, see https://github.com/linrunner/TLP/issues/379#issuecomment-479549566 and the TLP documentation for details.

superm1 commented 4 years ago

Is there an option or a command in libsmbios to (fully) discharge the battery while AC is connected?

I don't believe that the Dell EC and BIOS exposes an API to do this. libsmbios can't do anything not exposed by Dell EC and BIOS. I would recommend you bring this request over to the Dell forums. If there is enough interest drummed up, reps there can bring it to the BIOS and EC teams to explore and prioritize. If you buy through a Dell sales rep, you can also bring it to them and they can pass it through their channels.

Similarly, is there an option to force the battery to be fully charge irrespective of the threshold settings or battery charge configuration - i.e. a single full recharge after which the usual battery settings are in effect again.

I don't think I follow what you're looking to do here. Like a setting that fully charges the battery once, and then reverts back to threshold charging? Right now I think that type of thing is most likely accomplished by a shell script, monitoring the battery status and just changing the charging settings.

Again, if this is something that you see on Lenovo, make some noise on Dell forums. I of course can't guarantee that it will get done, but that's the right avenue.

see linrunner/TLP#379 (comment) and the TLP documentation for details.

@marmistrz FYI there are some things the team is verifying regarding problems with the WMI API and a new release will be brought out after that. You probably see a few recent PR related to them.

awehrfritz commented 4 years ago

Is there an option or a command in libsmbios to (fully) discharge the battery while AC is connected?

I don't believe that the Dell EC and BIOS exposes an API to do this. libsmbios can't do anything not exposed by Dell EC and BIOS. I would recommend you bring this request over to the Dell forums. If there is enough interest drummed up, reps there can bring it to the BIOS and EC teams to explore and prioritize. If you buy through a Dell sales rep, you can also bring it to them and they can pass it through their channels.

Thanks for advising. I will raise the issue in the Dell forums and/or ask the support.

Similarly, is there an option to force the battery to be fully charge irrespective of the threshold settings or battery charge configuration - i.e. a single full recharge after which the usual battery settings are in effect again.

I don't think I follow what you're looking to do here. Like a setting that fully charges the battery once, and then reverts back to threshold charging? Right now I think that type of thing is most likely accomplished by a shell script, monitoring the battery status and just changing the charging settings.

You are right, this could be done essentially by changing the thresholds and resetting them afterwards. However, an implementation in the BIOS seemed possible as well and possibly more elegant (read easier to implement). Also, I stumbled across an entry in the token list, which seems to be doing that: 022A | Express_Charge | Once | Enables the system to use the Express Charge algorithm for one charge cycle. It’s just unclear to me at the moment if this is available for my device (a Latitude 7480) or if this is implemented in libsmbios.

superm1 commented 4 years ago

You can check with smbios-token-ctl and the appropriate arguments to tell if supported by yours even if libsmbios (eg smbios-battery-ctl) doesn't support it. If it is supported by the firmware and works for you, I think it's reasonable to add to smbios-battery-ctl as another option.

awehrfritz commented 4 years ago

I have posted this in the Dell forums in the hope that this will be implemented in a future EC/BIOS update: https://www.dell.com/community/Latitude/Discharge-battery-while-AC-is-connected/m-p/7462945#M18457

I will close this issue since there is currently not much that can be done here.