Steam Deck Gets a New OS-Controlled Fan Curve Option for Quieter Operation

Tsing

The FPS Review
Staff member
Joined
May 6, 2019
Messages
11,067
Points
83
Valve has released a new version of SteamOS, and it's a relevant one for Steam Deck owners who have been bothered by the level of noise that the handheld can generate.

Go to post
 
Fan curves are sub optimal and really should stop being used by everyone in the industry.

They result in fans running faster than they need to (and thus being too noisy) in all workloads that don't require 100% fan speed.

All computers should be using some form of PID/Setpoint controllers instead.

They can be trickier to set up, but some predefined presets can handle that. If you want to get extra fancy, real time self learning AI to optimize PID variables could also be used.
 
The good news is, since it's OS controlled and not some firmware thing, there will probably be an open-source solution to come out sooner than later to implement a proper PID control.
 
View attachment 1641

My google-fu has failed. Got a starting point on these?

Sure.

Here is the very technical engineering speak page on the technology on Wikipedia.

This technology has been used to control industrial process coolant loops forever. It's use in PC's has been more limited. The only application I am aware of is in Aquacomputer Aquaero devices, where you can create a fan curve, or you can instead select what they call a "Setpoint Controller". They have several presets, but you can also choose "User Defined" and input the PID values manually.

1654129794600.png

The concept is something like this:

Lets say you want your core temp to never exceed 50C. If you set a fan curve, you'll configure it so that it hits 100% fan speed at 50C. Problem solved. But what happens at less than 100% load when you don't need as much fan speed? Well, you'll be lower on the fan curve, you'll have lower fan speeds, but you'll also be maintaining a temp that is lower than 50C, which is cooler than it needs to be, and thus has your fans spinning faster than they really need to be to not exceed your desired temp. This comes with noise and other implications.

The way PID controllers work is sortof as if you paid a dude to sit next to your computer with his eyes on the core temp output, and if it starts going up, he turns the fans up a little, and if it starts to go down, he turns them down a little. He - if he is good enough - can essentially maintain your 50C no matter the load, and never over-cool it by running more fan speed than necessary.

So the PID controller is an algorithm that continuously monitors a temperature output (it can be used for other things than temperatures too, but in our case temps are what is interesting) and as it sees it drifting up, it increases the PWM cycle, and as it sees it drifting down, it decreases the PWM cycle, attempting to maintain as close to your setpoint as possible at all times. The result is a quieter system in all except max load conditions where 100% fan speed is truly needed.

The Aquaero's presets (very slow, slow, normal, fast, very fast) work pretty well on my system, so I haven't bothered with the User Defined settings, but if you think you can do it better, they allow you to enter your own values, but it is HARD. There have been many (usually German) PhD dissertations written on optimizing PID controllers. You can find lots of masters level engineering books on the subject if you are really interested.

The trick is to get optimized for the system you are using so that it responds fast enough to be effective, but doesn't over-correct. Over-correcting is a real risk because there is a delay between raising fan speeds and seeing an effect on temps. If it over-reacts you'll enter an oscillation where fans get too fast, the temp drops too low, then fans turn down, get too slow, and the temperature rises. Worst case it starts looking like a sine cure rapidly going from 0% to 100% to 0% to 100% over and over again.

This last part is where I think there could be some application for machine learning, somehow putting the system into "training" mode and allowing it to vary variables and see the output, and gradually train itself for the perfect PID settings for a given system. Who knows, it's been a while since I read about PID controllers. For all I know some German engineering doctoral candidate has already written a PhD dissertation on Machine Learning Optimization of PID Control Loops, or something like that.

When I read about it last there were some manual algorithms that would get you to a rough first draft. They involved intentionally triggering oscillation, then measuring the time between oscillations and how intense the oscillations were, and calculating some of the PID value settings. These reportedly got you to a rough decent first draft, but after that it appeared to quickly devolve into a dark art of educated guesswork.

If you love differential equations there is seemingly no limit to how deep this rabbit hole can go.
 
Last edited:
We do PID loops all the time at work - big fans, variable speed pumps, etc

Tuning them is either an art form or some kind of voodoo black magic. They can be extraordinarily tricky at times. But once you get it - everything just gels.

The complicated ones have three different tuning parameters:
Proportional — adjust the control more or less based on how far away you are from the setpoint. This is the most common and easiest to tune, and this is all you need on simple controls
Integral - adjust the control even more or less based on how long you’ve been away from the setpoint. This helps control overshoot if you have slow to respond controls — like turning the fan up on a large water loop and it takes a bit for the end temps to finally react
Derivative - further adjust the control
even more based on the rate of change of your approach to the setpoint (I.e if proportionally your temp is higher than the set point, the control will have the fan speed turned up — but if the temp is dropping, derivative will counter act that to lower the setpoint a bit so that hopefully you slide right into the target temp without too much overshoot).

Once you start tweaking on all three it gets interesting. Usually I just use P until I get it with the smallest oscillations I can, and most of the time this is good enough. I adjust D until it counteracts — this usually will result in the controller stabilizing somewhere in the oscillation band but not quite at the target setpoint. If I need it to be more exact than that I adjust I so that it can nudge the control from that stable point to the correct set point.
 
Last edited:
We do PID loops all the time at work - big fans, variable speed pumps, etc

Tuning them is either an art form or some kind of voodoo black magic. They can be extraordinarily tricky at times. But once you get it - everything just gels.

The complicated ones have three different tuning parameters:
Proportional — adjust the control more or less based on how far away you are from the setpoint. This is the most common and easiest to tune, and this is all you need on simple controls
Integral - adjust the control even more or less based on how long you’ve been away from the setpoint. This helps control overshoot if you have slow to respond controls — like turning the fan up on a large water loop and it takes a bit for the end temps to finally react
Derivative - further adjust the control
even more based on the rate of change of your approach to the setpoint (I.e if proportionally your temp is higher than the set point, the control will have the fan speed turned up — but if the temp is dropping, derivative will counter act that to lower the setpoint a bit so that hopefully you slide right into the target temp without too much overshoot).

Once you start tweaking on all three it gets interesting. Usually I just use P until I get it with the smallest oscillations I can, and most of the time this is good enough. I adjust D until it counteracts — this usually will result in the controller stabilizing somewhere in the oscillation band but not quite at the target setpoint. If I need it to be more exact than that I adjust I so that it can nudge the control from that stable point to the correct set point.

You certainly have more experience with them than I do.

While I have spent years in manufacturing, I have yet to encounter any PID based systems. My knowledge is more theoretical.

I'm curious, have you tried it for computer cooling?
 
You certainly have more experience with them than I do.

While I have spent years in manufacturing, I have yet to encounter any PID based systems. My knowledge is more theoretical.

I'm curious, have you tried it for computer cooling?
Have not created the opportunity to use it for computer cooling. As you mentioned, there aren't exactly a lot of PID based controllers out there for computer applications, and most of the industrial ones I deal with would be fairly overkill for computer cooling purposes. Not that they couldn't do it - the controller is the same if you would be cooling a computer versus a 2,500hp generator or 600T freezer system... it's just that controller costs anywhere between $200-$10,000. When you're running equipment that costs into the millions, that's a drop in the bucket. When you're running a $25 Noctua fan, it's pricey, even on the low end.

I've been very tempted to roll one based on an RPi though.
 
This technology has been used to control industrial process coolant loops forever. It's use in PC's has been more limited. The only application I am aware of is in Aquacomputer Aquaero devices, where you can create a fan curve, or you can instead select what they call a "Setpoint Controller". They have several presets, but you can also choose "User Defined" and input the PID values manually.
Coming back to this - I'm thinking it'll be worth a shot.

I've been wondering how to control... well, everything involved. Biggest challenge up to this point is actually reading memory temperature off DDR5 modules enough to drive a fan, as a lot of software simply cannot read it yet. Except HWINFO64, for whatever reason.
 
Coming back to this - I'm thinking it'll be worth a shot.

I've been wondering how to control... well, everything involved. Biggest challenge up to this point is actually reading memory temperature off DDR5 modules enough to drive a fan, as a lot of software simply cannot read it yet. Except HWINFO64, for whatever reason.


This is something I have not read up on yet, as I am not living in a DDR5 world myself yet.

The Aquaero software can read lots of different sensors off the system, and it is seemingly constantly updated, so it wouldn't surprise me if DDR5 is either already in there, or on the way.

That said, I'm not sure RAM temps are something I would really worry about.

Don't get me wrong. I have read that DDR5 gets hotter than previous RAM, and as such might warrant cooling, in extreme cases even water blocks (as crazy as this sounds)

Even so, I can't imagine the RAM would produce more heat than the CPU or GPU, so if in a liquid loop, I'm going to go out on a limb and guess that if you target a setpoint on the GPU and/or CPU (which I never do) you will automatically have enough flow and fans over the RAM to take care of it.

That said, in a water loop that is never what I do. I usually max out each component in isolation to baseline things. Then I measure both the water temps and the core temps of the GPU and CPU and establish their delta above the water loop temp. Then I decide which temps I want on my cores, and set a target water loop temp to be either "desired CPU core temp" - "Delta to Water of CPU at max load" or "desired GPU Core temp" - Delta to water of GPU at max load", whichever is lower.

Even if you have a big honking passive heatsink on the ram, I think you'd probably do a pretty good job of incidentally cooling it with case fan and CPU fan speeds, without a need for separate controls. How often do you really beat the **** out of your RAM without at the same time loading up your CPU?
 
Become a Patron!
Back
Top