9 ms·
Building a macOS app to know when my Mac is thermal throttling
- SebFender 9mo agoI may be mistaken - But the Hot App has been doing this for a few years if I remember correctly - In more than one way as it supports past and current architectures...
- Neywiny 9mo agoSeems like good work. From what I've heard developing on MacOS has not gotten easier over the years. I do question the point, though. I suppose there's merit in knowing if your configuration causes thermal throttling, but what are you able to do about it? There's no fan profile to tweak or anything. Can you undervolt them?
- jtbayly 9mo agoI wanted this app to exist. Now it does! I sometimes face thermal throttling because a process has gone wacko, and all I have to do is kill it. But first I have to notice it. I rarely notice until half my battery is gone!
- Neywiny 9mo agoYou know what, fair point. I know because my fans go haywire (except that one time my fans decided to just not work until I ran some incantations. The joys of Linux). If you're passively cooled, you get no feedback on CPU load. Makes sense.
- jtbayly 9mo agoYeah I’m on a MacBook Air, so no fans.
- angristan 9mo agoIndeed, that's why apps like iStat Menus, Stats, Sensei etc (for macOS at least) are very useful, I keep the CPU usage and power usage in my menu bar at all times, this is very useful on battery. For example I know that my Macbook Air idles at ~2W-5W, so if I'm doing nothing special and it's using 15W, a process is doing some funny stuff
- amelius 9mo agoYou can move to a colder place or turn the room temperature down.
- angristan 9mo ago> but what are you able to do about it? On Macbooks with fans, I started tuning my fan curve with iStat Menus (https://bjango.com/help/istatmenus7/fans/#custom-fan-curve https://bjango.com/help/istatmenus7/fans/#custom-fan-curve) because I noticed the default curve was lagging behind and thermal throttling kicked in before the fan even reach max speed. For Apple Silicon specifically, I recently discovered that there is a "high power mode" (https://support.apple.com/en-us/101613 https://support.apple.com/en-us/101613) that allows the fans to run at higher speed. So I don't use the custom fan curves anymore, it helped me a lot (but it does get quite noisy on a 14" M4 Max) For a Macbook Air, not much you can do besides closing stuff, or elevating the macbook and pointing a fan at it or things like that... but yeah it's a bit desperate!
- somat 9mo agoAn open question on fan curves Environment: I am currently playing with a pid control function for my gpu fan, that is instead of saying "map temp x to fanspeed y"(fan curve) say "set fan to speed needed for temp z"(pid control) Question: is there a reason pid type control is never a thermal option? Or put another way, is there something about the desired thermal characteristics of a computer that make pid control undesirable? As a final thought, I have halfway convinced myself that in a predictable thermal system a map would match a set of pid parameters anyway.
- embedding-shape 9mo ago> "set fan to speed needed for temp z"(pid control) Why though? I generally don't care about the specific temperatures of my CPU and GPU, just that they don't get too warm, so for the CPU (AIO) I basically have "0% up until 45C, then increment up to 100% when it hits 90C" and the same for the GPU except it's always at 10%. I guess I could figure out target temperatures, and do it the other way, but I'm not sure what the added complexity is for? The end results (I need at least) remains the same, cool down the hardware when it gets hotter, and for me, the simpler the better. I also have two ambient temperature sensors in the chassi itself, right at the intake and the outtake. The intake one is just for monitoring if my room gets too warm so the computer won't be effective at cooling (as the summers here get really warm) and the outtake one is to check overall temperature and control the intake fans. In reality, I don't think I need to do even this, just the CPU+GPU temperature + set fan speed based on that feels simple enough to solve 99% of the things you'd like to be able to do here.
- nicoburns 9mo ago> but what are you able to do about it Quit some apps probably. I often have a bunch of stuff running in the background that I haven't bothered to close yet. It also sounds like it'd be good for detecting software that's gotten stuck in a busy loop or similar. And/or possibly take a tea break while it chills out.
- embedding-shape 9mo ago> but what are you able to do about it? Depends on the environment, back when I had a MacBook, they still had fans, but the new ones are all passive, I think. So then the surface (or lack of it) below it would matter the most. If you keep it in your lap, on top of a hairy blanket, it'll be a lot effective at getting rid of the heat compared to if you have it sitting on a stone table, as just one example. Edit: Seemingly the split of Air/Pro being passively/actively cooled seems to still apply today, so then checking fans, their performance and intakes/outtakes for chaff tends to be the best way, if you have a Pro.
- vunderba 9mo agoI've been using Macs-Fan-Control since I picked up a Mac M1 a few years back and it works great. It lets you control the fan RPM based on CPU Core values. I adjusted it to ramp the fans up at more conservative values because otherwise during intense usage periods it would hit 90C+. https://github.com/crystalidea/macs-fan-control https://github.com/crystalidea/macs-fan-control
- giancarlostoro 9mo agoI use TG Pro on my Macbook Pro to auto-cool my Mac. It drives me crazy that Apple lets your Mac burn to a crisp before kicking on the fans.
- varenc 9mo agoIs Apple actually letting the Mac burn to the point at which it has damage or other negative consequences? I've definitely observed they delay the fans until they're absolutely needed, but I trust their thermal management to not actually cause harm. (besides a warm lap)
- giancarlostoro 9mo agoI'm not sure, but I know I'm not the only one who is concerned about how hot it can get long before the OS kicks on the fans. https://www.reddit.com/r/MacOS/comments/1kmacsf/macbook_pro_m4_pro_is_hot_but_fans_arent_turning/ https://www.reddit.com/r/MacOS/comments/1kmacsf/macbook_pro_...
- deleted 9mo ago[deleted]
- deleted 9mo ago[deleted]
- deleted 9mo ago[deleted]
- sys_64738 9mo agobrew install stats
- nazgu1 9mo agoThere is a problem/bug with thermal pressure notifications. Did you stumbled upon such issue with your app? https://github.com/macmade/Hot/issues/73 https://github.com/macmade/Hot/issues/73
- angristan 9mo agoAh! Yeah I did notice that using `ProcessInfo.processInfo.thermalState`, the state didn't update unless I restarted the process (reproducible even with a swift script). But this issue doesn't happen with the technique I use right now (the thermald notification)
- twilo 9mo agoYou can just ping your CPU usage to the menu bar and monitor that. I have CPU and total system wattage up there so I always know if something weird is going on. https://github.com/exelban/stats https://github.com/exelban/stats
- angristan 9mo agoYeah! That's how I initially suspected that it was thermal throttling because I saw in iStat Menus that my wattage was going down for a constantly high CPU usage
- rkagerer 9mo agoThis would be a really useful thing to indicate via an unobtrusive LED on the chassis somewhere.
- echoangle 9mo agoWhy would you take an LED over something on the screen? The notification is only really relevant while the laptop is open, and the screen is going to be on anyways.
- alexford1987 9mo agoThere is no way Apple would do this on a MacBook Air, which is able to be passively cooled because of the type of use cases/users it is primarily designed for, most of whom never hit throttling. The light would only confuse almost everyone.
- mschuster91 9mo agoAnother thing to keep in mind with MacBook Pro models or any other device that has fans... if you have cats, dogs or other heavily shedding animals, you must regularly (for me, once a year, for people with German Shedders more like once a quarter) open them up and thoroughly clean them. The amount of fur that manages to squeeze everywhere is insane.
- vunderba 9mo agoHusky/Pyr owner here - I have to systematically blow out all of my electronics because she molts enough fur to start my own Etsy brand of stuffed animals. The WORST thing, though, is that all her fur makes its way into all my musical instruments, including underneath each individual key of my upright piano (now effectively a felt piano).
- the_black_hand 9mo agoMy 2017 macbook is basically brick. Crazy how just opening chrome sets off fans like a jet engine. How much cpu can checking gmail really use? Foolish me is considering buying a new macbook this year. I have no choice because Apple and Microsoft will do everything in their power to ship the shittiest personal computing products every year.
- lanyard-textile 9mo agoThe butterfly keyboard of that era was a large enough signal, to me, that high quality engineering results were compromised. They produced a laptop that you can't type efficiently on?? That misses key strokes?! I had to slow my typing on those keyboards! So, imagine the incredible contempt I have had for Apple for failing such a basic delivery. Still, their new silicon machines managed to turn my opinion around -- quite the 180. The speed improvement is genuinely remarkable, and the modern build quality otherwise seems excellent to me. It's worth another try imo.
- Arn_Thor 9mo agoI'm sorry you're saddled with an Intel Mac. The Apple Silicon Macs really changed everything. Clearly Apple is capable and willing of shipping extremely good and performant hardware, even though historically they haven't always done so. I do blame Intel for their monopoly on mediocraty for the late-10s Macbooks though.
- bigyabai 9mo agoNow put Linux on it. Just like new!
- throwaway270925 9mo agoYeah, 2016-2019 were severely cooling constrained unfortunately. If you want to keep using it (maybe not as your main machine) there are some workarounds and fixes: The simple software only way is to deactivate Turbo and/or HT. Less performance but also less power use meaning less heat. And checking gmail or browsing the web you probably wont notice much of a difference. Or you can open it up and add thermal pads to your VRMs, finally giving them adequate cooling. Just dont touch the bottom of your macbook afterwards or rest it on your bed or couch, that thing can get hot!
- marksomnian 9mo agoSite appears to be hugged to death, repo is: https://github.com/angristan/MacThrottle https://github.com/angristan/MacThrottle
- angristan 9mo agoOops, I fixed it, I have not very important Cloudflare Workers in front of the blog (which is on Cloudflare Pages) and somehow they were in fail closed mode and not fail open :(
- brikym 9mo agoI have had back luck with them intermittently losing routing. Sometimes re-creating the worker fixes weird issues.
- angristan 9mo agoThis one is my bad, I've exceeded the 100k free reqs/day (for https://stanislas.blog/2025/02/redirect-dead-links-hugo-images-cloudflare-worker/ https://stanislas.blog/2025/02/redirect-dead-links-hugo-imag...), and I didn't enable the setting to bypass it over that limit
- edwardtay 9mo ago[flagged]
- widhhddok 9mo agoThe account that posted this comment seems to be a bot account - and one that doesn't even read the article in it's context.
- ChadNauseam 9mo agoOne thing that annoys me about LLMs is how they say stuff that's dumb but sounds smart. For example: > Have you considered adding historical tracking/graphing? Being able to see throttling patterns over time would be super valuable for understanding workload impacts and diagnosing thermal issues Would it actually though? Is anyone going to ever check if their laptop was throttling at 6pm yesterday evening and then remember what they were found at that time and try to "understand workload impacts"? It's the type of thing that might come in kinda useful once in a while, not "super valuable". Idk, I notice this trend with LLMs a lot. Often what they say just doesn't really make sense when you think about it.
- angristan 9mo agoAgreed, half of these questions are answered in the post. Also, looking at the account's comment history confirms that it's karma-farming with comments or something like that
- carterschonwald 9mo agoMac fan control seems to track component temps which is pretty nice
- e40 9mo agoHe could get notarization and code signing for free if he puts it into Homebrew. I would love to get it via that distribution mechanism.
- angristan 9mo agoOh really? TIL, I thought it was dependant on the app developer. I can look into it, thanks!
- xenonite 9mo agoThis is great to hear. Is there a similar free way for getting Windows signatures?
- beaugunderson 9mo agoI have not found one since the CA/BF voted to require hardware security modules for signing certificates. The cheapest option for an individual is via Microsoft, $10/month and a relatively painless identify verification lets you do cloud signing. They have enabled and disabled signups for the individual option, though, and it's unclear if it will be there permanently. Other options are ~$300/year and up. Also annoying is that Azure cloud signing works on GitHub Windows runners but not GitLab ones.
- c0wb0yc0d3r 9mo agoI’m not super familiar with windows code signing anymore but fewer people care about it on windows (because it isn’t required). It’s definitely a small hurdle to be sure but I think you’d really only lose out on enterprise users at that point. I think code signing might only matter if the installer is built in certain ways (i.e. it’s an exe instead of using an msi to install, if someone knows better please correct this). If your target is enterprise users convince IT users of its value and they will eventually make exceptions in their orgs for it no matter what signed or not.
- luxuryballs 9mo agoThis is the type of software you hope Apple will “Sherlock” and bake into the OS!
- gigatexal 9mo agoneat! got it installed. thank you. you could easily put this in the App Store (maybe?) and I'd have thrown a few bucks your way.
- tombert 9mo agoI had the 2019 Macbook Pro i9, so I think a function to determine thermal throttling could be written very simply: function isThermalThrottling() { return true; } Seriously, I loved that computer for the most part but I was a little annoyed that I paid a lot of money for the i9 CPU just to get worse performance than the i7.
- merb 9mo agoI had that problem as well. Especially when connected to two external monitors. I did not love the machine and the M1 Max was such a big upgrade because of that and I could upgrade to the m3 max later and give my m1 to somebody else. Both apple silicon machines are going strong for a long time I guess.
- LoganDark 9mo agoI had a Mid-2015 MacBook Pro with an i7 and I still ran the fans at full speed at all times (actually above full speed). I had a couple fan failures due to that, but otherwise I think it was worth it.
- j45 9mo ago2014-15 were among the best macbooks ever made. All laptops fail eventually from pushing them extremely hard.
- lbourdages 9mo agoI had that laptop and it is the worst computer I have ever owned. As soon as you booted the fans would start spinning. There were sometimes kernel panics when plugging or unplugging Thunderbolt devices. I have an M1 Max MBP now and it has been absolutely perfect.
- thedougd 9mo agoSame! Still have it as a side machine. My favorite and most painful issue was a bug in USB charging. Sometimes it would fail to charge from my monitor (USB-C) yet it would believe it’s connected. The battery would eventually run to zero and the machine would shutoff without warning. No low battery warning would be shown because it believed it was charging however it was not. Resolved with my M3. Also fun with that generation is that you can’t plug in a dead laptop and start using it right away. Takes about ten minutes of charging before you can power it on. Also fun, it would not establish power delivery with my monitor in this state. I’d have to plug it in with a regular charger to bootstrap it. Also resolved with my M3. Now that it’s aged, the super capacitor for the clock no longer holds charge and the time is usually wrong on cold boot. I wish that was serviceable.
- atymic 9mo agoFound https://github.com/macmade/Hot https://github.com/macmade/Hot which works for my intel mac :)
- tamimio 9mo agoThanks for sharing it, will try it now. I found an iMac 2017 the other day at the thrift store for $20, it’s been very good so far but will see if it throttles or not.
- scottlamb 9mo ago> I know it’s thermal throttling because I can see in iStat Menus that my CPU usage is 100% while the power usage in watts goes down. There's another possibility. If your battery is low and you've mistakenly plugged it into a low-power USB-C source (phone charger), you will also see 100% CPU usage, low power usage, and terrible performance. Probably not the author's problem, but it's been mine more than once! It might be worth adding something to detect this case, too. You can see your charger power under "System Information"; I assume there's an API for it also.
- angristan 9mo agoInteresting, yeah iStat Menus reports the wattage of the charger, sometimes I've charged my mac with like a 5 or 10W charger and I didn't have that issue But now that rings a bell, I think a coworker had that issue recently. I wonder why that happens
- hinkley 9mo agoWhile I have definitely done this a few times, one of my MacBooks could draw more power than the power supply could deliver and there was a particular computer game that I discovered I could “only” play for about five hours before the laptop shut itself off. Because it was having to draw supplemental power from the batteries to keep up. IIRC the next generation of MacBook was the one that came with the larger power brick, which didn’t at all surprise me after that experience. Then they switched to GaN to bring the brick size back down.
- morning-coffee 9mo ago> I know it’s thermal throttling because I can see in iStat Menus that my CPU usage is 100% while the power usage in watts goes down. When I read this I wondered "Why isn't core temperature alone not a reliable indicator of thermal throttling?". Isn't that the state variable the thermal controller is directly aiming to regulate by not letting it exceed some threshold?
- angristan 9mo agoMy M4 Max Macbook Pro can run for a while at like 105°C and fans to the max before throttling, when it starts throttling it doesn't exceed that threshold, and then the temperature goes down for a while before throttling stops
- tonymet 9mo agoI hope this great tutorial encourages more developers to build native apps. Still the best development and consumer experience .
- Bad_Initialism 9mo agoIt won't run on a MacBook Air M1 running Sonoma. Only Tahoe. Come along with me! We'll destroy the planet so fast that we'll all be cinders before you know it. All we have to do is gobble the marketing speak so fast and make everything shiny and new, and we'll all be dead before you can say "Greta Thunberg." Come die with me for thin and for stylish. Kill the animals with me for "sleek". Die. With. Me. Now! I made an app!
- angristan 9mo agoI merged https://github.com/angristan/MacThrottle/pull/2 https://github.com/angristan/MacThrottle/pull/2 to make it work on macOS 15. macOS 14 probably works, feel free to try it out and open a PR to lower the required version if it's the case
- ksec 9mo agoI really wish Apple uses Vapour Chamber cooling for next MacBook Air M5. On my MacBook Pro, I have come to the conclusion that Apple priorities low noise level over heat dissipation. And I have my Mac fan control to have a minimum fan speed.
- motoboi 9mo agoVapor chamber only helps with bursts of usage. It’s just that the heat gets transferred faster. Transferred where is the correct question to ask. To the aluminium body is the answer. Now, how much time it takes to heat that body completely (ie: to reach equilibrium with the environment) and once in equilibrium, how much joules (or watts) can the body dissipate into the environment without burning the person’s lap is the point they are optimizing for here. If you have fans, then the heat transfer is solved, hence no vapor chamber needed, just a large copper plate to be that buffer and then wind takes heat away. So, no magic here. Energy in must be equal to energy out.
- ksec 9mo agoI am aware of that, I am of the opinion that MacBook Air provides too little time for bust usage. Or in a perfect world Apple could make the MacBook Pro super thin but with fan. Right now I think the Air is better in terms of weight.
- motoboi 9mo agoHypothesis: it’s not the CPU, it’s the USB controller saturating the thermal mass. So instead of the CPU or GPU going bonkers, the body gets too hot and they lose thermal dissipation capacity for the normal usage and then overheat and then throttle. They go 100% on the graphs because the throttling reduces frequencies and then load becomes too heavy. Experiment other adapters and monitors.
- scarecrowbob 9mo agoSwitching which side I charge my 2019 mbp i9 effectively solved my throttling issues, so your premise might be correct as I understand it.
- Coeur 9mo agoThat's interesting, could you tell me more? Like which side and port (front/back) was throttling, which side and port was not? Were you using a power supply to charge or was the mbp connected to a display? Did it only throttle during charging or also during while fully charged? Thanks!
- scarecrowbob 9mo agoAccording to a response elsewhere on this thread, it's not an unknown problem and there are links to more specific answers than I care to write. But to answer your question, it throttled with either left-side thunderbolt ports, with nothing else plugged into the machine using the Apple-supplied charger. I cannot remember if this issue stopped when the device battery was at 100%.
- AceJohnny2 9mo ago> the body gets too hot and they lose thermal dissipation capacity for the normal usage aka "thermal soaking"
- deinonychus 9mo agoI'm not sure if I entirely understand your hypothesis, but I don't think it's 100% on the hardware - I don't think it's due to the hardware of the hardware. I also have an M2 Air and a few things seem to consistently make my machine get hot and chug and dump the battery. Idling with my machine plugged into my 4k 144hz monitor isn't an issue, but going on a Zoom call or having one too many video streams open while docked to the monitor will do it. Is my USB controller doing more "work" when I have a video stream open? I don't think so.
- dcrazy 9mo agoI’m curious why you used `@_silgen_name` to forward-declare the Darwin notification APIs. Does `import Darwin` not make them available?
- angristan 9mo agoIt doesn't seem like they are available with `import Darwin` indeed
- lloydatkinson 9mo agoDoes such a thing exist for Windows?
- villgax 9mo agoMissed opportunity to use that sweating/aheago emoji