erpalma / throttled

Workaround for Intel throttling issues in Linux.
MIT License
2.61k stars 158 forks source link

T480 44W then limits to 25W #89

Open devksingh4 opened 5 years ago

devksingh4 commented 5 years ago

Hi All, I am experiencing an issue where while the system is under stress the system power usage will reach to above 25 W (35-36W). Then, approximately 30 seconds later, the system will become power limited and fall back to the 25W limit. For some reason, this always happens. I am connected to AC power.

I would like to always have the 44W power limit on AC since the chip is powerful enough to match HQ level performance when given enough power.

I have a T480 with i5-8250u and no dGPU.

Please advise. Thanks!

erpalma commented 5 years ago

Do you have the 65W power supply?

devksingh4 commented 5 years ago

Yes I do

On Jan 7, 2019, at 2:28 AM, Francesco Palmarini notifications@github.com wrote:

Do you have the 65W power supply?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

JPEckmann commented 5 years ago

I have the same problem. But with the MX Nvidia (not being used when I compute) The temperature goes to ~ 90 degrees, then the frequncy goes down, temperature lowers quickly. so that's good. but the power never goes neyond 25 W Power supply is 65W Thanks. Let me know if I can do any tests

nariox commented 5 years ago

What are the temperatures you are seeing during your stress tests? It might be a thermal limit, rather than a power limit.

honzikd commented 5 years ago

I'm experiencing the same on T480 with i7-8550U.

./lenovo-fix.py --monitor shows after about 30 seconds, while running s-tui in stress mode: [AC] Thermal: OK - Power: LIM - Current: OK - Cross-domain (e.g. GPU): OK etc.

I'm running OpenSuse Tumbleweed, the thermald package is not installed.

erpalma commented 5 years ago

Can you check with --debug if all the values are set correctly? Check for match ERR messages

honzikd commented 5 years ago

Yeah, with --debug, all seems to be set up correctly:

[D] TEMPERATURE_TARGET - write 0x5 - read 0x5 - match OK
[D] CONFIG_TDP_CONTROL - write 0x0 - read 0x0 - match OK
[D] MSR PACKAGE_POWER_LIMIT - write 0xcc816000dc8160 - read 0xcc816000dc8160 - match OK
[D] MCHBAR PACKAGE_POWER_LIMIT - write 0xcc816000dc8160 - read 0xcc816000dc8160 - match OK
[D] Undervolt plane ANALOGIO - write 0 mV (0x0) - read 0 mV (0x0) - match OK
[I] Starting main loop.
[D] HWP for cpu0 - write "balance_performance" - read "balance_performance" - match OK
[D] HWP for cpu1 - write "balance_performance" - read "balance_performance" - match OK
[D] HWP for cpu2 - write "balance_performance" - read "balance_performance" - match OK
[D] HWP for cpu3 - write "balance_performance" - read "balance_performance" - match OK
[D] HWP for cpu4 - write "balance_performance" - read "balance_performance" - match OK
[D] HWP for cpu5 - write "balance_performance" - read "balance_performance" - match OK
[D] HWP for cpu6 - write "balance_performance" - read "balance_performance" - match OK
[D] HWP for cpu7 - write "balance_performance" - read "balance_performance" - match OK

and so on - no match ERR message at all...

honzikd commented 5 years ago

Interestingly enough, I also tried when my laptop is docked. To the docking station I have the 135W power supply connected.

In such configuration, the problem doesn't happen - eventhough the power never reaches more than 35 W (as reported by s-tui).

erpalma commented 5 years ago

So it is definitely related to the power supply. I guess that Lenovo put more strict power-supply-related limits on the T480 since it can have a dGPU. Maybe it just do not distinguish if you actually have the nVidia installed or not. I'm still trying to understand how the hell they technically force the CPU to 25W....

What about on Windows?

honzikd commented 5 years ago

I'll try on Windows later and will keep you posted - I use OpenSuse as my only system, will need to install the MS Win first.

erpalma commented 5 years ago

You can install it on an external drive!

nariox commented 5 years ago

It's also worth mentioning what BIOS you are running on and if you have changed any settings there.

jeffmcjunkin commented 5 years ago

Same situation on my XPS 13 9360 with an i7-8550U - after hitting temperature limits, s-tui will show a maximum of 23 watts, even with the 130w power supply from an XPS 15: Screenshot from 2019-04-16 16-35-16

nariox commented 5 years ago

Hi @jeffmcjunkin, try running under monitor mode and seeing what it shows. My guess is that your EC forces the power to 25W if you reach 95C. You could try reducing the maximum temp to 90C and seeing if you still have this (of course, 90C will probably also throttle your CPU, but hopefully to a lesser extent).

erpalma commented 5 years ago

It might be related to the PROCHOT flag

erpalma commented 4 years ago

@devksingh4 I just experienced some similar behavior. On windows Lenovo Vantage enabled a feature to limit the power while in airplane mode, with some auto-detection feature. The problem is that this flag persisted during reboots on linux! I spotted it because my laptop was charging slower and the power was limited to 25W. I should investigate on the registers involved (undocumented).

klausenbusk commented 4 years ago

I'm seeing the same behavior on a ASUS Zenbook UX430UNR with a 65 power adapter.

cmuell89 commented 4 years ago

I can confirm I get the same behavior on the T480. Could it be related to p-state settings (performance etc,.) w.r.t TLP?

Asheboy commented 3 years ago

I have a the same issue on my T440s, with i7-4600U, also with 65w charger.

devksingh4 commented 3 years ago

I wonder if this is some “VRM lottery”? I don’t see any other reason why this would occur.

From: Ash Summers Sent: Thursday, July 2, 2020 2:08 PM To: erpalma/throttled Cc: Dev Singh; Mention Subject: Re: [erpalma/throttled] T480 44W then limits to 25W (#89)

I have a the same issue on my T440s, with i7-4600U, also with 65w charger. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

PaJaSoft commented 2 years ago

I can confirm, the same behavior for T590 with i7-8665U (base 1.9GHz). Thanks to undervolting (all -115mV except ANALOGIO) I'm able to utilize up to all 4 cores up to 4.2GHz in temp around 70-75 without any throttling however when adding another 4 cores (MT), freq drops to ~3.6GHz due to power limit (caped to 25W).

Interesting is that if I exhaust 'turbo' 44W period (up to 30s, based on load) and use just a sustained power (caped to 25W) and then start throttled I'm able to undervolt to ~-180mV for CPU and Cache for long time (stable) however if I do an opposite sequency - start throttled first my laptop gets stuck immediatelly.