-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dell Latitude 5420 (i7-1185g7) Power limited #255
Comments
I guess that your platform is limiting access to those MSRs. |
I read that undervolting was disabled to mitigate plundervolt on newer CPUs so I'm thinking that might be related. Or maybe there's some permanent BIOS setting that got carried over from Windows. |
I'm having similar issues (same processor in a Lenovo X1C9), including the match ERR for MCHBAR PACKAGE_POWER_LIMIT. If I manually overwrite /sys/devices/virtual/powercap/intel-rapl-mmio/intel-rapl-mmio:0/constraint_0_power_limit_uw (as mentioned in the README under Static Fix), everything seems to work for a while, but eventually the embedded controller (or something) overwrites my change back to a lower value. |
I've the same issue on XPS 13 9310 with i7-1185G7.
Kernel:
Dell Bios Version :
Secure boot :
intel-rapl :
|
I am having just this issue with the 1165G7 in a lenovo thinkpad. similar to what @dcplaut mentioned, if I run the static fix it "releases" the power, but quickly something sets it back to 10w. What I ended up doing is a bash script that runs as a systemd service in an infinite loop every 5 seconds and set the values (the static fix commands) if is connected to AC only. That fixes the problem for me but I can't stop thinking, what's exactly limiting the processor to 10W? Is it bad what I am doing? setting constantly a limit for 44w? My computer runs very hot when I am doing heavy compilation things and I can see the temperature going in highs 90C degrees and thermo throttling (which is good at that temperature!) Perhaps someone has some light in this issue? UPDATE: in a lenovo if you use Fn+l or Fn+m or Fn+h you can change the CPU performance mode. This made my processor go from running in 10w to 20w but still not enough to make it to 44w so running the script still makes it go faster. |
Is that BIOS-level or is that something you're doing on Windows? |
@sameer I do it in Ubuntu. Not sure if it can work in other distros. |
I think that it is Dell specific issue, not possible to fix it by 'static fix' on Latitude 7520. Please correct me if I'm wrong Related issue: intel/thermal_daemon#293 |
Thanks for sharing that, I think you're right. |
What I see currently:
cat /sys/devices/system/cpu/cpu0/cpufreq/base_frequency
1800000
|
@sameer posted this issue on Dell Community forum: https://www.dell.com/community/Latitude/Latitude-5420-7420-7520-CPU-Throttling-Issue-on-Linux/m-p/7959019#M34444 please add details if you will find something, thanks |
@academo For me (Lenovo P14s Gen 2) Turning off SpeedStep in the BIOS meant that it stopped giving the OS control of the CPU power (in 21.04's case I think it is thermald, I could be wrong...) It probably still needs to run the static fix on boot, I am not too sure yet. I'm working to determine this. EDIT: running in tandem with fix_lenovo running the static fix on boot seems to do the trick... Just have it as a simple oneshot service. If only I could get it happening before systemd comes up, maybe I could boot faster haha |
Hello, guys. Got same problem With latest Have you tried to boot Ubuntu 20.04 live? I haven't noticed any 400MHz drops while using LiveCD for an hour. |
Please check post in Dell community forum: https://www.dell.com/community/Latitude/Latitude-5420-7420-7520-CPU-Throttling-Issue-on-Linux/td-p/7959019 So far nothing new. Waiting for a miracle or fix from Dell |
Titular laptop & CPU Linux user also. I made some research & experiments. In hot ambient (>25C) it behaves really bad, ie. stuck for long time at 1800MHz after some moderate load applied. But, I kind-of found the solution (or the real culprit...?): when force-cooling the underside of the laptop (I'm using 120mm PC fan on an upside-down laptop, since I use exclusively external displays anyway), it stayed at about 3500MHz under load, even in 25C+ ambient. My conclusion: should be fixable via BIOS, and I strongly hope that someone capable of it notices it too. edit: would be nice if someone can confirm my experiments with cooling the underside. |
Developer from So I think that you're right |
the weird thing is that it works correctly on Windows |
Ah, right. So, if Windows is not doing anything magical (I don't think it is, it's just more popular, so it's diagnosed & fixed much faster), Linux should be able to do it too, via software. In fact, tinkering with thermald's source code could be in reach for some of us, and maybe it is enough. |
@academo could you please share your |
I mentioned my temporary workaround some months ago in dell forums too... I am using debian bullseye without thermald installed.
I am using these commands in a systemd service that I enabled it and it is running on boot. |
thx @ftsogr I just tested on my latitude 7420 with archlinux and indeed without |
I think that dell will take the issue more seriously if more people mention it in dell forums. |
The fn keys work for me on a Lenovo Thinkpad X1G9, it changes the max wattage like this: How did you find out about these fn keys? update: My conclusion for this particular model is throttled is not needed, nor are any other of the workarounds / daemons / kernel options / commands. You just have to push fn-h after startup and check that /sys/devices/virtual/powercap/intel-rapl-mmio/intel-rapl-mmio:0/constraint_0_power_limit_uw has the correct value. (The other values seem to be correctly set to 64w) (this reddit thread is correct, and also seems to suggest there is a lap detection system that can further limit the performance mode?? https://www.reddit.com/r/thinkpad/comments/i4x8i8/tip_for_x1c7_and_perhaps_other_recent_models/) |
I'd like to update on this issue after using a lenovo laptop (P15s Gen2) with this processor for about 3 months. Conditions:
When using high CPU this happens (no fixes applied):
if the static fix mentioned in the readme is applied:
When using throttled and performing a stress test, it behaves as it no fix was applied (no difference) In practice:
My current solution? Run the static fix in an infinite loop every 2 seconds. I added as a service for systemd. This is the script: https://gist.github.com/academo/30c781932b6b66adaacbc8932690f820 With this fix applies the laptop maintains 35w power consumption and the highest clock speed. If any of you have a better solution or think what I am doing is dangerous for the CPU please let me know. I haven't found any other way to make this laptop work properly. UPDATE: With fn+l: 5000000 With the static fix: 35000000 (I set this value, it makes sense). is it the default performance mode on this laptop defaulting to 10w? That's really low when you look at the processor capacity. Can someone with the same model confirm? |
I think that need to create separated issue for lenovo laptops because it's not related to throttling issue with dell |
Hi @academo ! Any chance you could share the script, as well as your config file? I have a P14s Gen2 and I'm being limited quite a lot. Additionally, what's the max frequency you get under a stress test? Mine does not go above 1.2 GHz under the Thanks |
the same issue with i7-11850h but throttling going to 800MHz. |
Hi @errogaht If you have the thinkpad P14s please have a look here https://github.com/whoenig/thinkpad-p14s-gen2-ubuntu @whoenig compiled a few tricks to get the P14s working quite well. It's been my daily driver for a few months now and I've not encountered issues. |
Same issue: Long time (+2s) Power throttling at 10-12W. It can boost but quickly goes down and stay around 1,800Mhz. Also experiencing the issue with mismatching MSR writes and reads. Not sure where exactly the fix is to be found: throttled, thermald, kernel, intel, dell or throttled.. I'll probably give up for now and just hope it will be fixed one day (only blaming the big vendors here, not any of the open source projects ;) ). |
Wondering if this is related: Now, is the register read correctly at all or is it only read only? If it is read correctly wouldn't that mean that the limit does not apply at all? 0xffffffff is a big number |
Thank @ftsogr I'm on Dell Latitude 5421 using using Debian Bullseye and loading/unloading of modules works for me. Like @n0rad when stressing cores to maximum frequency drops from Max Turbo to TDP frequency (in my case 2.5 GHz). I suppose this is expected as Turbo Boost is not designed to run for long time on all cores. In my case I needed to load/unload one more module processor_thermal_device_pci_legacy because it is blocking to rmmod processor_thermal_device. In my case order of models reloading looks like this (if it help to anyone).
|
When you are doing this, do you stay stable for e.g. 10 minutes on 2.5GHz? At what temperatures? |
@sebastianha When running stress test it's usually in Turbo Boost for couple of minutes with ~3GHz (all cores) frequency with temp. ~90 °C. Then it's throttled to 2.5GHz (all cores) and it's stable with temp. ~75°C. Then after while it goes to Turbo Boost again. You can see running stress test on pictures. |
Sounds correct, thanks! Unfortunately this does not work on my 7320. |
Might it be possible that writing to the MSRs is locked at all (by EFI/BIOS?)? It could be by accident that the second and third are ok as it had just the same value before. At least for me CONFIG_TDP_CONTROL is already set to 0x2 after boot. |
Dell is collection information: https://www.dell.com/community/Latitude/Latitude-5420-7420-7520-CPU-Throttling-Issue-on-Linux/m-p/8129749/highlight/true#M39458 |
On thermald there just was a breakthrough for this problem: intel/thermal_daemon#341 (comment) Now the CPU runs at full power for 60s then throttles down (it does the same on Windows). Next steps are trying to remove this limitation, on Windows this is possible by locking MMIO via Throttlestop. |
It's weird, but it seems like the problem is fixed for me (on 5420) even without the patch. Compiling the kernel with it right now and the CPU is at 2.4GHz, 70°C for 25 minutes already.
|
I don't see this behaviour on my 7320. I've running this patch from morning, few minutes ago I've started system update (I have gentoo so compiling everything) and it's running fine - temperature near to 98°C all the time, frequency at start below 4GHz, after several minutes (5+) it downscales to something like 3,2GHz (temperature still on ~98°C) so I believe that it's totally OK for 3GHz base frequency CPU. |
There might be a difference as I am currently running on "optimized" BIOS settings. There is also "Ultraperformance" available but I currently have no time for intensive testing. On 7320 the patch definitely fixed it. I have read in other tickets that this was not a problem on 5420 and others notebooks, that was also the reason I opened a ticket exactly for the 7320. |
Well, it may be this settings. I have ultra performance configured since I start solving this issue. I also want to try to set it back to optimized as now I can hear that this laptop is quite silent even running with fan on 100%. And with ultra performance it makes almost same noise under heavy load as with regular using so I want to keep it more silent on normal using. I'll let you know when I will have mood for reboot and reconfiguring BIOS it it's start throttling earlier. |
Would anyone with a Tigerlake CPU be able to run this command? It should report the address of the MCHBAR register. As @sameer reported it seems like writes into the register fail. On Alder Lake we are experiencing the same issue and we found that the address has changed sometimes after the 10th gen and changing it to the correct one fixes the issue. |
|
|
Thanks! So the address is the same as for AlderLake. No wonder it does not work. Could you please report cpuinfo?
I enabled Tigerlake support in this commit and it would be great if anoyone could test it. Pull request #308 |
Sorry, the notification somehow went to spam. Find below the full
|
Hi there,
First off just wanted to say thanks for creating this, it's a really helpful tool.
I recently set up throttled on a Latitude 5420 and am running into power throttling on AC. cTDP-up gets set successfully but the package power still sticks at 15W. There are also errors around setting the temperature target and mchbar package power limit.
Is there something I can try to troubleshoot here? Let me know if there's any other information I should provide.
My config:
Debug logs:
The text was updated successfully, but these errors were encountered: