linrunner / TLP

TLP - Optimize Linux Laptop Battery Life
https://linrunner.de/tlp
GNU General Public License v2.0
2.68k stars 128 forks source link

Thinkpad P15s Gen2i CPU fans spin up when AC is plugged in, only when using TLP #643

Closed kpfleming closed 2 years ago

kpfleming commented 2 years ago

[x] I've read and accepted the Bug Reporting Howto [x] I've provided all required tlp-stat outputs via Gist (see below)

Describe the bug

Since kernel 5.16 was installed (and continuing with 5.17 and 5.18), if TLP is enabled on my laptop then when I plug in AC power the CPU fan spins up to about medium speed, even though the CPU temperature has not increased. It continues running at that speed until AC power is disconnected, although its speed will increase as expected if the CPU is loaded and its temperature increases.

Expected behavior

Plugging in AC power should not affect CPU fan behavior.

To Reproduce

Steps to reproduce the unexpected behavior:

  1. Does the problem occur on battery or AC or both? Only on AC.
  2. Install tlp 1.5.0-1 (from Debian Bookworm repository) with configuration in linked gist below, and ensure that TLP_ENABLE is not set to zero.
  3. Connect power to one of the laptop's USB-C ports (multiple USB-C power supplies have been tested, as has a Lenovo docking station).
  4. Full output of tlp-stat via https://gist.github.com/ for all matching cases of 1 (not as file attachment, no screenshots) https://gist.github.com/kpfleming/174426ec86f7dbc36a9b07ac2a7312e7

Additional context

Interestingly, if the laptop is booted with TLP_ENABLE=0, with AC power connected, and then TLP_ENABLE set to '1' and restarted with 'systemctl restart tlp', then the CPU fan does not spin up beyond its minimum speed.

linrunner commented 2 years ago

Hi,

i'd try RUNTIME_PM_ON_AC="auto".

Btw: please apply new settings with tlp start, not with a service restart.

kpfleming commented 2 years ago

Thanks for the quick response! RUNTIME_PM_ON_AC="auto" appears to have cured the problem.