Mobile Device Temperature

Hi,

I am developing a mobile game and I am encountering a problem with device heating up too fast. I did a test with my samsung galaxy s5 and s8 and they result in the same heat level when playing my game. The first test I did was leaving the device with my game on simulating the physics that the game uses and deactivating the “game over” so that I could see how much the game was going to resist the heat without restarting the game play. When I started the test my device temperature was 35 °C and after leaving my game on playing for 15 minutes the temperature of the device reached 40 °C whithout lagging at all. So the perfomance of the game was good. Next, when the device was cool again I did another test playing the game for 5 minutes. The temperature of the device was 36.6 °C and after 5 minutes it went to 39 °C. As you can see the temperature is very high. This doesn’t only happen with my game. I tried to play other games too and the same thing happened.
I live in Albania and these days have been too hot approximately 40 °C. Does it mean that the ambient temperature might be causing my device heating up ? It would be nice if you measured your device temperature while playing for 5 to 10 minutes any game and post it here.

I would be grateful to you,
Gerald.

I may be misunderstanding something here. Ambient temp is 40c and device temp is 39c. Seems like just having the device in a 40c ambient would raise its temp to 40c after a while even if you disassembled it and layed the pieces out on a table.

Having device temperature increase is absolutely normal when running a game as game engines like Unity will utilize at least one core of your CPU even if you don’t do much in your game logic.

2 Likes

That was my mistake because the room temperature is less than that. I was trying to say the temperature of the air outside and inside whithout air conditioner. Sounds confusing. :stuck_out_tongue:

That’s what I thought, but does it harm the device when the user plays the game a lot of time with high temperature ?

That’s how thermodynamics works. Although if the ambient temperature really is 40, that’s the temperature will be at at the start of the measurements.

Vaguely related engineering story

I remember one project where the engineer before me had said we needed extra cooling capacity to go from one shift operation to two shifts. He had determined this by tracking the temperature of the cooling water throughout a single shift, in which the temperature consistently increased by about 15C. This two shifts would increase the temperature by 30C, which take the process to dangerous levels.

When I was handed the project I questioned the math. It just didn’t add up.

Turns out that on the average day where the plant is located there is about a 15C swing in ambient temperatures between shift start at 6am and shift finish at 2pm. That’s a half a million dollar project we almost did because someone didn’t inderstand basic thermodynamics.

Assuming you keep the device in a constant environment, the amount of heat generated will be proportional to the amount of work you do. So if device heat up is a problem, the solution is to do less work. That might include:

  • Cutting back your frame rate (a 30 FPS game will generate about half as much heat as the same game at 60 FPS)
  • Using simpler shaders

Ultimately the device should have thermal protection that will keep you from melting, catching fire, or burning users. But I would try and take steps to avoid getting there in the first place. In general hardware is pretty blunt in its approaches to protecting from overheating, and will either crash your app or slow it down to unplayable frame rates.

Also note that the more heat you generate, the quicker you will drain battery. Which is also a concern on mobile.

3 Likes

Sustained temperature just below shutdown level may over time harm a device I dont know. I can say for sure that a samsung s5active which I use and every model of iPhone from 4s to current will shut completely down when too hot. I work on a farm outside in the heat in the southern central USA. Temps of 100f are not uncommon. If any of us leaves a phone laying out it the sun instead of our pocket, which happens regularly, it will overheat even when not active just powered on but on standby. Both the iPhones my boss uses and my Samsung show a screen warning when they are close to shutdown but not overheated completely. My bosses iPhone will not let you use it untill it cools off a bit but my samsung will let me clear the warning and keep going untill it gets hot enough to turn itsself off.

This is solid advice in my opinion.

This thread got me curious and I did some google searching. From what I see most cpu and gpu throttling starts in the mid 40c range some as high as 60. They also all throttle differently some shutting down one core or the small cluster completely while others just slow clock speed and leave all cores active. The hard shutdown temp is usually around 90c but by then the device has throttled to a point its nearly unusable anyway. Interestingly from what I’ve been reading batery temp is more of a limiting factor. The batery is more sensitive to temperature than the cpu and will cause a device to overheat and cause problems. The cpu can handle a temp higher than the batery. When the battery gets warm the cpu is in a higher temp environment overall and heats easier. It all goes together and cpu temp isn’t the only concern. From my limited amount of googling this morning it seems 40c is not unreasonable or harmful and will only cause throttling on a few of the available processors for smartphones.

An interesting side note : cold temps can shut a phone down also. Depending on the quality of the batery they will fail at different temps but for all phones there comes a point where the batery fails to function.

This is what I have experienced with my galaxy s5 and s8. They do not pass 40 °C temperature and sometimes when the device reaches this temperature level the moving objects in the game start jittering and this might be due to low fps caused by the cooling system of the device. When I optimized my game with less than 20 draw calls and used some mobile shaders, the moving objects in the game didn’t jitter anymore. Also, when using UI in my game the frame rate drops at least 8 frames to 10 frames per sec(from 60 fps to 50 fps). It has nothing to do with temperature but when the temperature reaches 40 °C the UI is stuttering so much.
Thank’s for the information. :wink:

I didn’t find a list of what device started throttling and what temp they throttled at. I believe the only method of cooling is to either throttle cpu, dim screen, disable components or through some other form of limiting through hardware. I am no hardware expert but I dont think there is any type of active cooling that takes place like a fan. There were some models that did throttle at temps below 40. 38c was the lowest I noticed. Differen devices with identical processors throttle at different temps also. With root level access on android it is possible to override the throttle temp settings and use your own values. You can even disable throttling all together and the phone will heat till it hits the hard limit and shuts down. From what I can tell the hard limit is part of the processor and built in with no way of disabling it. Maybe one of the hardware smart people could come on and clarify. You got me curious about just how much and when temp causes problems. I know an older amd graphics card in my previous desktop build started having heat problems when pushed hard and I assumed it was because the thermal pase was breaking down and it wasn’t cooling well. It would run at 90c with no problems. When it hit 100c i started getting graphical errors, funny looking misrendered textures and such. At 109c it failed completely and I had to shut it down and let it cool. Im just guessing here but I dont think you are getting anywhere near the level of heat it takes to damage components but it seems thats not the issue. The real problem is slowdown before failure. The device starts to throttle long before dangerous levels and for a game that needs the processing power that hurts almost as bad as a crash. Problem is I think that temp will be different for each device.

You are right, it depends on each device. The best I can do is optimize graphics and scripts that use too much cpu in order to prevent high temperature and performance drop on my game. Thank’s again for all the information. :wink:

I am looking for a way to find out which code segments in particular may be contributing towards the increased temperature. Is there a tool to do that for android? I notice that android studio has an energy meter but it does not give any details of what might be running when the temperature goes high. For iOS the XCode/Instruments does give a better correlation between energy usage and CPU/GPU.

Also does limiting the framerate to 30 ensure that it will never heat up? my device does seem to heat up despite the frame rate limit.

This thread is older than your account by more than two years.

No.

Android java api comes with some functionality that is supposed to provide you sensor reading but last time I tried to use it none of it worked in practice on normal device (and not in kiosk mode or whatever it was called). So the only thing you can somewhat reliably do is parsing sys/devices/virtual/thermal/thermal_zoneXXX files which is not fast and those are manufacturer-dependent and undocmented. There also can be a hundred of those entries.

Also, you won’t be able to detect “which code heats device up”, because it does not heat up in a sub-millisecond. The process is slow and has inertia.

Yes, that’s what happens when you use the device as it was intended.

As mentioned earlier, it’s just how much work your device is doing. More work = more heat.

So I’d look at the profiler, because that’s the tool Unity provides to see what parts of your code are taking longest, which often correlates to doing more work. To reduce heat you need to increase the amount of time your CPU and GPU’s cores spend idling.

No. 30 expensive frames may well require more work than 60 cheap ones.