Hacker News new | ask | show | jobs
by dvdkon 842 days ago
It's surprising that there are no PC fan controllers that would use some variant of PID control with a temperature target. Traditional fan curves are simple, but the result isn't very intuitive.

And many desktop motherboards manage to screw up even the basic fan curve, offering users control of only two points within strict bounds, no piecewise linear curves or hysteresis settings.

I started a fan controller project some 4 years ago and it's now sadly in limbo, waiting for me to solve power filtering issues for the makeshift power supply it grew into. Maybe I should just limit myself to 4-pin fans...

6 comments

PID control isn’t an easy solution in PC cooling.

CPU temperatures can swing from 40C to 90C and back in a matter of seconds as loads come and go. Modern fan control algorithms have delays and smoothing for this reason.

If you had a steady state load so stable that you could tune around it, setting a fan curve is rather easy and PID is overkill. For normal use where you’re going between idle with the occasional spike and back, trying to PID target a specific temperature doesn’t really give you anything useful and could introduce unnecessary delays in cooling if tuned incorrectly.

I would be surprised that a PID controller can't adjust the control signal of the fan on the order of milliseconds/hundreds of microseconds. The mass of the fan would be the bigger issue.

Something that would help is multiple fans being adjusted by the same PID controller. It's not a problem if they're spinning too fast, but if you need more cooling the controller needs to increase air flow at the fastest rate which means turning up multiple fans.

Fans are annoying enough when at a steady speed, but a fan that is continually changing speed sounds extra irritating if it’s in the same room.

Some sort of smoothing plus a conservative base rate might be more tolerable.

> a conservative base rate

Do you use windows?

I find that with windows the fan is always spinning, even if at low speed. While with linux most of the times it is not spinning at all.

>Do you use windows

In a desktop the motherboard controls the fans unless you have an alternative like fan control installed, so not windows.

In a laptop it's either still the motherboard, or a specific chip used to manage the fans and other peripherals (ie for Dell/XPS it's locked out of bios control and you need to use Dell's special software to adjust it; Fuck You, Dell!), so still not Windows.

Well a basic windows install will keep the CPU more occupied than a basic linux install, when both are idle.

This reflects in the CPU being hotter, which reflects in the fan spinning more.

In windows my CPU fan is always spinning although silently in my experience but my case fans spin down.

ASUS motherboard Noctua fans if that makes a difference.

I’m on a Mac - and for the first time a computer I can’t hear (it’s a model with a fan).
Mac tend to run hot to be more silent.

I had to throttle my CPU in my macbook or it would shutdown for overheating while compiling.

I don't consider that a feature.

The problem is that you really don't want the fans to react that quickly. Fans make noise, and a changing noise is far more irritating than a constant buzz in the background.

You quickly stop hearing a fan constantly running at 50%, but a fan randomly switching between 10% and 100% gets on your nerves extremely quickly.

I think the thermal mass of typical desktop coolers is large enough that a smoothly tuned PID controller would fare well, without hindering performance or annoying the ueer.

I suppose the best way would be to try, but my current computers have no (or very unstable) interfaces for fan control.

Modern CPU coolers are basically heat pipes connected to a radiator.

They have very little thermal mass and if too much energy is in them the liquid all evaporates.

When the liquid evaporates their performance falls off a cliff.

Wouldn't the better solution be to rely on the heatsink temperature instead of on the chip/core temperature then? I mean in the end, the air from the fan is cooling the heat sink, not the chip directly.
Why would it be better? In the end, you would like your CPU to stay (at most) at, say, 40 degrees, not your heat sink — that thing can be at 35 if it needs to.
Heatsinks don't typically have thermocouples, is the problem.
but it isn't hard to add thermocouples to a heatsink? perhaps the reason for not doing this is because the improvement is not visible in standard benchmarks? it is not improving the overall performance, not reducing the peak noise, just make the transition smoother...
the CPU temp can do that, but your typical desktop air tower has a lot of thermal capacity. if it took 5 seconds for the fan to react, that wouldn't be a big issue.
Desktop case fans also have a fair bit of inertia. They take at least a second or two to ramp up to full speed, and longer to coast back down to their minimum speed.
> It's surprising that there are no PC fan controllers that would use some variant of PID control with a temperature target.

They actually exist (such as ARCTIC F12 TC) but not very common. Separate controllers such as Adafruit EMC2101 are also available.

Both EMC2101 and F12 TC work with a look up table, so a normal curve as opposed to a PID.

You can verify that in the datasheet of EMC2101, and in the case of F12 TC in product descriptions (..The fan responses to the rise in temperature swiftly – within a critical 6°C range, the rpm of the ARCTIC F Pro TC fan increases from around 500 to its maximum of 2,000 rpm (the steep curve in the chart).)

IIRC because tuning PID controllers for vastly different heating and cooling rates isn't that easy. A CPU can ramp up/down a lot quicker than the cooling system could or should even attempt to react. It's easy to end up with a oscillations the common temperature vs. speed curves (maybe with a hysteresis range) is already annoying enough to tune. Good luck having users come up with good PID terms for their individual combination of parts (CPU, thermal interface, mainboard, case, fans, pump, radiator, etc.).
I’m more surprised there aren’t fan controller standards so the mobo or OS can tell the fan to ramp up with usage instead of relying on temperature probes.
There are, you can override your fan speed from the OS. But that leads to issues with a control software crash potentially leaving your fans stuck in a low-speed state.

There's pretty much a 1:1 link between CPU load and CPU temperature, so relying on temperature probes is good enough for almost all situations.

> There are, you can override your fan speed from the OS. But that leads to issues with a control software crash potentially leaving your fans stuck in a low-speed state.

That’s why I didn’t talk about user software and was focusing more on mobo (since it knows the current state of all usage and is not os-dependent) or low-level OS hooks which can have battle-tested processes to make sure that the fans are not left uncontrolled. I appreciate you bringing up the point though, it’s vital to make sure the chips don’t fry.

> There's pretty much a 1:1 link between CPU load and CPU temperature

Yes agreed, but there’s a lag time between the two

I don't think you can fry a modern chip, at least without really going out of your way to.

But even if you just forced all of your fans to run at 0% (or physically removed them) I would expect the CPU to trigger PROCHOT and throttle it's performance, hard crashing if it has to.

Honestly, the fan should ramp up to maximum speed if not explicitly set within the past 500 ms or something, and also have a high-water mark temperature that if crossed while the fan isn't at maximum speed causes the fan to run at maximum speed until the machine restarts.

If the OS can't keep up with the fan speed update schedule, go into your failsafe mode.

If you cross that maximum temperature while being commanded by the OS to run at maximum speed, then that's presumably not an OS bug. If otherwise, treat it as an OS bug and put the OS back into diapers, to re-try the big kid underwear on the next restart.

I don't know about any standards, just about software that tries to support as many proprietary interfaces as possible (and doesn't have support for plenty of hardware). Have I missed something?
You don't really need PID, just a decent fan curve with https://github.com/Rem0o/FanControl.Releases
Too bad it's completely closed source and MS Windows only.
Yeah there is really a lack of good quality of life tools on Linux.