Skip to content
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

systemd: add RemainAfterExit and ExecStop #39

Closed
wants to merge 1 commit into from

Conversation

jpkotta
Copy link

@jpkotta jpkotta commented Jan 13, 2014

With this .service file, the battery charge limits can be reset to the default if the service is stopped.

@teleshoes
Copy link
Owner

cool, thanks. however, SP default is 0, not 100.
{i suspect that the default value it uses internally when you do "-s SP 0" is actually around 95%, and that "-s SP 100" might forcibly override this and cause it to charge more than it would. dunno tho, maybe 100 actually does have the same effect as 0, but 0 is still what the default actually is}

@linrunner
Copy link

Imho Lenovo factory defaults are always ST 96 / SP 100. TLP in fact uses this assumption when converting the values for displaying or writing.

@teleshoes
Copy link
Owner

eh, im not being very clear. the lenovo acpi interface has a value that means 'use default stop threshold'.
that default-value happens to be "0", and not "100".

so, if you are correct, linrunner, then "tpacpi-bat -s SP 100" should have the same effect as "tpacpi-bat -s SP 0", unless there is a BIOS version that does not default to 100. {though i suspect this is not the case, and that SP=100 is the same as SP=0 for all thinkpads and BIOSes}

so, in conclusion "100" is the WRONG value to set SP to for 'default', and "0" is the CORRECT value to set SP to for 'default'. HOWEVER, it is quite likely {and irrelevant} that both will behave the same.

@teleshoes
Copy link
Owner

also, linrunner, i suggest you use ST=0 and SP=0 when actually setting the default-values in TLP, instead of 96 and 100. {the BIOS may use isDefault() to perform different behaviours under certain circumstances.}

for displaying, it makes sense to show ST=96% and SP=100%, though you should probably differentiate between explicit and implicit default {e.g.: 96 => "START: 96%" vs 0 => "START: 96% {default}"}

@linrunner
Copy link

My posting was misleading. I fully understand your suggestions and TLP implements them since the beginning with tpacpi-bat – with the exception that TLP doesn't accept 0 as input for default. I'll think about that too.

@teleshoes teleshoes closed this Jan 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants