linrunner / TLP

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

Setting the CPI scaling governor does not work (in BAT and AC mode) #632

Closed LukasPietzschmann closed 2 years ago

LukasPietzschmann commented 2 years ago

I want to set the cpu scaling governor depending on whether my laptop is plugged in, or not. Therefor I use the following two settings in my /etc/tlp.conf file (full config file: https://gist.github.com/LukasPietzschmann/e68ef374c1906a9bb2a15355a59b6fdd):

CPU_SCALING_GOVERNOR_ON_AC=ondemand
CPU_SCALING_GOVERNOR_ON_BAT=powersave

I already rebooted several times, but the scaling governor doesn't get set at all, as it stays at schedutil (which was already set, before I installed tlp). I'm not sure if I configured something wrong, or if this just does not work with my system. sudo tlp-stat shows the following: https://gist.github.com/LukasPietzschmann/40140ca1320ea932e02cbecb3802ed31

linrunner commented 2 years ago

Hi, the tlp-stat output shows that your two settings for the governor are not recognised by TLP. The most common reason for this is that the leading # in tlp.conf was not removed. Is this your actual and complete tlp.conf or a manually created extract?

LukasPietzschmann commented 2 years ago

Thanks for your fast reply! I had no leading #, but some comments after CPU_SCALING_GOVERNOR_ON_AC=ondemand. The line looked like this:

CPU_SCALING_GOVERNOR_ON_AC=ondemand #some comment.....

I removed the commend and now it works 🎊 Thanks a lot!