lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180422171647.7v65zrlwhya5mq7v@pali>
Date:   Sun, 22 Apr 2018 19:16:47 +0200
From:   Pali Rohár <pali.rohar@...il.com>
To:     Bjorn Helgaas <bhelgaas@...gle.com>,
        "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Vidya Sagar <vidyas@...dia.com>,
        Rajat Jain <rajatja@...gle.com>
Cc:     linux-pci@...r.kernel.org, linux-acpi@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Bug? pcie_aspm=off cause less power consumption as default

Hi!

To increase runtime on battery of my Dell Latitude E6440 laptop I tried
different tweaks and settings. And I come up to the conclusion that
adding pcie_aspm=off to the kernel command line decrease power
consumption by approx. 2 Watts as opposite to adding pcie_aspm=force or
nothing (letting ASPM in default state).

I suspect that this is a clear kernel bug as I cannot understand how
turning off powersave feature ASPM could lead to decrease of power
consumption. Turning powersave off should either not impact or increase
power consumption.

Moreover one I put laptop into ACPI S3 sleep and resume it, then power
consumption increase. The only way to decrease it is to power it off and
power on again. Very impractical, specially as ACPI sleep is there to
prevent power off and on.

Tests:

Laptop on battery with pcie_aspm=off has average 8.50 Watts in idle.
After suspend+resume it has 11.20 Watts (power off + on is needed to get
back for 8.50 Watts).

Laptop on battery with pcie_aspm=force and with powersave aspm policy
it has average 11.20 Watts in idle. After suspend+resume it is 11.30
Watts in idle. With default policy it has 11.15 Watts and with
performance policy it has 11.70 Watts.

When pcie_aspm is not specified at all, then average power consumption
in idle is 8.90 Watts. And after suspend+resume it is 9.30 Watts.

So what is happening there? Such results are really strange and
apparently I'm not alone, see discussion in kernel bugzilla:
https://bugzilla.kernel.org/show_bug.cgi?id=62181#c23

I'm using Debian Stretch with its default kernel. But I remember that
power consumption with defaults or with pcie_aspm=force was around 10-11
Watts even with older kernel versions.

Debian Stretch has currently this kernel:
4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) x86_64 GNU/Linux

with this configuration:

$ grep ASPM /boot/config-4.9.0-6-amd64
CONFIG_PCIEASPM=y
# CONFIG_PCIEASPM_DEBUG is not set
CONFIG_PCIEASPM_DEFAULT=y
# CONFIG_PCIEASPM_POWERSAVE is not set
# CONFIG_PCIEASPM_PERFORMANCE is not set

In dmesg are these ASPM strings:

$ dmesg | grep ASPM

pcie_aspm=off
[    0.000000] PCIe ASPM is disabled
[    0.119127] ACPI FADT declares the system doesn't support PCIe ASPM, so disable it
[    0.163351] acpi PNP0A08:00: _OSC: not requesting OS control; OS requires [ExtendedConfig ASPM ClockPM MSI]

pcie_aspm=force
[    0.000000] PCIe ASPM is forcibly enabled
[    0.118985] ACPI FADT declares the system doesn't support PCIe ASPM, so disable it
[    0.162322] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI]
[    0.162621] acpi PNP0A08:00: FADT indicates ASPM is unsupported, using BIOS configuration

(none)
[    0.120064] ACPI FADT declares the system doesn't support PCIe ASPM, so disable it
[    0.163424] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI]
[    0.163724] acpi PNP0A08:00: FADT indicates ASPM is unsupported, using BIOS configuration
[    3.294357] iwlwifi 0000:03:00.0: can't disable ASPM; OS doesn't have ASPM control

In attachments I'm sending output from lspci -vv -nn, maybe it could
contain some useful information.

Another strange thing which I spotted in lspci output is that Root Host
bridge at 00:00.0 pci address totally disappeared after suspend+resume.
I hope such thing is not normal.

So I see there at 3 bugs:

1) Power consumption increase after suspend+resume when pcie_aspm=off or
default

2) Power consumption is higher in pcie_aspm=force or default mode as in
pcie_aspm=off

3) PCI host bridge disappear after suspend+resume.

Do you have any idea what is happening here?

-- 
Pali Rohár
pali.rohar@...il.com

View attachment "lspci_pcie_aspm_off.txt" of type "text/plain" (35275 bytes)

View attachment "lspci_pcie_aspm_off_after_resume.txt" of type "text/plain" (34759 bytes)

View attachment "lspci_pcie_aspm_force_default.txt" of type "text/plain" (35271 bytes)

View attachment "lspci_pcie_aspm_force_performance.txt" of type "text/plain" (35261 bytes)

View attachment "lspci_pcie_aspm_force_powersave.txt" of type "text/plain" (35279 bytes)

View attachment "lspci_pcie_aspm_force_powersave_after_resume.txt" of type "text/plain" (34763 bytes)

View attachment "lspci_pcie_aspm_default.txt" of type "text/plain" (35275 bytes)

View attachment "lspci_pcie_aspm_default_after_resume.txt" of type "text/plain" (34762 bytes)

Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ