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

Default TLP configuration prevents entering deeper sleep states on AC #344

Closed
superm1 opened this issue May 15, 2018 · 6 comments
Closed

Comments

@superm1
Copy link

superm1 commented May 15, 2018

Symptom data

  1. Does the problem occur on battery or AC or both?
    AC

Expected behavior

CPU can enter into C6 or lower on both battery and AC.

Actual behavior

CPU can't enter past C5 on AC.

Steps to reproduce the problem

  • Look at powertop/turbostat output on AC.
  • Remove power plug.
  • Look at powertop/turbostat output on battery.

As part of enabling better support for suspend-to-idle one of the issues that we identified was that when using TLP the default configuration will override the kernel's ASPM policies (which for most distributions they follow the "default" ASPM policy (IE keep BIOS ASPM defaults).

TLP however configures on AC to change this.

# PCI Express Active State Power Management (PCIe ASPM):
#   default, performance, powersave.
PCIE_ASPM_ON_AC=performance
PCIE_ASPM_ON_BAT=powersave

This leads to higher power consumption on AC, slower charging. On some CPU packages it can (perhaps counterintuitively?) lead to worse performance because the package will overheat sooner and need to throttle.

I'd like to propose that for your defaults you should set both of those to the word default and comment them out. If someone knows they want to change the performance or powersave specifically they can. This will allow the general purpose scenarios to work more correctly.

@linrunner linrunner self-assigned this May 15, 2018
@linrunner linrunner added this to the 1.2 Release milestone May 15, 2018
@linrunner
Copy link
Owner

OK, thanks for your hint.

linrunner added a commit that referenced this issue May 16, 2018
Rationale: PCIE_ASPM_ON_AC=performance prevents the CPU to enter
past C5 on AC leading to higher power consumption on AC and slower
charging.

Solution: keep the kernel "default" ASPM policy i.e. stay with
BIOS ASPM defaults. CPU can enter into C6 or lower on AC now.
Disable the setting by default, let the user decide.

Reference:
* #344

Credit:
* Mario Limonciello
@ghost
Copy link

ghost commented Oct 2, 2018

It seems to me that the default TLP config file should contain a note about this matter, i.e. to the effect that using the 'performance' setting will disable deep sleep.

@linrunner
Copy link
Owner

Not in the file but in the docs. Having every detail in the file makes it confusing.

Besides, isn't it obvious that "performance" may lead to sleep disorders? ;-)

@ghost
Copy link

ghost commented Oct 2, 2018

Besides, isn't it obvious that "performance" may lead to sleep disorders? ;-)

It was not obvious to me. But, still, if the 'sleep disorder' is no longer the default . . actually, no; I do think you'll have people turning on the performance mode and being suprised that what they regard as separate, basic functionality - sleep - doesn't work anymore. But, still, it's up to you, of course.

@koponomarenko
Copy link

I second that. I would/want expect sleep to be a separate functionality.

@linrunner
Copy link
Owner

Sorry guys for not meeting your expectations, but the kernel interface – e.g. /sys/module/pcie_aspm/parameters/policy – offers no possibility of influencing the sleep states directly. Btw the same is true for all other power saving sysfiles. You have to deal with it.

For good measure I added a note to the config docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants