Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ASPM in custom kernel
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
nacitar
n00b
n00b


Joined: 10 Jun 2011
Posts: 11

PostPosted: Fri Jun 10, 2011 8:33 pm    Post subject: ASPM in custom kernel Reply with quote

I've recently swapped from genkernel to a kernel I built myself, for my Dell Latitude E6520 (new) laptop. Prior to making the swap, I logged my "sudo lspci -vvv" output to a file so I could compare it to my new one. However, one small thing is troubling me..

cat genkernel_lspci.log | grep ASPM
Quote:

LnkCap: Port #2, Speed 5GT/s, Width x16, ASPM L0s L1, Latency L0 <256ns, L1 <4us
LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
LnkCap: Port #0, Speed unknown, Width x0, ASPM unknown, Latency L0 <64ns, L1 <1us
LnkCtl: ASPM Disabled; Disabled- Retrain- CommClk-
LnkCap: Port #1, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <1us, L1 <16us
LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk-
LnkCap: Port #2, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <16us
LnkCtl: ASPM L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
LnkCap: Port #3, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <1us, L1 <16us
LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk-
LnkCap: Port #4, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <1us, L1 <16us
LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk-
LnkCap: Port #6, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <1us, L1 <16us
LnkCtl: ASPM L0s Enabled; RCB 64 bytes Disabled- Retrain- CommClk-
LnkCap: Port #0, Speed 5GT/s, Width x16, ASPM L0s L1, Latency L0 <512ns, L1 <4us
LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
LnkCap: Port #0, Speed 5GT/s, Width x16, ASPM L0s L1, Latency L0 <512ns, L1 <4us
LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk-
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <128ns, L1 <32us
LnkCtl: ASPM L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk+
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <64ns, L1 unlimited
LnkCtl: ASPM L0s Enabled; RCB 64 bytes Disabled- Retrain- CommClk-
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <64ns, L1 unlimited
LnkCtl: ASPM L0s Enabled; RCB 64 bytes Disabled- Retrain- CommClk-
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <64ns, L1 unlimited
LnkCtl: ASPM L0s Enabled; RCB 64 bytes Disabled- Retrain- CommClk-


However, for the new one... sudo lspci -vvv | grep ASPM
Quote:

LnkCap: Port #2, Speed 5GT/s, Width x16, ASPM L0s L1, Latency L0 <256ns, L1 <4us
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
LnkCap: Port #0, Speed unknown, Width x0, ASPM unknown, Latency L0 <64ns, L1 <1us
LnkCtl: ASPM Disabled; Disabled- Retrain- CommClk-
LnkCap: Port #1, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <1us, L1 <16us
LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk-
LnkCap: Port #2, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <16us
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
LnkCap: Port #3, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <1us, L1 <16us
LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk-
LnkCap: Port #4, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <1us, L1 <16us
LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes Disabled- Retrain- CommClk-
LnkCap: Port #6, Speed 5GT/s, Width x1, ASPM L0s L1, Latency L0 <1us, L1 <16us
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-
LnkCap: Port #0, Speed 5GT/s, Width x16, ASPM L0s L1, Latency L0 <512ns, L1 <4us
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
LnkCap: Port #0, Speed 5GT/s, Width x16, ASPM L0s L1, Latency L0 <512ns, L1 <4us
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <128ns, L1 <32us
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <64ns, L1 unlimited
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <64ns, L1 unlimited
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-
LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <64ns, L1 unlimited
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-


As you can see, in genkernel everything lists CAPABILITY of ASPM, and all but _one_ thing actually uses ASPM.
However, in my kernel, all except for _three_ things DO NOT use ASPM (says disabled).

Any ideas why genkernel == 12 devices ASPM working, 1 device ASPM disabled
And yet, custom kernel == 3 devices ASPM working, 10 devices ASPM disabled


in my kernel, I have already enabled PCIEASPM (PCI Express ASPM control), WMI and DELL_WMI (Dell WMI Extras)... and, as SOME things are using ASPM, I'm guessing it must be supported properly... but why would it flip flop and not be using it as much now?
Back to top
View user's profile Send private message
lcidw
Tux's lil' helper
Tux's lil' helper


Joined: 18 Oct 2004
Posts: 77

PostPosted: Mon Jun 13, 2011 2:23 am    Post subject: Reply with quote

Not that i have tried genkernel, but i'm running into this problem as well, especially with hardened-sources .38 installed now (it was .37 on a previous install where it stopped complaining about ASPM). My lspci is even worse:
Code:
# lspci -vvv | grep -i aspm
      LnkCap:   Port #0, Speed unknown, Width x0, ASPM unknown, Latency L0 <64ns, L1 <1us
      LnkCtl:   ASPM Disabled; Disabled- Retrain- CommClk-
      LnkCap:   Port #1, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <1us, L1 <4us
      LnkCtl:   ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk-
      LnkCap:   Port #5, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <256ns, L1 <4us
      LnkCtl:   ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
      LnkCap:   Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <128ns, L1 <32us
      LnkCtl:   ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+

The following message appears:
Code:
# dmesg | grep -i aspm
[    0.763728] ACPI FADT declares the system doesn't support PCIe ASPM, so disable it

Tried the pcie_aspm=force kernel parameter, and that enables 1 device. Google isn't helping much, except that the now apparently not marked experimental kernel code iirc, is still buggy as hell. Now, the above post by nacitar is giving me hope that i'm (or, we're) doing something, somehow, wrong (or not good/properly enough).

For a Thinkpad x201, with stuff like link power management (and ASPM iirc) enabled in BIOS, and..
Code:
# lspci -vvv | grep -o Power\ .* | sort -u
Power Management version 2
Power Management version 3

..i'd expect better, and i have serious doubts that it's the hardware. It's impossible to disable ASPM in the kernel, autoselected by i don't know what, if my kernel config is wanted just let me know.

I've been testing the manual steps documented at http://wireless.kernel.org/en/users/Documentation/ASPM#Linux_kernel_ASPM_support, for both PCIE controllers as well as my wireless card, as these are the only devices currently reporting "LnkCap ASPM L0s L1", but i doubt this is the correct way of handling it.

Hoping for a solution, thanks in advance!
Back to top
View user's profile Send private message
lcidw
Tux's lil' helper
Tux's lil' helper


Joined: 18 Oct 2004
Posts: 77

PostPosted: Mon Jun 13, 2011 3:47 am    Post subject: Reply with quote

Some more testing resulted in the following, quite interesting results, in this order..
  1. Booting with pcie_aspm=force (as stated before), the PCIE bridge and wireless card connected to that bridge, had status "LnkCtl: ASPM L1 Enabled".
  2. echo powersave > /sys/module/pcie_aspm/parameters/policy, and suddenly those two had status "LnkCtl: ASPM L0s L1 Enabled".
  3. modprobe iwlagn, and everything went to status "LnkCtl: ASPM Disabled".
  4. Changing to default/performance/powersave in /sys/module/pcie_aspm/parameters/policy, has no further effect.
  5. rmmod iwlagn, results in a PCI panic, though i remember having that before even touching PCIE ASPM stuff (pcie_aspm or setpci wise), so that might be unrelated. Keeping iwlagn loaded, seems stable.
  6. setpci the ASPM L0s and L1 on the Link Control Register of those two, seems stable. Changing to default/performance/powersave in /sys/module/pcie_aspm/parameters/policy, has no further effect.

On top of that, even with wireless on, and these ASPM set manually, powertop reports a power usage of just 6W, where the lowest before (even with the .37 kernel) was 7W with wireless off, 8W with wireless on. So, really want this to work properly 8O.


Last edited by lcidw on Mon Jun 13, 2011 2:11 pm; edited 1 time in total
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Mon Jun 13, 2011 8:53 am    Post subject: Reply with quote

0.6W seems impossibly low, my netbook doesn't dip below 7.0 even completely idle.
Back to top
View user's profile Send private message
nacitar
n00b
n00b


Joined: 10 Jun 2011
Posts: 11

PostPosted: Tue Jun 14, 2011 5:06 pm    Post subject: Reply with quote

dmesg | grep -i aspm
[ 0.776861] ACPI FADT declares the system doesn't support PCIe ASPM, so disable it


I'm getting that too...
Back to top
View user's profile Send private message
nacitar
n00b
n00b


Joined: 10 Jun 2011
Posts: 11

PostPosted: Tue Jun 14, 2011 9:22 pm    Post subject: Reply with quote

Even booting the gentoo installation livecd.. lspci -vvv | grep -i aspm shows almost everything enabled ASPM-wise; anything genkernel does this. However, anything non-genkernel does not.

What setting could it be?


I think it has to do with the dmesg line:
[ 0.777926] ACPI FADT declares the system doesn't support PCIe ASPM, so disable it

Because if I use pcie_aspm=force on my command line, i can get the lspci -vvv output the same as I was getting with genkernel; but not without it.
Back to top
View user's profile Send private message
lcidw
Tux's lil' helper
Tux's lil' helper


Joined: 18 Oct 2004
Posts: 77

PostPosted: Thu Jun 16, 2011 7:07 am    Post subject: Reply with quote

nacitar wrote:
Even booting the gentoo installation livecd.. lspci -vvv | grep -i aspm shows almost everything enabled ASPM-wise

Same, just that the livecd comes with the .37 kernel, and from what i understand, they broke it upstream in the .38. I'm gonna wait till .39 or 3.* stable and see what that brings.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum