Live data from Hacker News

Building a macOS app to know when my Mac is thermal throttling

stanislas.blog

11–20 of 123 posts

Re: Building a macOS app to know when my Mac is thermal throttling

#11
post #8
post #7

Earlier quoted context omitted.

I 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!

You 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.

Yeah I’m on a MacBook Air, so no fans.

Re: Building a macOS app to know when my Mac is thermal throttling

#14
post #10

There is a problem/bug with thermal pressure notifications. Did you stumbled upon such issue with your app? https://github.com/macmade/Hot/issues/73

Ah! 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)

Re: Building a macOS app to know when my Mac is thermal throttling

#15
post #12

You 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

Yeah! 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

Re: Building a macOS app to know when my Mac is thermal throttling

#16
post #10

There is a problem/bug with thermal pressure notifications. Did you stumbled upon such issue with your app? https://github.com/macmade/Hot/issues/73

Ah! 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)

Thanks, I will check your approach. And your app as well, looks beautiful and useful.

Re: Building a macOS app to know when my Mac is thermal throttling

#17

This would be a really useful thing to indicate via an unobtrusive LED on the chassis somewhere.

Why 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.

Re: Building a macOS app to know when my Mac is thermal throttling

#18
post #2

Seems 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?

> 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 ) 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/…

An 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.

Re: Building a macOS app to know when my Mac is thermal throttling

#19
Another 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.

Re: Building a macOS app to know when my Mac is thermal throttling

#20
post #2

Seems 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?

> 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.

Post reply on HN