• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

How can I enable "Disable and Lock Turbo Power Limits" in Linux based system to solve 6 watt throttling issue on 8250u.

Shymon

New Member
Joined
Apr 11, 2021
Messages
3 (0.08/day)
Hello, I have an issue with my laptop asus x411un with i5-8250u processor. I recently noticed that it's working quite slowly and started investigation. It turned out that under load laptop is throttled by power to only 6 watts on processor (clock drops to 0.8 - 1.2 Ghz). For example when I start benchmark temps stay at about 55 degrees Celsius, cpu clock is about 1Ghz and of course performance is quite bad. Running on battery or plugged it, changing power plans does not make any difference, and it happens on both windows and linux. Today I tried Throttlestop, nothing worked until I checked "Disable and Lock Turbo Power Limits" then processor began behaving as expected, power jumped to about 40 watts, temps jumped to 95 degrees, it throttled a bit, and switched to 15 / 20 watt (depends what I set) temps stayed at about 80 degrees. Most importantly performance got restored and it didn't feel like 10 y. old laptop.

So "Disable and Lock Turbo Power Limits" seems to fix my problem, but I only use linux on this laptop and I need to apply it there. I tried searching forum and internet to find how to apply it or which registers to edit, but I couldn't find enough information to do it myself. I've got some experience in programming but never played with stuff like that. Could anyone provide some information how to change it on linux based system?

Screenshot from Throttlestop before enabling "Disable and Lock Turbo Power Limits":
throttlestop.png
 

unclewebb

ThrottleStop & RealTemp Author
Joined
Jun 1, 2008
Messages
3,417 (0.72/day)
The ThrottleStop Disable and Lock feature sets a couple of memory locations. I can show you where these memory locations are in Windows but they might be somewhere completely different in Linux. I have zero experience with Linux so I do not know how to set these.

In Windows you can use the RW Everything utility to set these limits without needing to use ThrottleStop.


1618157788232.png
 

Shymon

New Member
Joined
Apr 11, 2021
Messages
3 (0.08/day)
Okay, it would be really nice if you could give me memory locations and possibly values if you know them, otherwise I will look for them on running system. As I see these aren't MSR registers, but just some data in memory? I don't have much experience with modifying such things on linux, but maybe I will find how to do that.
 

unclewebb

ThrottleStop & RealTemp Author
Joined
Jun 1, 2008
Messages
3,417 (0.72/day)
it would be really nice if you could give me memory locations and possibly values if you know them
The picture I posted shows the two memory locations and it shows the values that these two memory locations are set to when you use the Disable and Lock feature.

FED159A0 - 0x00000000
FED159A4 - 0x80000000

these aren't MSR registers, but just some data in memory?
That is correct. I have no idea how to legally access and modify memory locations in Linux.

These are called Memory Mapped IO. Windows maps these to memory location 0xFED15900. Linux might map this information to some other memory block.
 

Shymon

New Member
Joined
Apr 11, 2021
Messages
3 (0.08/day)
Thanks for your help!

I checked values of FED159A0 and FED159A4 under linux and these had the same values as under windows before fix, so I went ahead and changed it to proper values (0x0 and 0x8). It seems it worked! Cpu stopped throttling to 0,8Ghz but after a while it started happening again. I checked and somehow pl1 set itself to 6w, so I changed it to 15w and then cpu again began to work as it should.
I used devmem2 to read:
sudo devmem2 0x00000000FED159A0 w
sudo devmem2 0x00000000FED159A4 w
and change values in memory:
sudo devmem2 0x00000000FED159A0 w 0x00000000
sudo devmem2 0x00000000FED159A4 w 0x80000000
To change pl1 I followed "tutorial" on https://github.com/erpalma/throttled, and set it like that:
echo 15000000 | tee /sys/devices/virtual/powercap/intel-rapl/intel-rapl:0/constraint_0_power_limit_uw
That is 15w.
Seems like system for some reason keeps lowering it to 5 or 6 watt, so I will have to set up some script to monitor it's value. Actually this problem is quite similar to one described in repo I linked above, where there is also script that changes pl1 and pl2 every 5 seconds to override values from embedded controller.
I haven't also carried out proper tests, as I don't have time today, I will see how it performs in real work during next week.
 

unclewebb

ThrottleStop & RealTemp Author
Joined
Jun 1, 2008
Messages
3,417 (0.72/day)
@Shymon - Interesting stuff.

MSR 0x610 contains both power limits, PL1 and PL2. Intel is nice enough to publicly document this register. Setting bit[63] locks this register so it cannot be changed. Linux has command line tools to change MSR values so you are set. If you are in Windows you can adjust PL1 and PL2 in the ThrottleStop TPL window and then have a look at what value MSR 0x610 is set to and you can apply that same value to that MSR register in Linux. Once this register is locked, no need to keep monitoring it.

Here is a simple tool to Dump the contents of your MSR registers while in Windows.
It was written by a smart guy called Dufus who used to hang out in the Notebook Review forums. Handy tool or you can use RW Everything.

 
Top