Closed Mintulix closed 1 year ago
Hi,
indeed a very special use case. Btw it's not BIOS defaults but kernel driver defaults.
RUNTIME_PM_ON_AC=""
, RUNTIME_PM_ON_BAT=""
is explicitly meant (and documented) to disable the whole feature. I will have to think about whether it is safe to include RUNTIME_PM_ENABLE
, RUNTIME_PM_DISABLE
in the check as well.
In the meantime, you can trick the logic with an invalid value:
RUNTIME_PM_ON_AC="nil"
RUNTIME_PM_ON_BAT="nil"
RUNTIME_PM_ENABLE="01:00.0"
Hi, thanks for your workaround. It works as expected, so you can leave the code unchanged. Perhaps this workaround should be documented? My idea to leave as many settings unchanged from kernel driver as possible was, on AC the fans were driving me crazy and on BAT I had problems with some components after some time (still testing...). Again, thank you for this program and your answer, for me this is fixed.
@Mintulix What lasts long becomes implemented after all :-). If you still follow this: please test with the main branch.
Important: you need to change your config to
RUNTIME_PM_ON_AC=""
RUNTIME_PM_ON_BAT="l"
RUNTIME_PM_ENABLE="01:00.0"
because "nil" is now considered invalid and the whole feature skipped.
Hey, within one year, what more could one want? ;-) I didn't test much more since then, because your workaround worked so great. TLP was doing its job in background, so all good. Tested your changes and it works like before (with the nil-solution), thanks a lot for solving this special use case.
Great. Thanks for testing.
@linrunner : add use case to the doc https://linrunner.de/tlp/settings/runtimepm.html
Hi @ALL : TLP 1.6 Beta 1 is out and contains the change -> https://github.com/linrunner/TLP/issues/700
TLP 1.5.0
What I want: Using the Bios defaults for all PCI devices in AC and BAT mode with one exception (Nvidia dGPU should always be in PM-mode, because the Intel iGPU alone is used).
How to accomplish that:
Method 1a (works):
Method 1b (works):
Method 2 (preferred, much more elegant, but it doesn't work because RUNTIME_PM_ENABLE is ignored):
The "faulty" code part is in /usr/share/tlp/func.d/05-tlp-func-pm:
I'm sure it's there for a reason, but for me disabling the "return 0" does the trick. What do you think? Should method 2 be allowed, or rather why must there be a return if RUNTIME_PMON* is unconfigured?