189 points · by ladyanita22 · 3y ago · 137 comments
I installed thermald on my Lenovo T480 with Debian Bookworm and I get 20% better results in stress-ng. The fans are a bit louder now under high load and off under low load.
Without thermald:
$ stress-ng --matrix 0 -t 3m --metrics-brief
stress-ng: info: [3755113] setting to a 180 second (3 mins, 0.00 secs) run per stressor
stress-ng: info: [3755113] dispatching hogs: 8 matrix
stress-ng: info: [3755113] stressor bogo ops real time usr time sys time bogo ops/s bogo ops/s
stress-ng: info: [3755113] (secs) (secs) (secs) (real time) (usr+sys time)
stress-ng: info: [3755113] matrix 2278812 180.00 1437.43 0.27 12660.06 1585.04
With thermald: $ stress-ng --matrix 0 -t 3m --metrics-brief
stress-ng: info: [3755550] setting to a 180 second (3 mins, 0.00 secs) run per stressor
stress-ng: info: [3755550] dispatching hogs: 8 matrix
stress-ng: info: [3755550] stressor bogo ops real time usr time sys time bogo ops/s bogo ops/s
stress-ng: info: [3755550] (secs) (secs) (secs) (real time) (usr+sys time)
stress-ng: info: [3755550] matrix 2791272 180.00 1404.32 0.57 15507.06 1986.83
I just installed it using apt and did no extra configuration. My system was anyway configured for balanced power mode.
Why is thermald not installed on desktop installations by default?The thermald man page says this:
> In some newer platforms the auto creation of the config file is done by a companion tool "dptfxtract". This tool can be downloaded from "https://github.com/intel/dptfxtract". It is suggested as parts of the install process, run dptfxtract.
The dptfxtract gibthub project (https://github.com/intel/dptfxtract) says Intel discontinued the project.
> Thermald version 2.0 and later has in built parser for thermal tables. So this utility is not required. Make sure that thermald "--adaptive" option is used.
I also use this tool to bypass manufacturer limits in battery mode that are intended to make the system seem like the battery is not undersized for the CPU's power draw. Sometimes I'd rather have more CPU for less time.
I have never used a laptop for a decade, nor have I had the CPU fail. So perhaps faster performance and shorter lifespan is okay.
Just replaced my main desktop which was fx8350, but that computer is now on its 2nd life with a friend and shows no signs of stopping.
There was a time when 10 year old computer was absolute rubbish. These days, if you upgrade from spinning drive to ssd, 10 year old well made computers are just fine :)
Basically, in 3 decades of personal computing, I never had a CPU failure other than that one time I crushed atlon xp with the heatsink :O
That's it.
I still regularly use this machine even though it not longer is my main portable device. The only thing keeping me from doing so is its 32-bit CPU which now that 32-bit support has mostly gone the way of the dodo. I much prefer its 4:3 form factor 1600x1200 screen, keyboard and construction over the P50 I'm using in its stead.
Of course lots of CPU make it for longer, but 10 years is certainly not a design target.
The computers don't break on Windows, why Linux uses should take this overly conservative approach that limits the performance of their computer?
This check doesn’t work on Linux, so for safety reasons the former limit is enforced.
The whole point is to ignore them because they're horrible and hold back what these CPUs can really do. Fuck the manufacturers playing these stupid marketing games.
Intel warrants their CPUs at TjMax 24/7, they'll automatically throttle when they hit that limit, and disabling all this other throttling crap makes them run that way for full performance.
but you're now generating more heat than the system is designed to dissipate
I believe that's more accurately rephrased as "now you have more performance than they wanted you to have", because that's how it's being used in practice.
FYI, it is painfully obvious that you're toeing some sort of company line here.
Edit: and getting flagged for pointing out the truth should itself be quite telling. ;-)
Mostly I mention it to say that there's not _no_ reason for thermal limits in modern setups...
There's zero reason for all this extra "thermal management" crap beyond corporate greed.
Thermal limits like this are really about managing the manufacturers liabilities, and protecting the expected lifetine of the product.
Like I said, Intel warrants their CPUs to be operational at TjMax continuously, and that's the temperature they'll reach and stay at automatically if not given enough cooling. There's plenty of stories of people with computers whose heatsink has somehow detached or become so severely clogged as to be at that limit all the time, and the CPUs survive just fine.
This article isn't about that; it's about manufacturers artifically limiting performance beyond that to hit a marketing target like battery life or power consumption.
Trusting Intel to provide accurate info on the actual performances of a chip feels too naive at this point.
It shouldn't be too difficult to correct on Linux. Why is Windows taking the manufacturer's limits into account while Linux basically ignore it?
As for the pros and cons of the `throttled` project, yes, this might not be the "officially desired" approach but I know several people who have been using to great success for years. The reality is, unfortunately, that particularly those of us who use Linux machines for work and order the most recent & powerful Thinkpads or Dells they can get their hands on, often realize later on (when the machine arrives) that the default settings handicap our machine to such a degree that we can barely work. Unfortunately, not everyone is a kernel developer, though, or knows how these things work, so quick fixes are often welcome, even if they limit the hardware's lifetime (after all, we'll buy a new device in a few years anyway).
What exacerbates this problem is that it's all very intransparent: The "official" way to solve these issues (which, as far as I understand you, is installing thermald?) is not really communicated anywhere, nor does thermald come preinstalled on any of the major distributions AFAIK[0]. What's worse, thermald often doesn't even solve the throttling issues without installing further patches. On top of that, BIOS updates by the manufacturers also seem to play a major role as manufacturers like Lenovo introduce different performance modes and things like "lap mode" etc. To be honest, to this day I haven't quite understood how these things interact and whose responsibility it is to fix things.
In my particular case, I have been using a Thinkpad X1 Carbon Gen9 (which Lenovo says "supports" Linux) and at some point, after installing numerous BIOS updates and working my way through hundreds of posts on the Lenovo forums, I just gave up: My machine still regularly throttles down to 800 Mhz per core and 16W under medium load until I hit the secret Fn + H key chore to tell the BIOS to switch back to high performance mode and set the thermal limit back to the maximum.
Do you happen to have a recommendation for me as to where I should start looking (again) for a solution? Does thermald fix these issues these days? (I know that when I last looked into it, it didn't.)
[0]: (EDIT) I take that back, it looks like thermald does come preinstalled on Fedora and Ubuntu these days. At least it's present on my new Ubuntu 22.04.2 installation. Unfortunately, that doesn't really help me since (and now I remember reading this last time I looked into thermald) according to the changelog[1] for v2.3:
> - thermald will not run on Lenovo platforms with lap mode sysfs entry
Great, so I still have nowhere to go from here it seems.
(Essentially we're back again to the situation I described: It's all very intransparent to me.)
If you try to do this to your laptop, well... there's a reason you can't legally sell laptops that heat up beyond 40-45℃. Expose yourself to that all you want, but be prepared for hardware damage, overheated skin, or decreased sperm count due to putting an overheated laptop in your lap.
I wouldn't call this a fix in the same way I wouldn't call throwing out your smoke alarm a fix for the constant flat battery beeping.
But thanks to turbo boost, sometimes my laptop is hot playing a youtube video but cool when compiling code or the other way around. There is no predictability on how long a compilation will take or how long the battery will last, since it would depend on N thermal and power factors.
At least to me, this feels like when marketing designs products instead of product managers. I recently bought an Intel 12th gen i5-1240p laptop (asus zenbook) and this processor boosts from 1.7Ghz to 4.4Ghz i.e. more than twice the base frequency. That's absurd? I rather have a stable ~2Ghz than have the processor boost up to ~4Ghz while surfing the web.
Hence we wouldn't need tools like this if at-least on laptop, Intel released chips with no or smaller turbo boost range.
echo "75000000" | sudo tee /sys/class/powercap/intel-rapl/intel-rapl\:0/constraint_1_power_limit_uw
to cap my i7-10700 to prevent it from overpowering the system fan by peaking to 200+ watts.- Liquid metal TIM
- Thermal pads + heat pipes connected to chassis to dissipate heat (Yes this means the bottom chassis heats up a lot)
- Disable the intel_rapl_msr linux driver + disable BD_RPOCHOT via MSR
Laptop has worked like a charm since. I really don't want a super thin laptop. I want a small laptop. I wouldn't mind 2 cm thick 13 inch laptop. But I can't handle a 15 inch laptop. I just find it way to large to be seriously portable.
e.g. ThinkPad T14 Gen 3 AMD, Ryzen 7 pro 6850U, 32 gb LPDDR5-6400MHz for around 1000 EUR
Having used an XPS 13 and XPS 15 I was underwhelmed and none of Dell's laptops hit the sweet spot for me.
I like such generalised statements. You can read about xeon v3 hack and ThrottleStop PowerCut. Each is just "writing MSRs" with a funny side-effect of your CPU taking more current in.
Yeah. It's that bad. I have a Thinkpad P14s.
What's worse, these things have an accelerometer that causes the same type of throttling if you move your laptop.
Fuck Intel-based clothes-iron laptops so hard.
The benchmarks do not lie.
Of course, this only works if the OS knows how to do this, and Intel never publicly documented it so I had to reverse engineer it instead.
This is not the only area where Intel doesn't really support Linux, some of their GPU models also come to mind, like the PowerVR based ones in the past.
253 W max turbo power is not that crazy by today's standards.
> top of the line case, very good fans / circulation, and a large AIO
I think you'll find that what people consider good cooling for a desktop has changed somewhat in the last decade. My first GPU didn't even have a fan, but today it's fairly common for enthusiast builds to have an external radiator. I dunno what you consider large, but most AIOs only have slightly more surface area than large air coolers so they really aren't worth it for sustained workloads like gaming or ML training. Custom loops have always been the go-to solution.
It benchmarks really well and I’ve never seen it over 50*C, the fans are really quiet, and I haven’t changed any of the configuration for it.
On the flip side I’ve got a i9-12900k in a different PC with air cooling and a more compact case and between that and the graphics card, the smaller machine runs super hot and noisy.
I was using Cinebench for benchmarking. I haven't seen any performance hits, in benchmarks or typical usage, so I'm comfortable with all of it.
I decided to undervolt the thing based on about a dozen or so Reddit threads worth of conversation about the thermal properties of these 13th generation Intel chips.
As noted by the author:
> ===== Notice that undervolt is typically locked from 10th gen onwards! =====
I can't even modify the BIOS due to BootGuard and the keys burned into the CPU.
Hopefully there will be a way to leak/extract the keys someday, as this create real e-waste for fake security.
It's all the fault of manufacturers who want to both save cost with inadequate heatsinks and impose arbitrary restrictions on their products. The software in this article looks like the Linux equivalent of ThrottleStop, a Windows application that was the first to expose the truth behind it all.
Consumers: "Why would Intel do this?"
Laptops shouldn't be using boost anyways, because their form factors and CPU coolers just can't handle the heat output.
Laptops shouldn't be using boost anyways, because their form factors and CPU coolers just can't handle the heat output.
On the other hand, if it's plugged in much of the time, then let it boost as much as it can, with speed only thermally limited. Otherwise you're not getting the true performance you paid for.
Linux does grant the user that flexibility, so if someone actually wants that, they can have it.
The max non-boost frequency is usually the sweet spot for performance and efficiency.
> On the other hand, if it's plugged in much of the time, then let it boost as much as it can, with speed only thermally limited. Otherwise you're not getting the true performance you paid for.
If the user wants to live with a potentially reduced laptop lifespan, sure thing. But it's just not worth it for a laptop, frankly, given their limited thermal cooling capacities. That CPU will degrade over time when run at that level of heat.
If Intel warrants their CPUs to be at TjMax 24/7, it's a good sign that it shouldn't be a problem. I have not heard of overheating killing CPUs since the days when AMD's didn't have any thermal protection[1], and I've cleaned out machines which were heavily clogged with dust and thermally throttling all the time for many years (the service prompted by their owners complaining about their computers being slow.) In one memorable case the push-in heatsink pins must've been originally not fully inserted, since they came out at some point and the heatsink was not even touching the CPU anymore, yet the CPU kept running for years in that state.
[1] There's a famous TomsHardware video about that: https://www.youtube.com/watch?v=y39D4529FM4
I overvolted and overclocked pretty much every chip I've owned from my 20 year old Athlon 64 to my 0 year old RTX 4090. None of them have degraded. If you watch overclocking livestreams you'll see just how much abuse it takes to get any sort of reaction from silicon.
That's quite a sweeping statement. The adequacy of cooling seems to depend a lot on the device and its configuration.
I've had two small form-factor ThinkPads at default configuration over the last nine years, and there have been zero problems with heat. The CPUs have conservative TDP limits, and the cooling seems adequate for that.
One of the laptops ended up with a broken keyboard after ~seven years, but if that hadn't happened, it would probably still be in daily (and not always particularly light) use, as it had been until then.
I'm sure some manufacturers and models choose their parts less conservatively, and put too powerful CPUs or GPUs (or set their cTDP too high) in a chassis that can't really handle it. For them, the maximum turbo allowed by their CPU/configuration might be too much over prolonged periods. Some of those devices might end up failing due to thermal issues within some years.
But for more conservatively configured laptops (such as business ones), disabling turbo would probably quite needlessly limit their performance. Unless you're aiming for a much, much longer lifespan than almost anybody uses their devices.