cancel
Showing results for 
Search instead for 
Did you mean: 

Thermal Throttling?

sfaok
Level 4
My Unity game runs at 60 fps most of the time now, and the user experience is smooth for the first 10-15 minutes.

However after that, the frame-rate starts dropping until it's <50 and the experience goes from looking through a window to increasingly stuttery and unplayable.

Here I'm running the app for 15 minutes, fairly static scene:

----------------------------------------------------------
OVR_Plugin(30521): FPS:60 GPU time:11.1 ms
OVR_Plugin(30521): FPS:59 GPU time:11.1 ms
OVR_Plugin(30521): FPS:60 GPU time:12.9 ms
OVR_Plugin(30521): FPS:60 GPU time:12.2 ms
OVR_Plugin(30521): FPS:59 GPU time:11.1 ms
..
.. 15 minutes later
..
OVR_Plugin(31473): FPS:55 GPU time:11.6 ms
OVR_Plugin(31473): FPS:52 GPU time:11.5 ms
OVR_Plugin(31473): FPS:54 GPU time:10.4 ms
OVR_Plugin(31473): FPS:55 GPU time:10.0 ms
OVR_Plugin(31473): FPS:55 GPU time:11.3 ms
----------------------------------------------------------

This drop coincides with messages like this starting to appear:

I/ThermalEngine(377): Sensor:tsens_tz_sensor8:83000 mC
I/ThermalEngine(377): Sensor:tsens_tz_sensor7:87000 mC
I/ThermalEngine(377): Sensor:tsens_tz_sensor6:80000 mC
I/ThermalEngine(377): Sensor:tsens_tz_sensor5:86000 mC

-----------------------------------------------------------

For more information, here's the internal profiler at 0 and 15 mins: https://www.dropbox.com/s/i25xaaen7eipdrb/logcat_internal_profiler.txt
Unity profile : https://www.dropbox.com/s/c2goirnktnrhn2g/unity_profiler.jpg

I don't think there's anything too controversial happening in my app - as I said it hits 60 fps while the phone is cool and I believe I've kept to the advice in the user guide (50,000 polys, 100 draw calls max etc.)

My question is basically is there light at the end of the tunnel for this kind of problem or should we be optimising with this bottleneck in mind, rather than for t=0?
Developer of Ocean Rift. Follow me on Twitter @sfaok
4 REPLIES 4

drash
Level 7
My app runs pretty hot after a few minutes as well, but maybe I haven't run it long enough to notice a performance degradation yet.

OVR_Plugin(30521): FPS:60 GPU time:11.1 ms

If you don't mind me asking, how are you seeing these particular stats?
  • Titans of Space PLUS for Quest is now available on DrashVR.com

mohydine
Level 3
Hello Drash,

This log is always there. In a terminal, do:
adb logcat -s OVR_Plugin


Hope this helps,

Stephane

JohnCarmack
Level 3
Unfortunately, there is no solution for thermal throttling on the horizon -- the phone is reducing clock rates because it feels the temperature is about to cause internal malfunctions. While it is probably slightly conservative, I don't expect Samsung to move at all on the setting. In fact, they are distressed by the power consumption of apps that get to the point of thermal throttling.

We also don't know what the final characteristics of the Note 4 that will initially ship are going to be -- some factors should make it more power efficient, but other factors may make us use more power.

Aside from just doing less work, we do have the ability to artificially reduce the clock rates on a per-app basis, which can somewhat help with power consumption and thermal load. If your app can run with 1.4 GHz clocks, it will run cooler than if it was using 1.7 GHz clocks and sleeping for the remainder of the time. We don't have this exposed in Unity yet, and I'm not 100% positive it is properly functional in the firmware that shipped with the GS5 phone dev kits. You could try hacking the constants in UnityPlugin.cpp and rebuilding the plugin if you are feeling adventurous.

You could also try an experiment reducing the eye buffer resolution from 1024 down to 768 or so and see if that removes the thermal throttling, but everything will be blurrier.

It has been our experience that CPU load is a bigger issue than GPU load, so keep looking at your profiles and seeing what you can do to reduce the work.

The only big hammer option to drastically cut power would be going to 30 hz rendering (with timewarp interpolating frames), which will leave animations choppy, or monoscopic rendering, which will lose the sense of presence. I have had mono rendering working in Unity earlier, but it isn't at the moment. Internally, we now have a flag to timewarp to give a solid 30 hz eye update rate, which will be better than js

stolk
Level 2
"JohnCarmack" wrote:
...If your app can run with 1.4 GHz clocks, it will run cooler than if it was using 1.7 GHz clocks and sleeping for the remainder of the time. We don't have this exposed in Unity yet, and I'm not 100% positive it is properly functional in the firmware that shipped with the GS5 phone dev kits. You could try hacking the constants in UnityPlugin.cpp and rebuilding the plugin if you are feeling adventurous.


I can confirm that lowering clock helps reducing the thermal warnings.
And by switching from debug to optimized builds, they now went away for me.

I'm not on Unity, just NDK, but edited VrCommon.cpp in the function SetVrPlatformOptions().
Beware though: the freq parameters passed to this function are not used, instead the local vars cpuMhz and gpuMhz are used.

I now use:
const int cpuMhz = 1497600;

Bram

PS: I was not just getting the thermal throttling, I was actually getting devices reboots. Those went away after switching to optimized builds and using the lower cpu freq.

PPS: To use optimized builds make sure you have this in your jni/Application.mk:
APP_OPTIM := release