Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  4. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  5. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Unity android fps throttling if not touching the screen

Discussion in 'Android' started by lassade, Jan 10, 2018.

  1. lassade

    lassade

    Joined:
    Jan 27, 2013
    Posts:
    52
    Hi I'm getting this weird issue with my game today, my game is a prototype (bare anything inside the project, have one class to set the targetFrameRate) it runs at 60 fps no problem in my android testing device, but when I'm not touching the screen the game slows down to about 15 fps, touch the screen and it get right up back to 60. This is actually great to save some power but, the switch between 15 to 60 fps is pretty noticiable. I'm out of ideas.
     
  2. Yury-Habets

    Yury-Habets

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    837
    Is it specific to the beta version?
    What is the device in question?

    The thing is - the power management service of the Android OS is quite aggressive in terms of trying to keep the device cold and the battery full, so it throttles the CPU when possible.
    Touching the screen causes the power management to bump the frequency of the CPU to make the UI more responsive though.

    So this sounds like an expected behavior. Does the device dim the screen when it goes down to 15 fps?
     
  3. lassade

    lassade

    Joined:
    Jan 27, 2013
    Posts:
    52
    No, but its very likely to be the cause of the issue I'm using LG K220 (LG X Power). I tested in other devices and no lag whatsoever.
     
  4. Yury-Habets

    Yury-Habets

    Unity Technologies

    Joined:
    Nov 18, 2013
    Posts:
    837
    Does the device have specific power settings? IIRC there was something when the device decides the app is consuming too much power. Try disabling power saving settings just in case.