YoCodingMonster / OpenFreezeCenter

For Those running Linux Distro on MSI laptops. This is the Graphic User Interface application meant for Fan control in Linux.
GNU Affero General Public License v3.0
363 stars 61 forks source link

Battery threshold support for GS65 Stealth 9SD #167

Closed ThibaultLemaire closed 1 year ago

ThibaultLemaire commented 1 year ago

Through the procedure explained in #166 I have determined that byte offset 0xef does not set the battery threshold on my hardware (GS65-Stealth-9SD).

I have tried scanning for bytes equal to 100 + 128 (my battery is currently charging up to 100%, and that's what I want to change), found one at offset 44, tried to change it to 50 + 128, but that didn't work. (The value seems to be retained, but the battery still charges past 50%)

I wondered how you determined that 128 offset, so I tried scanning for bytes equal to just 100 (and found two, at offsets 112 and 154), but that didn't work either.

After reinstalling my Windows partition, I am now locked out of the the MSi Dragon Center, so I can't even try to change it from there to see which value changed.

ThibaultLemaire commented 1 year ago

So, uhm, upon further reverse engineering: scratch all of that.

Byte 0xef of my EC mappings does drive the charge threshold of the battery. I don't know what made me think otherwise. Note to future self, do wait for let's say 5s before deciding it didn't work.

Anyway that means there's no reason OpenFreezeCenter wouldn't work on the GS65-Stealth-9SD (at least for adjusting battery threshold), so I'll just close this issue now. Maybe I'll look into making it work on NixOS, we'll see.

As a side-note, I became aware of the TLP project while digging into this, I might make a contribution there for the battery threshold