frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Predictive Thermal Management for a Production Phone Server

2•DaSettingsPNGN•3mo ago
I would like to present a thermal management system I have been working on. The idea was that I wanted to run a production Discord Bot on my S25+ rather than paying for a traditional server. I ran into the Samsung throttle wall: at 42 degrees Celsius for battery temperature, Samsung will hard throttle your phone down to 50% performance until it regains a more moderate temperature. This is by definition reactive, and can cause a spiral. Lower performance increases the duration of my renders, this heats my phone even more, and it never recovers. I propose a different method: predict thermal events before they happen, model the internal thermal properties of the different cores on your phone, and use Newton's Law of Cooling with thermal "banking" (having tasks wait to start for enough thermal overhead that it can successfully complete) and with using persistent learning to model how much thermal headroom you actually need for each action your bot takes.

The key is realizing that temperature is not a discrete event. Using sensors to measure the temperature now does not tell you how it will increase or decrease in the near future. Predictive intelligence is entirely possible when using thermal mass, knowledge of your hardware constraints, knowledge of your thermal effects from your bot, and preparing for thermal events BEFORE they happen, not when they do. This keeps your phone under the thermal throttle limit perpetually, which translates to improved performance, battery life, hardware life, and user experience.

Implementation includes using public facing sys reads and Termux API to monitor core temperatures in real time (non-root), and using physics and past data from your actual bot use to predict thermal impacts and how you can prevent them before they even happen.

The main principle is modeling your phone as a interconnected system with fluid states, not discrete events that end up being locked into either throttling or not-throttling.

I am sharing this to discuss my model with engineers and physicists, to see if my thermal model can be improved at all, to see if my code can be improved at all, and to see if it would be of use to anyone else who would like to run a production server on a flagship phone without rooting it or melting it. All feedback appreciated. I'm available to help teach my software practice as well: I code through a physics lens. Computers obey physics too, as much as they seem to not want to admit it.

GitHub: https://github.com/DaSettingsPNGN/S25_THERMAL- Discord: @DaSettingsPNGN