On 07/04/2021 15:01, Ognjen Galić wrote: > > On 07/04/2021 19:48, Mark Pearson wrote: >> Hi Thomas, Hans and Nicolo >> >> On 07/04/2021 08:19, Thomas Koch wrote: >>> Hi Hans, >>> >>>> 1. These features are useful, but not super useful and as such I wonder >>>> how often they are used and this how well tested the firmware is wrt >>>> these. >>>> I have added Mark and Nitin from Lenovo to the Cc. Mark, Nitin, can you >>>> comment on if it is ok from a firmware pov to try and use the following >>>> battery related ACPI methods on all thinkpads? : >>>> #define GET_DISCHARGE "BDSG" >>>> #define SET_DISCHARGE "BDSS" >>>> #define GET_INHIBIT "PSSG" >>>> #define SET_INHIBIT "BICS" >>> These ACPI methods are present in (with very few exceptions) all >>> ThinkPads released since 2012. I am curious to hear what Mark and Nitin >>> have to say, never read anything official about it. >> I'm afraid I've not come across these myself before, but will go and ask >> the firmware team. >> <For my internal reference LO-1115> > > I received the documents a few years back directly from a Chinese > contact with all the methods > and parameters described. I can mail the document to you privately if > that's needed. > >> It would be good to confirm the implementation details if I can. I found >> recently that some of the temperature sensors that are read in by >> thinkpad_acpi from the EC RAM are not temp sensors (patch coming >> soon....hopefully later today). Hopefully I can check the internal spec >> and give a thumbs up on the implementation - even if we're not allowed >> to share the actual paperwork (maybe one day....) >> >>> Since 2012 there is also userspace tool tpacpi-bat [1] employing them >>> along with those for the start/stop threshold. >>> >>> My own tool TLP makes use of tpacpi-bat for force_discharge also since >>> 2012. From my experience in TLP support i can say there's a significant >>> user base and those who use thresholds also want to use force_discharge >>> for recalibration from time to time. >> This probably isn't the right place for the discussion, but I've been >> meaning to dig into battery management but never really get the time. I >> know in the windows world that ThinkVantage has extra hooks for setting >> thresholds and I wanted to see what we can do on the Linux side. If >> there is anything that would be particularly helpful that is missing >> please let me know. >> >> Thanks >> Mark >> >>> >>> The patches at hand work flawlessly on my small ThinkPad collection. >>> [1] https://github.com/teleshoes/tpacpi-bat >>> Just as a follow-up - I got some more details on the four ACPI methods from the firmware team and it all matches up with the code (and indeed the implementation in tpcacpi-bat). Mark