linrunner / TLP

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

Nvidia Optimus with proprietary driver #716

Closed Tarballwalf closed 7 months ago

Tarballwalf commented 7 months ago

On my system, with an Nvidia card (RTX 3060), SOUND_POWER_SAVE_ON_AC=1 is required for the GPU to suspend even with the proprietary Nvidia driver.

Documentation here should to be updated to reflect this for the proprietary driver also.

To Reproduce

Steps to reproduce the unexpected behavior:

  1. Set SOUND_POWER_SAVE_ON_AC=0
  2. Notice how the GPU will not turn off after unplugging the charger
  3. Set SOUND_POWER_SAVE_ON_AC=1
  4. GPU will now turn off

TLP output

Additional context Yes, I know sound power save is on in the default configuration, but my stupid ass decided to turn it off. I go by the principal of: if on ac, give it all you can. if on batt, save as much. reading the documentation and seeing that was related to nouveau, I dediced to ignore the setting because it's for nouveau, why would I need it for the Nvidia proprietary driver? for a while I thought it was an Nvidia issue, afterwards I found a fix by forcing RUNTIME PM on ac too. but that was wacky and the GPU would not turn off automatically, booting with the charger plugged.

linrunner commented 7 months ago

Hi, interesting. Could you please show tlp-stat output on AC too?

Tarballwalf commented 7 months ago

Sure.

TLP AC output

linrunner commented 7 months ago

Documentation change done. Btw, you can also submit issues or pull requests directly for the documentation: https://github.com/linrunner/tlp-doc

Interesting that the power down of the GPU also works with control = on. What happens when you configure RUNTIME_PM_ON_AC="auto" in addition to SOUND_POWER_SAVE_ON_AC=1?

Tarballwalf commented 7 months ago

with RUNTIME_PM_ON_AC="auto", GPU will stay powered off even on AC.

Another way this can be done is manually with the pcie ids, using RUNTIME_PM_ENABLE="01:00.0 01:00.1". In this case I have noticed that both the GPU id and the sound controller id needs to be specified. This use case is applicable if the user does not want to append RUNTIME_PM_ON_AC="auto" but wants to turn off the GPU on AC.

Here are the tlp outputs for both situations TLP with RUNTIME_PM_ON_AC=auto TLP with RUNTIME_PM_ENABLE

Both options now will turn of the gpu even when booting with the charger plugged in.

linrunner commented 7 months ago

Thanks. I added your further remarks to the docs.

Tarballwalf commented 7 months ago

Just a heads up, it's sure not shure :D Also I guess we can close this issue for now.

image

linrunner commented 7 months ago

Done.