All Android apps run at a maximum of 30 fps, no matter what I do

Hey, I noticed that my win32 program ran at 60fps like it should, but my android app only ran at a maximum of 30fps. I thought this was a bit weird, because my app so far isn’t very processor or gpu intensive, and my phone is pretty powerful (It’s a Samsung Galaxy S III).

I wondered if this was just a problem with my app, so I opened the HelloWorld app and ran it on my device, and it too only ran at 30fps. I even removed the TTF Label and the background, and it still wouldn’t run any higher than 30fps.

Is this a known bug? Or is this just a problem with my configuration?

It’s a known limitation of Samsung Galaxy II, only to cocos2d-x games, but also all apps, including html5 games in browsers. It’a amazing that Galaxy III has this limitation too.
Other devices can works on 60 FPS

update:

Samsung Galaxy series (i9100, S3 etc.) have a “Power Saving” mode in settings. If you turn this on, the FPS is limited to 30 on all apps. Turning this off can have 60 FPS

Is there any way to work around it?

AFAIK, no approach to deal with this.

Walzer Wang wrote:

It’s a known limitation of Samsung Galaxy II, only to cocos2d-x games, but also all apps, including html5 games in browsers. It’a amazing that Galaxy III has this limitation too.
Other devices can works on 60 FPS.

I think Samsung Galaxy S3 is fine, I have my Arrow Mania game running at 60fps using “cocos2d-2.0-rc2-x-2.0.1” running on it right now.

Gav T wrote:

Walzer Wang wrote:
> It’s a known limitation of Samsung Galaxy II, only to cocos2d-x games, but also all apps, including html5 games in browsers. It’a amazing that Galaxy III has this limitation too.
> Other devices can works on 60 FPS.
>
I think Samsung Galaxy S3 is fine, I have my Arrow Mania game running at 60fps using “cocos2d-2.0-rc2-x-2.0.1” running on it right now.

Update: Just got hold of an Samsung Galaxy S2 (model GT-I9100M), works at 60fps on that too.

See the image attached.

Oh and I thought to try the Helloworld app too, I can confirm that runs at 60fps on the Samsungs.

Did you modify the android code generated by the script at all? Is your makefile the same? ” (aside from adding files to build)

No modifications, I’m using “android-ndk-r8” and the latest “android-sdk-macosx”.

On a Mac, compiled in Terminal, standard everything.

Gav T wrote:

No modifications, I’m using “android-ndk-r8” and the latest “android-sdk-macosx”.
>
On a Mac, compiled in Terminal, standard everything.

I’ve zipped up my HelloWorld folder, download it here: http://www.gmtdev.com/downloads/HelloWorld.zip

In there you can try my “proj.android/bin/org.cocos2dx.application.ApplicationDemo.apk” file that I built. I get 60fps on both Samsung Galaxy S2 and S3.

Strange, it only runs at a maximum of 30fps like the other apps. I’m using a Verizon Samsung Galaxy S3 running a custom Rom (Beans’)…what are you running?

Sam Borenstein wrote:

Strange, it only runs at a maximum of 30fps like the other apps. I’m using a Verizon Samsung Galaxy S3 running a custom Rom (Beans’)…what are you running?

Telus in Canada, standard rom, SGH-I747M model. Android 4.0.4. Kernel 3.0.8-20120523.225040

Just to check, you are SURE you have called something like pDirector->setAnimationInterval(1.0 / 60); right?

Yes, I’m sure.

Try disabling FPS control in java.
It fixed issues I had with Nexus 7 device.

Hey I just turned on the phones “Power Saving” mode in the status pull down bar menu. Seems it makes everything run at 30fps, maybe you have that on?

Wow…thank you. I generally keep power saving mode on. I can’t believe I didn’t figure that out.

Oh, power saving mode… It really confused me a whole year! Thanks GavT!