Reduce power consumption with powertop


Recommended Posts

Hi hoping for some pointer please to improve my power efficiency, which is currently sitting at around 38w. With all drives and lan disconnected I can reduce to around 28w, can I do anything to reduce this further ?

 

I am wondering whether the power supply is old, or whether the Motherboard is a limiting factor?

 

Running out of ideas...

 

My set up is

M/B: Gigabyte Technology Co., Ltd. Z590 GAMING X

BIOS: AMI Version F7 Dated 04/14/2022 8ARKL017

CPU: Intel® Core™ i3-10105 CPU @ 3.70GHz

Memory: 16 GiB DDR4

Network: Realtek RTL8125 (rev 5) bond0: fault-tolerance (active-backup), mtu 1500

Sata Controller Intel 43d2

PSU Coolermaster RS-460-PCAP-A3

Boot - USB thumb drive

HDD 2 x WD RED WD40ERFX-68N

 

I have installed powertop and run autotune, and Tunables are all Good

Under Idle stats Core (HW) are all around 93%

However Pkg(HW) C3 (pc3) is at 80% and nothing at higher states

 

Also ASPM are all Enabled:-

 

root@Tower:~# lspci -vv | awk '/ASPM/{print $0}' RS= | grep --color -P '(^[a-z0-9:.]+|ASPM )'
00:1b.0 PCI bridge: Intel Corporation Tiger Lake-H PCIe Root Port #17 (rev 11) (prog-if 00 [Normal decode])
                LnkCap: Port #17, Speed 8GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <1us, L1 <4us
                LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes, Disabled- CommClk-
00:1b.4 PCI bridge: Intel Corporation Device 43c4 (rev 11) (prog-if 00 [Normal decode])
                LnkCap: Port #21, Speed 8GT/s, Width x4, ASPM L0s L1, Exit Latency L0s <1us, L1 <4us
                LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes, Disabled- CommClk-
00:1c.0 PCI bridge: Intel Corporation Tiger Lake-H PCIe Root Port #1 (rev 11) (prog-if 00 [Normal decode])
                LnkCap: Port #1, Speed 8GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <1us, L1 <4us
                LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes, Disabled- CommClk-
00:1c.4 PCI bridge: Intel Corporation Tiger Lake-H PCI Express Root Port #5 (rev 11) (prog-if 00 [Normal decode])
                LnkCap: Port #5, Speed 8GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <1us, L1 <16us
                LnkCtl: ASPM L1 Enabled; RCB 64 bytes, Disabled- CommClk+
00:1d.0 PCI bridge: Intel Corporation Tiger Lake-H PCI Express Root Port #9 (rev 11) (prog-if 00 [Normal decode])
                LnkCap: Port #9, Speed 8GT/s, Width x4, ASPM L0s L1, Exit Latency L0s <1us, L1 <4us
                LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes, Disabled- CommClk-
00:1d.4 PCI bridge: Intel Corporation Device 43b4 (rev 11) (prog-if 00 [Normal decode])
                LnkCap: Port #13, Speed 8GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <1us, L1 <4us
                LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes, Disabled- CommClk-
pcilib: sysfs_read_vpd: read failed: No such device
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
                LnkCap: Port #0, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s unlimited, L1 <64us
                LnkCtl: ASPM L1 Enabled; RCB 64 bytes, Disabled- CommClk+

 

Your help would be most welcome, thanks

Edited by Jason Berry
typos
Link to comment
On 3/8/2024 at 10:06 AM, pkoci said:

Hi guys,

 

could you please recommend any nvme ssd that supports low power C states? Does not have to be Samsung.

 

Thanks

I can recommend only Samsung 980 Pro, sorry 🙂 (C10 package)

Edited by bagican
Link to comment
On 3/8/2024 at 10:06 AM, pkoci said:

Hi guys,

 

could you please recommend any nvme ssd that supports low power C states? Does not have to be Samsung.

 

Thanks

WD Red SN700 - have two of them as an cache Raid

Edited by FlowDE
Link to comment
On 3/7/2024 at 5:12 PM, Sptz87 said:

So, as you can see below. This is my current ASPM levels for a Gigabyte B550i. I'm a bit afraid of running powertop blindly. Does anyone have any idea, judging from the below list if there should be any obvious problems? I don't get why the Sabrent NVME has ASPM disabled when it definitely even supports L1.2. 

 

What kind of gains, if any could I expect from even running it? Currently idling at 58-60W with HDDs spun down.

 

00:01.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse GPP Bridge (prog-if 00 [Normal decode])
                LnkCap: Port #1, Speed 16GT/s, Width x4, ASPM L1, Exit Latency L1 <64us
                LnkCtl: ASPM L1 Enabled; RCB 64 bytes, Disabled- CommClk+
00:01.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse GPP Bridge (prog-if 00 [Normal decode])
                LnkCap: Port #0, Speed 16GT/s, Width x8, ASPM not supported
                LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
00:03.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse GPP Bridge (prog-if 00 [Normal decode])
                LnkCap: Port #0, Speed 16GT/s, Width x16, ASPM L1, Exit Latency L1 <64us
                LnkCtl: ASPM L1 Enabled; RCB 64 bytes, Disabled- CommClk+
00:07.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B] (prog-if 00 [Normal decode])
                LnkCap: Port #0, Speed 16GT/s, Width x16, ASPM L0s L1, Exit Latency L0s <64ns, L1 <1us
                LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B] (prog-if 00 [Normal decode])
                LnkCap: Port #0, Speed 16GT/s, Width x16, ASPM L0s L1, Exit Latency L0s <64ns, L1 <1us
                LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
01:00.0 Non-Volatile memory controller: Micron/Crucial Technology P2 [Nick P2] / P3 / P3 Plus NVMe PCIe SSD (DRAM-less) (rev 01) (prog-if 02 [NVM Express])
                LnkCap: Port #1, Speed 16GT/s, Width x4, ASPM L1, Exit Latency L1 unlimited
                LnkCtl: ASPM L1 Enabled; RCB 64 bytes, Disabled- CommClk+
02:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] 500 Series Chipset USB 3.1 XHCI Controller (prog-if 30 [XHCI])
                LnkCap: Port #0, Speed 8GT/s, Width x4, ASPM L0s L1, Exit Latency L0s <2us, L1 <32us
                LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
02:00.1 SATA controller: Advanced Micro Devices, Inc. [AMD] 500 Series Chipset SATA Controller (prog-if 01 [AHCI 1.0])
                LnkCap: Port #0, Speed 8GT/s, Width x4, ASPM L0s L1, Exit Latency L0s <2us, L1 <32us
                LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
02:00.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] 500 Series Chipset Switch Upstream Port (prog-if 00 [Normal decode])
                LnkCap: Port #0, Speed 8GT/s, Width x4, ASPM L0s L1, Exit Latency L0s <2us, L1 <32us
                LnkCtl: ASPM Disabled; Disabled- CommClk+
03:04.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 43ea (prog-if 00 [Normal decode])
                LnkCap: Port #4, Speed 8GT/s, Width x4, ASPM L1, Exit Latency L1 <64us
                LnkCtl: ASPM Disabled; Disabled- CommClk+
03:08.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 43ea (prog-if 00 [Normal decode])
                LnkCap: Port #8, Speed 8GT/s, Width x1, ASPM L1, Exit Latency L1 <64us
                LnkCtl: ASPM Disabled; Disabled- CommClk+
03:09.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 43ea (prog-if 00 [Normal decode])
                LnkCap: Port #9, Speed 8GT/s, Width x1, ASPM L1, Exit Latency L1 <64us
                LnkCtl: ASPM Disabled; Disabled- CommClk+
pcilib: sysfs_read_vpd: read failed: No such device
04:00.0 Non-Volatile memory controller: Phison Electronics Corporation E12 NVMe Controller (rev 01) (prog-if 02 [NVM Express])
                LnkCap: Port #0, Speed 8GT/s, Width x4, ASPM L1, Exit Latency L1 <64us
                LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
                LnkCap: Port #0, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s unlimited, L1 <64us
                LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
06:00.0 Network controller: Intel Corporation Wi-Fi 6 AX200 (rev 1a)
                LnkCap: Port #9, Speed 5GT/s, Width x1, ASPM L1, Exit Latency L1 <8us
                LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
07:00.0 VGA compatible controller: NVIDIA Corporation TU116 [GeForce GTX 1660 Ti] (rev a1) (prog-if 00 [VGA controller])
                LnkCap: Port #0, Speed 8GT/s, Width x16, ASPM L0s L1, Exit Latency L0s <512ns, L1 <16us
                LnkCtl: ASPM L1 Enabled; RCB 64 bytes, Disabled- CommClk+
07:00.1 Audio device: NVIDIA Corporation TU116 High Definition Audio Controller (rev a1)
                LnkCap: Port #0, Speed 8GT/s, Width x16, ASPM L0s L1, Exit Latency L0s <512ns, L1 <4us
                LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes, Disabled- CommClk+
07:00.2 USB controller: NVIDIA Corporation TU116 USB 3.1 Host Controller (rev a1) (prog-if 30 [XHCI])
                LnkCap: Port #0, Speed 8GT/s, Width x16, ASPM L0s L1, Exit Latency L0s <512ns, L1 <16us
                LnkCtl: ASPM L1 Enabled; RCB 64 bytes, Disabled- CommClk+
07:00.3 Serial bus controller: NVIDIA Corporation TU116 USB Type-C UCSI Controller (rev a1)
                LnkCap: Port #0, Speed 8GT/s, Width x16, ASPM L0s L1, Exit Latency L0s <512ns, L1 <16us
                LnkCtl: ASPM L1 Enabled; RCB 64 bytes, Disabled- CommClk+
08:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Function
                LnkCap: Port #0, Speed 16GT/s, Width x16, ASPM L0s L1, Exit Latency L0s <64ns, L1 <1us
                LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
09:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Reserved SPP
                LnkCap: Port #0, Speed 16GT/s, Width x16, ASPM L0s L1, Exit Latency L0s <64ns, L1 <1us
                LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
09:00.1 Encryption controller: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Cryptographic Coprocessor PSPCPP
                LnkCap: Port #0, Speed 16GT/s, Width x16, ASPM L0s L1, Exit Latency L0s <64ns, L1 <1us
                LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+
09:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Matisse USB 3.0 Host Controller (prog-if 30 [XHCI])
                LnkCap: Port #0, Speed 16GT/s, Width x16, ASPM L0s L1, Exit Latency L0s <64ns, L1 <1us
                LnkCtl: ASPM Disabled; RCB 64 bytes, Disabled- CommClk+

 

Anyone? :,/

Link to comment
8 hours ago, Sptz87 said:

 

Anyone? :,/

 

I have the same motherboard (rev 1.3) updated to the latest FD bios of 2024, I have read a lot on forums and I have tried them all including scewin by modifying the hidden parameters of the bios for aspm but there was no success. I also downloaded the latest version of Ubuntu and aspm doesn't work, but with Windows 11 the energy saving comes with C6 and aspm works. I think it's a linux kernel problem 🙃

Edited by ENiGMiST4
  • Thanks 1
Link to comment
2 hours ago, ENiGMiST4 said:

 

I have the same motherboard (rev 1.3) updated to the latest FD bios of 2024, I have read a lot on forums and I have tried them all including scewin by modifying the hidden parameters of the bios for aspm but there was no success. I also downloaded the latest version of Ubuntu and aspm doesn't work, but with Windows 11 the energy saving comes with C6 and aspm works. I think it's a linux kernel problem 🙃

 

Damnit :/ Yeah I knew it was consuming way less in Win11, it is what it is I guess

Link to comment
14 hours ago, Sptz87 said:

 

Damnit :/ Yeah I knew it was consuming way less in Win11, it is what it is I guess

 

the only solution for now is to wait for kernel 6.3 with AMD P-State EPP Scaling Driver and see if aspm will work :/

Link to comment

I'm curious about the reasoning for disabling turbo boost on the cpu?

 

I understand that this will reduce the peak power draw, as the lower frequencies will draw less power. Fine. But it will also mean the cpu will need to run for longer periods of time to do the same tasks, so you're drawing less power but for longer. It would seem that you're not actually saving much power, and have the tradeoff of a much slower system. 

 

Just was curious, maybe having turbo turned on prevents sleep states or something? If it's just a matter of the voltage curve, then the best results would come from undervolting and then limiting the max boost a little bit, so you end up on the most efficient part of the voltage/boost curve (I would think).

Link to comment

Hi,

 

I purchased an ASM1166 sata expansion card, updated the firmware and plugged it into the second m.2 slot (I have a Samsung NVMe SSD in the first m.2 slot). Unfortunately, when ASPM is enabled the pcie port bios settings (used by ASM1166 controller), the UNRAID system does not see any HDDs connected, but C8 states are reached. See the logs below. When I disable ASPM in the BIOS settings for the pcie port that the asm1166 controller is plugged into, UNRAID sees the connected HDDs, but only C3 states are reached.

I thought that ASM1166 controller with correct firmware supports ASPM and therefore higher Cstates. 
 

Mar 13 22:48:22 UNRAID kernel: ata3: failed to resume link (SControl FFFFFFFF)
Mar 13 22:48:22 UNRAID kernel: ata3: SATA link down (SStatus FFFFFFFF SControl FFFFFFFF)
Mar 13 22:48:22 UNRAID kernel: ahci 0000:02:00.0: AHCI controller unavailable!



Any ideas?

Link to comment
On 3/13/2024 at 8:27 PM, pkoci said:

Hi,

any idea if an intel i226-v prevents higher C-states? Yes, it does.

 

 

Yeah pretty annoying.... i am also affected that my System can't reach any higher C-States just because of the Network-Chip from Intel

Link to comment

I have now trimmed my system with the following HW:

  • i3-12100T
  • Array: 3x Seagate (1x Irowolf 14TB & 2x X20 20TB)
  • Cache: 1x Samsung nVME SSD 980
  • Flash USB Drive

From All drives spin up (but not working): ~51 Watt to ~45 Watt
From All drives spun down: ~34 Watt to ~29 Watt
 

It reaches now ~80% pkg C2 and ~80% core C7 when unraid is idle

 

I am also using S3, so this saves me a little bit more during using unraid.
 

Thanks a lot for this topic!

Link to comment

I've been trying a bunch of things but I'm still unable to reach any package C-states:

image.thumb.png.4841158c6cba7a827f036696ceab5f3c.png

 

C-states are enabled in the BIOS, and I even tried manually increasing the package C-state limit to C10:

image.png.52be6c1452d67d57d67cf1424dbbe79b.png

 

I'm using an i5-13500 and an Asus Pro WS W680M-ACE SE motherboard. I'm already running  powertop --auto-tune on boot.

Edited by Daniel15
Link to comment
On 2/1/2024 at 4:27 PM, tmodev said:

EDIT: I am also using a PiKVM which is plugged in via HDMI.

 

Don't know if it has been already answered here or not, but I am using a piKVM myself (bliKVM) and with it attached I am stuck with c2 on around 25%. If I am disabling the HDMI it get's a bit deeper into c2 20% but only if I am shutting down (and unplug) the piKVM I can get around 88% in c10. 

 

I have not found out so far how I could disable additional features within the pi that it won't interfere that much with the c-states of the server. Workaround for me would be to only plug the pi once I am away from the server and there is chance that I have to power it up and down remotely.

Link to comment
On 3/17/2024 at 1:28 AM, Daniel15 said:

I've been trying a bunch of things but I'm still unable to reach any package C-states:

What are the other devices in your build? ASPM support etc.?

I am on the same board (long time no see) and without an M.2 in the CPU slot (top right) I can reach C6, when there is an M.2 installed in the top right slot (CPU), I can reach C3. I have documented some of my findings in the German forum (maybe Google translate can help): 

 

Link to comment

Try adding the nvidia idle code to your go config file (on the usb stick). See first post for more info.

 

# ------------------------------------------------
# Force Nvidia GPU idle
# ------------------------------------------------

# nvidia-smi --persistence-mode=1 nvidia-persistenced

# fuser -v /dev/nvidia*

 

Edited by dopeytree
Link to comment
10 hours ago, dopeytree said:

Try adding the nvidia idle code to your go config file (on the usb stick). See first post for more info.

 

I have. However, there's not change in power consumption. I did fix the iGPU to show up as `Good` now. Furthermore, I made sure to definetely enable all C-states in my UEFI.

 

Edit: Disabling turbo boost, I dropped the idle consumption to 105W with the peak being around 150W. Removing my GTX 1650 drops that to 90W. 45W seems to be the lowest I can get with all HDDs disconnected. The CPU finally drops down to C7 on all cores (though not on the package).

Edited by DesertCookie
Link to comment

Might anyone know how to disable a specific PM in powertop? Automatically I mean, I know I can go into tunables and turn the individual ones on/off. The powertop documentation only refers to turned off sets of several (such as 'all PCI' or 'all ata').

 

I need to disable the

Quote

echo 'on' > '/sys/bus/pci/devices/0000:0a:00.0/power/control';

 

one, as it is for the ethernet controller and -might- be the cause of my ethernet dying sporadically. 

Link to comment
59 minutes ago, Ellissss said:

image.png.242833d7e17530fecc4ab5da8e91cf1a.png
any idea where i should run powertop command ? i follow Op thread from this post, but can't run it

 

Get the NerdTools plugin and use it to install powertop.

Edited by Gex2501
  • Upvote 1
Link to comment

Hi,

After a few tests, I realized that if I connect my HDD model: WDC WD10EZEX-08M2NA0 can't get lower than C2.

Is it possible?

All powertop tunables are good.

imagen.png

 

Another question that comes to my mind is that is there any way to know if my motherboard SATA controller supports link power management.
 

 

Edited by ZercoCool
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.