TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Better PC cooling with Python and Grafana

258 pointsby naggieabout 1 year ago

26 comments

dvdkonabout 1 year ago
It&#x27;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&#x27;t very intuitive.<p>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.<p>I started a fan controller project some 4 years ago and it&#x27;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...
评论 #39586004 未加载
评论 #39585426 未加载
评论 #39589649 未加载
评论 #39586862 未加载
评论 #39592050 未加载
评论 #39590006 未加载
jerrygenserabout 1 year ago
Another thing I&#x27;ve had great success with on my AMD 7700X is to use AMD Ryzen Master to reduce the TDP.<p>The chip comes to consumers overclocked by default with a TDP of 105W. I suspect this is the case so that it can beat Intel on benchmarks on &quot;default&quot; settings.<p>You can set it to &quot;eco mode&quot; and have it run at 65W or 45W TDP. Under load, this only results in like a 5% reduction in performance for a dramatic reduction in electricity consumption, fan speed, heat, etc.<p>Not sure if the 5500x series chips are overclocked but using eco mode could be a good approach.
评论 #39584333 未加载
评论 #39586015 未加载
评论 #39583253 未加载
评论 #39588003 未加载
评论 #39586284 未加载
评论 #39583126 未加载
评论 #39583777 未加载
评论 #39584808 未加载
mckirkabout 1 year ago
For people that want to do something similar on Windows, I can wholeheartedly recommend FanControl [1]. It&#x27;s sadly not open-source, but it works great, and is quite pleasant to interact with.<p>[1]: <a href="https:&#x2F;&#x2F;getfancontrol.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;getfancontrol.com&#x2F;</a>
评论 #39587188 未加载
评论 #39587179 未加载
评论 #39585859 未加载
评论 #39592105 未加载
评论 #39583353 未加载
评论 #39583110 未加载
kelvieabout 1 year ago
I&#x27;ve been using an esp32-based fan controller with esphome and inlined C++ for my waterloop for a while, with a custom (but super simple) temp control algorithm as well:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;kelvie&#x2F;esphome-config&#x2F;blob&#x2F;master&#x2F;pc-fan-control-1.yaml#L158-L188">https:&#x2F;&#x2F;github.com&#x2F;kelvie&#x2F;esphome-config&#x2F;blob&#x2F;master&#x2F;pc-fan-...</a><p>The main reason for doing this was so that I didn&#x27;t have to connect the controller to my main PC via USB to program it (I can change the target points via MQTT&#x2F;wifi).<p>Playing around with this stuff on my laptop I&#x27;ve also noticed that you have to be careful what calls you make when querying system status on a loop, some things (like weirdly, `powerprofilectl get`) even when called every 5 seconds drains a surprising amount of battery, so in a sense, your tool may start to affect the &quot;idle&quot; power consumption somewhat, and you need to test that.
评论 #39588564 未加载
hnuser123456about 1 year ago
Please do some measuring of core temperature response to load before and after re-pasting &#x2F; upgrading the thermal compound. Something between a large grain of rice and a pea, and I like to clean the CPU and cooler cold plate completely, paste the CPU, then press and smear around the cooler onto the CPU before mounting it, to ensure full surface area coverage with a thin layer of compound.
评论 #39583363 未加载
评论 #39583025 未加载
belterabout 1 year ago
Another way to help with cooling...&quot;Energy Efficiency across Programming Languages&quot; - <a href="https:&#x2F;&#x2F;greenlab.di.uminho.pt&#x2F;wp-content&#x2F;uploads&#x2F;2017&#x2F;10&#x2F;sleFinal.pdf" rel="nofollow">https:&#x2F;&#x2F;greenlab.di.uminho.pt&#x2F;wp-content&#x2F;uploads&#x2F;2017&#x2F;10&#x2F;sle...</a>
评论 #39584849 未加载
评论 #39588472 未加载
评论 #39584761 未加载
PeterStuerabout 1 year ago
Why is there so much dust on the radiator? Is he sucking hot air through the fins into the pc, or is there soooo much dust inside the case that this is actually the radiator being so saturated with it that it is starting to ooze out?<p>Either way there seems to be a serious problem with unfiltered air being sucked into the case here. That radiator isn&#x27;t going to radiate if it is wearing a furr coat.
voidnapabout 1 year ago
&gt; I’ve played with PBO2 adjustment as I said, but it should be possible to reduce the voltage at the expense of a bit of performance.<p>Undervolting with PBO2 should not decrease peformance unless you have done something very wrong.<p>Ryzen CPUs have limit, max temperature, frequency, power, and voltage. The voltage curve follows a frequency curve so higher clock speed requires a higher voltage. A negative offset in PBO reduces the voltage required for a given frequency. It shifts down the voltage curve. Lower voltage typically means less heat and power draw so you can achive a higher clock speed without hitting temperature, power, or voltage maximums.<p>If your system is stable when undervolting you don&#x27;t see a loss in performance, generally it improves because you are able to reach higher clock speeds before running into voltage or power limits. The exception is if you induce a rare issue called clock skew at extreme cases that i&#x27;m not even sure you can do with PBO2.
js2about 1 year ago
I geeked out on something like this for my TrueNAS server setting fan speed based on drive temperature with a PID controller. e.g.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;dak180&#x2F;TrueNAS-Scripts&#x2F;blob&#x2F;master&#x2F;FanControl.tool">https:&#x2F;&#x2F;github.com&#x2F;dak180&#x2F;TrueNAS-Scripts&#x2F;blob&#x2F;master&#x2F;FanCon...</a><p>(That&#x27;s not mine. I think I wrote a variation in Python.)<p>Then I realized: my server is in the unfinished part of my basement where I can&#x27;t hear it anyway. Let&#x27;s just run the fans at 80% speed all the time since that&#x27;s sufficient to keep the drives cool.
craftomanabout 1 year ago
Better cooling with Python, Grafana, Prometheus on top of Kubernetes with enchanted AI. Who needs PID these days?
asmorabout 1 year ago
Didn&#x27;t pick the right fans for going extra slow. These run at 1700 RPM by default, whereas Noctua has a version - even in the redux line - that runs at 1200 RPM. Though the non-redux like gets even slower - so much that Noctua includes a &quot;low noise adapter&quot; (presumably a resistor).
whywhywhywhyabout 1 year ago
&gt;I presume the quick temperature rises are specific to modern Ryzen CPUs, perhaps others too. Maybe this is due to more accurate sensors, or even a less-than-ideal thermal interface.<p>It’s because the cpu is designed to push itself to a thermal limit and have its output performance decided by how you keep it at that limit so it essentially goes full throttle to 90deg then slows down if your cooling can’t keep up which causes the fan spikes.<p>So I’m told from the research I did.<p>My latest machine had the same issue but just updating all drivers, setting some auto curves and adding easing for the fan spin up time completely solved it.
pstratemanabout 1 year ago
This is pretty cool but honestly just setting the pump speed to a constant that&#x27;s not annoying and setting the fans to a constant that&#x27;s not annoying is likely to get the same result.
lreevesabout 1 year ago
What an awesome post! I recently built a new PC based on workstation parts that frustratingly didn&#x27;t expose the actual CPU temperature except in the IPMI interface; I was starting to hack something together with Netdata and ipmitool but then I saw this post and in a couple hours had a Grafana ingesting the ipmitool sensor output every 10 seconds or so. Thanks!<p><a href="https:&#x2F;&#x2F;i.imgur.com&#x2F;KDeHgFY.png" rel="nofollow">https:&#x2F;&#x2F;i.imgur.com&#x2F;KDeHgFY.png</a>
a_vanderbiltabout 1 year ago
My problem is that I just don&#x27;t want to think about it. Complex solutions are cool but ultimately it&#x27;s bandwidth I could use for better things. I like my Chromebook because it requires nearly zero mental effort. I install the package and I use it. Ubuntu was great because you could Google it and get an answer that applies, and ChromeOS is great for the same reason. Linux could be as great as macOS, but it&#x27;s the fragmentation that kills it.
评论 #39588214 未加载
then4pabout 1 year ago
I had very similar issues with my nzxt AIO and a Ryzen 5900X. What annoyed me the most is that other vendors offer water temperature based fan control by default. This makes NZXT AIOs basically unfit for modern CPUs and I don&#x27;t understand why they&#x27;re recommended and well reviewed.<p>I switched to a Fractal Celsius and its default setting is to control pump and fan speed by water temp. Problem solved.
NwtnsMthdabout 1 year ago
Has anyone tried a controller for cooling that is dependent on processor current consumption? Temperature measurements lag, but the current used by the processor is instantaneous and directly converted to heat (P = VI). In theory, it should be possible to reduce temperature spikes.
Arch-TKabout 1 year ago
With a Noctua NH-D15 and about 30 minutes spent tweaking the motherboard fan curves I was able to get my 5950x to not thermal throttle without producing any noticeable fan noise.<p>This seems extremely over-engineered and sounds like it could have been solved by using Noctua or similar quiet fans.
评论 #39584039 未加载
评论 #39587482 未加载
cinntaileabout 1 year ago
It says 5959x in the article but it should be 5950x.
hernandipietroabout 1 year ago
I just use FanControl , and I&#x27;m very happy with it. Windows only, unfortunately.
anticodonabout 1 year ago
On AMD it helps to have pretty recent kernel and amd_pstate=active string in the kernel boot params. I haven&#x27;t checked the temperatures but I think I&#x27;ve started to hear the fan noise less after enabling it. This option was finally implemented in kernel 6.1 or 6.2. I don&#x27;t remember the exact version, it happened only 1-1.5 years ago.
naggieabout 1 year ago
I got annoyed at my fan speeds so decided to experiment with controlling my fans with Python and measuring the results.
评论 #39583023 未加载
评论 #39583033 未加载
评论 #39589043 未加载
derpedabout 1 year ago
Don&#x27;t know if someone mentioned it or not so I just drop it here: <a href="https:&#x2F;&#x2F;getfancontrol.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;getfancontrol.com&#x2F;</a>
AceJohnny2about 1 year ago
In conclusion, this is why Systems (Thermal) Control is a profession.<p>Not dissing on the author&#x27;s efforts, quite the contrary! But they demonstrate the rabbit hole that is second order effects (like multi-fan beat frequency) and number of parameters to take into account (like &quot;... <i>A solution to [when to enable Passive Mode] may be to detect if the computer is in use (mouse movements)</i>&quot;)
评论 #39583630 未加载
selimnairbabout 1 year ago
Who has time for all this rigamarole. Just use an ARM CPU.
ltbarcly3about 1 year ago
Just buy a large AIO water cooler. Replace the included fans with Noctua. That is the full story of how I made my computer silent despite having a CPU with a TDP of over 200W.
评论 #39584560 未加载
评论 #39586906 未加载