You are not logged in.

#1 2018-03-02 05:02:52

enihcam
Member
From: Internet
Registered: 2009-12-20
Posts: 220

How to set configurable TDP provided by Intel/AMD?

Modern Intel/AMD CPUs support configurable TDP. Can I set this somewhere in kernel, boot cmdline or module config?

Thanks!

Offline

#2 2018-03-02 10:27:26

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: How to set configurable TDP provided by Intel/AMD?

For AMD I can't say but for Intel the configuration should be performed by adjusting the values of the variables inside '/sys/devices/virtual/powercap/intel-rapl/' and as a staring point you can start here[1].

I have tried before to play with it to keep my laptop silent but I didn't manage to figure it out or make it work, I suppose you need to have more than just a superficial understanding of the system to be able to make proper use of it.

[1] https://01.org/blogs/2014/running-avera … 80%93-rapl


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#3 2018-03-02 11:46:51

enihcam
Member
From: Internet
Registered: 2009-12-20
Posts: 220

Re: How to set configurable TDP provided by Intel/AMD?

R00KIE wrote:

For AMD I can't say but for Intel the configuration should be performed by adjusting the values of the variables inside '/sys/devices/virtual/powercap/intel-rapl/' and as a staring point you can start here[1].

I have tried before to play with it to keep my laptop silent but I didn't manage to figure it out or make it work, I suppose you need to have more than just a superficial understanding of the system to be able to make proper use of it.

[1] https://01.org/blogs/2014/running-avera … 80%93-rapl

Thanks. I've already read that blog, but it is not straightforward and i give up. sad

Offline

#4 2018-06-27 21:26:39

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: How to set configurable TDP provided by Intel/AMD?

Hello enihcam, I'm not sure if you are watching this thread but I've managed to figure it out and make it work with an Intel cpu. I'll try to summarize what I've managed to figure out.

This is working on a Lenovo ThinkPad E560, model 20EV000YPG, BIOS R00ET59W (1.34 ) 06/05/2018 (i7-6500U CPU). This has been working with kernels 4.16 and 4.17, I haven't tested with the -LTS kernel or other versions.

I have only fiddled with the "controls" at '/sys/devices/virtual/powercap/intel-rapl/intel-rapl:0' which should control the package power dissipation.

I think it goes like this:
- Time window us granularity is 976us.  The time windows will be rounded down to a multiple of this value, why at least one of the default values is not a multiple I have no idea, but keep reading.
- The power limitation works as a sliding window average
- Both constraint max power uw do what you expect, I haven't noticed any special quirks
- Both constraint time window us do what you expect, but I have found that if you sent a larger (20s or 30s) long term constraint it does work but not seem to limit the average, more like limit after the set number of seconds, so my rule of thumb is: keep the short term constraint to a few miliseconds if you want to keep the maximum power dissipation under the maximum allowed, and keep the long term constraint under 10s to properly limit the average power dissipation. Here even shorter (2s or 3s) time windows will be more effective at keeping the fan quiet.
- Last and more important, write all the values you want to configure the power limits and time windows and to actually apply the value write 1 to enable, this seems to be the magic trick.

I was on to something when I wrote 0 to enable and when reading it back it was still 1, but the limits did seem to get disabled. Maybe this is why some of the default values do not seem to make sense, like a time windows not being a multiple of 976us.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

Board footer

Powered by FluxBB